Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
PB-DFS
PB-DFS-master/PySCIPOpt/examples/finished/transp.py
##@file transp.py #@brief a model for the transportation problem """ Model for solving a transportation problem: minimize the total transportation cost for satisfying demand at customers, from capacitated facilities. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def transp(I,J,c,d,M): """transp -- model for solving the transportation problem Parameters: I - set of customers J - set of facilities c[i,j] - unit transportation cost on arc (i,j) d[i] - demand at node i M[j] - capacity Returns a model, ready to be solved. """ model = Model("transportation") # Create variables x = {} for i in I: for j in J: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)" % (i, j)) # Demand constraints for i in I: model.addCons(quicksum(x[i,j] for j in J if (i,j) in x) == d[i], name="Demand(%s)" % i) # Capacity constraints for j in J: model.addCons(quicksum(x[i,j] for i in I if (i,j) in x) <= M[j], name="Capacity(%s)" % j) # Objective model.setObjective(quicksum(c[i,j]*x[i,j] for (i,j) in x), "minimize") model.optimize() model.data = x return model def make_inst1(): """creates example data set 1""" I,d = multidict({1:80, 2:270, 3:250 , 4:160, 5:180}) # demand J,M = multidict({1:500, 2:500, 3:500}) # capacity c = {(1,1):4, (1,2):6, (1,3):9, # cost (2,1):5, (2,2):4, (2,3):7, (3,1):6, (3,2):3, (3,3):4, (4,1):8, (4,2):5, (4,3):3, (5,1):10, (5,2):8, (5,3):4, } return I,J,c,d,M def make_inst2(): """creates example data set 2""" I,d = multidict({1:45, 2:20, 3:30 , 4:30}) # demand J,M = multidict({1:35, 2:50, 3:40}) # capacity c = {(1,1):8, (1,2):9, (1,3):14 , # {(customer,factory) : cost<float>} (2,1):6, (2,2):12, (2,3):9 , (3,1):10, (3,2):13, (3,3):16 , (4,1):9, (4,2):7, (4,3):5 , } return I,J,c,d,M if __name__ == "__main__": I,J,c,d,M = make_inst1(); # I,J,c,d,M = make_inst2(); model = transp(I,J,c,d,M) model.optimize() print("Optimal value:", model.getObjVal()) EPS = 1.e-6 x = model.data for (i,j) in x: if model.getVal(x[i,j]) > EPS: print("sending quantity %10s from factory %3s to customer %3s" % (model.getVal(x[i,j]),j,i))
2,515
27.590909
104
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/finished/transp_nofn.py
##@file transp_nofn.py #@brief a model for the transportation problem """ Model for solving a transportation problem: minimize the total transportation cost for satisfying demand at customers, from capacitated facilities. Data: I - set of customers J - set of facilities c[i,j] - unit transportation cost on arc (i,j) d[i] - demand at node i M[j] - capacity Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict d = {1:80, 2:270, 3:250 , 4:160, 5:180} # demand I = d.keys() M = {1:500, 2:500, 3:500} # capacity J = M.keys() c = {(1,1):4, (1,2):6, (1,3):9, # cost (2,1):5, (2,2):4, (2,3):7, (3,1):6, (3,2):3, (3,3):4, (4,1):8, (4,2):5, (4,3):3, (5,1):10, (5,2):8, (5,3):4, } model = Model("transportation") # Create variables x = {} for i in I: for j in J: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)" % (i,j)) # Demand constraints for i in I: model.addCons(sum(x[i,j] for j in J if (i,j) in x) == d[i], name="Demand(%s)" % i) # Capacity constraints for j in J: model.addCons(sum(x[i,j] for i in I if (i,j) in x) <= M[j], name="Capacity(%s)" % j) # Objective model.setObjective(quicksum(c[i,j]*x[i,j] for (i,j) in x), "minimize") model.optimize() print("Optimal value:", model.getObjVal()) EPS = 1.e-6 for (i,j) in x: if model.getVal(x[i,j]) > EPS: print("sending quantity %10s from factory %3s to customer %3s" % (model.getVal(x[i,j]),j,i))
1,527
23.645161
100
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/finished/tsp.py
##@file tsp.py #@brief solve the traveling salesman problem """ minimize the travel cost for visiting n customers exactly once approach: - start with assignment model - add cuts until there are no sub-cycles - two cutting plane possibilities (called inside "solve_tsp"): - addcut: limit the number of edges in a connected component S to |S|-1 - addcut2: require the number of edges between two connected component to be >= 2 Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random import networkx from pyscipopt import Model, quicksum def solve_tsp(V,c): """solve_tsp -- solve the traveling salesman problem - start with assignment model - add cuts until there are no sub-cycles Parameters: - V: set/list of nodes in the graph - c[i,j]: cost for traversing edge (i,j) Returns the optimum objective value and the list of edges used. """ def addcut(cut_edges): G = networkx.Graph() G.add_edges_from(cut_edges) Components = list(networkx.connected_components(G)) if len(Components) == 1: return False model.freeTransform() for S in Components: model.addCons(quicksum(x[i,j] for i in S for j in S if j>i) <= len(S)-1) print("cut: len(%s) <= %s" % (S,len(S)-1)) return True def addcut2(cut_edges): G = networkx.Graph() G.add_edges_from(cut_edges) Components = list(networkx.connected_components(G)) if len(Components) == 1: return False model.freeTransform() for S in Components: T = set(V) - set(S) print("S:",S) print("T:",T) model.addCons(quicksum(x[i,j] for i in S for j in T if j>i) + quicksum(x[i,j] for i in T for j in S if j>i) >= 2) print("cut: %s >= 2" % "+".join([("x[%s,%s]" % (i,j)) for i in S for j in T if j>i])) return True # main part of the solution process: model = Model("tsp") model.hideOutput() # silent/verbose mode x = {} for i in V: for j in V: if j > i: x[i,j] = model.addVar(ub=1, name="x(%s,%s)"%(i,j)) for i in V: model.addCons(quicksum(x[j,i] for j in V if j < i) + \ quicksum(x[i,j] for j in V if j > i) == 2, "Degree(%s)"%i) model.setObjective(quicksum(c[i,j]*x[i,j] for i in V for j in V if j > i), "minimize") EPS = 1.e-6 isMIP = False while True: model.optimize() edges = [] for (i,j) in x: if model.getVal(x[i,j]) > EPS: edges.append( (i,j) ) if addcut(edges) == False: if isMIP: # integer variables, components connected: solution found break model.freeTransform() for (i,j) in x: # all components connected, switch to integer model model.chgVarType(x[i,j], "B") isMIP = True return model.getObjVal(),edges def distance(x1,y1,x2,y2): """distance: euclidean distance between (x1,y1) and (x2,y2)""" return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n): """make_data: compute matrix distance based on euclidean distance""" V = range(1,n+1) x = dict([(i,random.random()) for i in V]) y = dict([(i,random.random()) for i in V]) c = {} for i in V: for j in V: if j > i: c[i,j] = distance(x[i],y[i],x[j],y[j]) return V,c if __name__ == "__main__": import sys # Parse argument if len(sys.argv) < 2: print("Usage: %s instance" % sys.argv[0]) print("Using randomized example instead") n = 200 seed = 1 random.seed(seed) V,c = make_data(n) else: from read_tsplib import read_tsplib try: V,c,x,y = read_tsplib(sys.argv[1]) except: print("Cannot read TSPLIB file",sys.argv[1]) exit(1) obj,edges = solve_tsp(V,c) print("\nOptimal tour:",edges) print("Optimal cost:",obj)
4,147
29.725926
97
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/finished/weber_soco.py
##@file weber_soco.py #@brief model for solving the weber problem using soco. """ Copyright (c) by Joao Pedro PEDROSO, Masahiro MURAMATSU and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def weber(I,x,y,w): """weber: model for solving the single source weber problem using soco. Parameters: - I: set of customers - x[i]: x position of customer i - y[i]: y position of customer i - w[i]: weight of customer i Returns a model, ready to be solved. """ model = Model("weber") X,Y,z,xaux,yaux = {},{},{},{},{} X = model.addVar(lb=-model.infinity(), vtype="C", name="X") Y = model.addVar(lb=-model.infinity(), vtype="C", name="Y") for i in I: z[i] = model.addVar(vtype="C", name="z(%s)"%(i)) xaux[i] = model.addVar(lb=-model.infinity(), vtype="C", name="xaux(%s)"%(i)) yaux[i] = model.addVar(lb=-model.infinity(), vtype="C", name="yaux(%s)"%(i)) for i in I: model.addCons(xaux[i]*xaux[i] + yaux[i]*yaux[i] <= z[i]*z[i], "MinDist(%s)"%(i)) model.addCons(xaux[i] == (x[i]-X), "xAux(%s)"%(i)) model.addCons(yaux[i] == (y[i]-Y), "yAux(%s)"%(i)) model.setObjective(quicksum(w[i]*z[i] for i in I), "minimize") model.data = X,Y,z return model import random def make_data(n,m): """creates example data set""" I = range(1,n+1) J = range(1,m+1) x,y,w = {},{},{} for i in I: x[i] = random.randint(0,100) y[i] = random.randint(0,100) w[i] = random.randint(1,5) return I,J,x,y,w if __name__ == "__main__": import sys random.seed(3) n = 7 m = 1 I,J,x,y,w = make_data(n,m) print("data:") print("%s\t%8s\t%8s\t%8s" % ("i","x[i]","y[i]","w[i]")) for i in I: print("%s\t%8g\t%8g\t%8g" % (i,x[i],y[i],w[i])) print model = weber(I,x,y,w) model.optimize() X,Y,z = model.data print("Optimal value=",model.getObjVal()) print("Selected position:",) print("\t",(round(model.getVal(X)),round(model.getVal(Y)))) print print("Solution:") print("%s\t%8s" % ("i","z[i]")) for i in I: print("%s\t%8g" % (i,model.getVal(z[i]))) print try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() G.add_nodes_from(I) G.add_nodes_from(["D"]) position = {} for i in I: position[i] = (x[i],y[i]) position["D"] = (round(model.getVal(X)),round(model.getVal(Y))) NX.draw(G,pos=position,node_size=200,node_color="g",nodelist=I) NX.draw(G,pos=position,node_size=400,node_color="w",nodelist=["D"],alpha=0.5) #P.savefig("weber.pdf",format="pdf",dpi=300) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting") def weber_MS(I,J,x,y,w): """weber -- model for solving the weber problem using soco (multiple source version). Parameters: - I: set of customers - J: set of potential facilities - x[i]: x position of customer i - y[i]: y position of customer i - w[i]: weight of customer i Returns a model, ready to be solved. """ M = max([((x[i]-x[j])**2 + (y[i]-y[j])**2) for i in I for j in I]) model = Model("weber - multiple source") X,Y,v,u = {},{},{},{} xaux,yaux,uaux = {},{},{} for j in J: X[j] = model.addVar(lb=-model.infinity(), vtype="C", name="X(%s)"%j) Y[j] = model.addVar(lb=-model.infinity(), vtype="C", name="Y(%s)"%j) for i in I: v[i,j] = model.addVar(vtype="C", name="v(%s,%s)"%(i,j)) u[i,j] = model.addVar(vtype="B", name="u(%s,%s)"%(i,j)) xaux[i,j] = model.addVar(lb=-model.infinity(), vtype="C", name="xaux(%s,%s)"%(i,j)) yaux[i,j] = model.addVar(lb=-model.infinity(), vtype="C", name="yaux(%s,%s)"%(i,j)) uaux[i,j] = model.addVar(vtype="C", name="uaux(%s,%s)"%(i,j)) for i in I: model.addCons(quicksum(u[i,j] for j in J) == 1, "Assign(%s)"%i) for j in J: model.addCons(xaux[i,j]*xaux[i,j] + yaux[i,j]*yaux[i,j] <= v[i,j]*v[i,j], "MinDist(%s,%s)"%(i,j)) model.addCons(xaux[i,j] == (x[i]-X[j]), "xAux(%s,%s)"%(i,j)) model.addCons(yaux[i,j] == (y[i]-Y[j]), "yAux(%s,%s)"%(i,j)) model.addCons(uaux[i,j] >= v[i,j] - M*(1-u[i,j]), "uAux(%s,%s)"%(i,j)) model.setObjective(quicksum(w[i]*uaux[i,j] for i in I for j in J), "minimize") model.data = X,Y,v,u return model if __name__ == "__main__": random.seed(3) n = 7 m = 1 I,J,x,y,w = make_data(n,m) model = weber_MS(I,J,x,y,w) model.optimize() X,Y,w,z = model.data print("Optimal value:",model.getObjVal()) print("Selected positions:") for j in J: print("\t",(model.getVal(X[j]),model.getVal(Y[j]))) for (i,j) in sorted(w.keys()): print("\t",(i,j),model.getVal(w[i,j]),model.getVal(z[i,j])) EPS = 1.e-4 edges = [(i,j) for (i,j) in z if model.getVal(z[i,j]) > EPS] try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() G.add_nodes_from(I) G.add_nodes_from("%s"%j for j in J) # for distinguishing J from I, make nodes as strings for (i,j) in edges: G.add_edge(i,"%s"%j) position = {} for i in I: position[i] = (x[i],y[i]) for j in J: position["%s"%j] = (model.getVal(X[j]),model.getVal(Y[j])) print(position) NX.draw(G,position,node_color="g",nodelist=I) NX.draw(G,position,node_color="w",nodelist=["%s"%j for j in J]) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting")
5,924
31.554945
109
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/tutorial/even.py
##@file tutorial/even.py #@brief Tutorial example to check whether values are even or odd """ Public Domain, WTFNMFPL Public Licence """ from pyscipopt import Model from pprint import pformat as pfmt example_values = [ 0, 1, 1.5, "helloworld", 20, 25, -101, -15., -10, -2**31, -int(2**31), "2**31-1", int(2**31-1), int(2**63)-1 ] verbose = False #verbose = True # uncomment for additional info on variables! sdic = {0: "even", 1: "odd"} # remainder to 2 def parity(number): """ Prints if a value is even/odd/neither per each value in a example list This example is made for newcomers and motivated by: - modulus is unsupported for pyscipopt.scip.Variable and int - variables are non-integer by default Based on this: #172#issuecomment-394644046 Args: number: value which parity is checked Returns: sval: 1 if number is odd, 0 if number is even, -1 if neither """ sval = -1 if verbose: print(80*"*") try: assert number == int(round(number)) m = Model() m.hideOutput() # x and n are integer, s is binary # Irrespective to their type, variables are non-negative by default # since 0 is the default lb. To allow for negative values, give None # as lower bound. # (None means -infinity as lower bound and +infinity as upper bound) x = m.addVar("x", vtype="I", lb=None, ub=None) #ub=None is default n = m.addVar("n", vtype="I", lb=None) s = m.addVar("s", vtype="B") # CAVEAT: if number is negative, x's lower bound must be None # if x is set by default as non-negative and number is negative: # there is no feasible solution (trivial) but the program # does not highlight which constraints conflict. m.addCons(x==number) # minimize the difference between the number and twice a natural number m.addCons(s == x-2*n) m.setObjective(s) m.optimize() assert m.getStatus() == "optimal" boolmod = m.getVal(s) == m.getVal(x)%2 if verbose: for v in m.getVars(): print("%*s: %d" % (fmtlen, v,m.getVal(v))) print("%*d%%2 == %d?" % (fmtlen, m.getVal(x), m.getVal(s))) print("%*s" % (fmtlen, boolmod)) xval = m.getVal(x) sval = m.getVal(s) sstr = sdic[sval] print("%*d is %s" % (fmtlen, xval, sstr)) except (AssertionError, TypeError): print("%*s is neither even nor odd!" % (fmtlen, number.__repr__())) finally: if verbose: print(80*"*") print("") return sval if __name__ == "__main__": """ If positional arguments are given: the parity check is performed on each of them Else: the parity check is performed on each of the default example values """ import sys from ast import literal_eval as leval try: # check parity for each positional arguments sys.argv[1] values = sys.argv[1:] except IndexError: # check parity for each default example value values = example_values # format lenght, cosmetics fmtlen = max([len(fmt) for fmt in pfmt(values,width=1).split('\n')]) for value in values: try: n = leval(value) except (ValueError, SyntaxError): # for numbers or str w/ spaces n = value parity(n)
3,583
29.632479
79
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/tutorial/logical.py
##@file tutorial/logical.py #@brief Tutorial example on how to use AND/OR/XOR constraints. """ N.B.: standard SCIP XOR constraint works differently from AND/OR by design. The constraint is set with a boolean rhs instead of an integer resultant. cf. http://listserv.zib.de/pipermail/scip/2018-May/003392.html A workaround to get the resultant as variable is here proposed. Public Domain, WTFNMFPL Public Licence """ from pyscipopt import Model from pyscipopt import quicksum def _init(): model = Model() model.hideOutput() x = model.addVar("x","B") y = model.addVar("y","B") z = model.addVar("z","B") return model, x, y, z def _optimize(name, m): m.optimize() print("* %s constraint *" % name) objSet = bool(m.getObjective().terms.keys()) print("* Is objective set? %s" % objSet) if objSet: print("* Sense: %s" % m.getObjectiveSense()) status = m.getStatus() print("* Model status: %s" % status) if status == 'optimal': for v in m.getVars(): if v.name != "n": print("%s: %d" % (v, round(m.getVal(v)))) else: print("* No variable is printed if model status is not optimal") print("") def and_constraint(v=1, sense="minimize"): """ AND constraint """ assert v in [0,1], "v must be 0 or 1 instead of %s" % v.__repr__() model, x, y, z = _init() r = model.addVar("r", "B") model.addConsAnd([x,y,z], r) model.addCons(x==v) model.setObjective(r, sense=sense) _optimize("AND", model) def or_constraint(v=0, sense="maximize"): """ OR constraint""" assert v in [0,1], "v must be 0 or 1 instead of %s" % v.__repr__() model, x, y, z = _init() r = model.addVar("r", "B") model.addConsOr([x,y,z], r) model.addCons(x==v) model.setObjective(r, sense=sense) _optimize("OR", model) def xors_constraint(v=1): """ XOR (r as boolean) standard constraint""" assert v in [0,1], "v must be 0 or 1 instead of %s" % v.__repr__() model, x, y, z = _init() r = True model.addConsXor([x,y,z], r) model.addCons(x==v) _optimize("Standard XOR (as boolean)", model) def xorc_constraint(v=0, sense="maximize"): """ XOR (r as variable) custom constraint""" assert v in [0,1], "v must be 0 or 1 instead of %s" % v.__repr__() model, x, y, z = _init() r = model.addVar("r", "B") n = model.addVar("n", "I") # auxiliary model.addCons(r+quicksum([x,y,z]) == 2*n) model.addCons(x==v) model.setObjective(r, sense=sense) _optimize("Custom XOR (as variable)", model) if __name__ == "__main__": and_constraint() or_constraint() xors_constraint() xorc_constraint()
2,686
30.244186
75
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/tutorial/puzzle.py
##@file tutorial/puzzle.py #@brief solve a simple puzzle using SCIP """ On a beach there are octopuses, turtles and cranes. The total number of legs of all animals is 80, while the number of heads is 32. What are the minimum numbers of turtles and octopuses, respectively? Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model model = Model("puzzle") x = model.addVar(vtype="I", name="octopusses") y = model.addVar(vtype="I", name="turtles") z = model.addVar(vtype="I", name="cranes") # Set up constraint for number of heads model.addCons(x + y + z == 32, name="Heads") # Set up constraint for number of legs model.addCons(8*x + 4*y + 2*z == 80, name="Legs") # Set objective function model.setObjective(x + y, "minimize") model.hideOutput() model.optimize() #solution = model.getBestSol() print("Optimal value:", model.getObjVal()) print((x.name, y.name, z.name), " = ", (model.getVal(x), model.getVal(y), model.getVal(z)))
967
28.333333
91
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/cutstock.py
#todo relax function needed """ cutstock.py: use SCIP for solving the cutting stock problem. The instance of the cutting stock problem is represented by the two lists of m items of size w=(w_i) and and quantity q=(q_i). The roll size is B. Given packing patterns t_1, ...,t_k,...t_K where t_k is a vector of the numbers of items cut from a roll, the problem is reduced to the following LP: minimize sum_{k} x_k subject to sum_{k} t_k(i) x_k >= q_i for all i x_k >=0 for all k. We apply a column generation approch (Gilmore-Gomory approach) in which we generate cutting patterns by solving a knapsack sub-problem. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict LOG = True EPS = 1.e-6 def solveCuttingStock(w,q,B): """solveCuttingStock: use column generation (Gilmore-Gomory approach). Parameters: - w: list of item's widths - q: number of items of a width - B: bin/roll capacity Returns a solution: list of lists, each of which with the cuts of a roll. """ t = [] # patterns m = len(w) # Generate initial patterns with one size for each item width for (i,width) in enumerate(w): pat = [0]*m # vector of number of orders to be packed into one roll (bin) pat[i] = int(B/width) t.append(pat) # if LOG: # print "sizes of orders=",w # print "quantities of orders=",q # print "roll size=",B # print "initial patterns",t K = len(t) master = Model("master LP") # master LP problem x = {} for k in range(K): x[k] = master.addVar(vtype="I", name="x(%s)"%k) orders = {} for i in range(m): orders[i] = master.addCons( quicksum(t[k][i]*x[k] for k in range(K) if t[k][i] > 0) >= q[i], "Order(%s)"%i) master.setObjective(quicksum(x[k] for k in range(K)), "minimize") # master.Params.OutputFlag = 0 # silent mode # iter = 0 while True: # print "current patterns:" # for ti in t: # print ti # print # iter += 1 relax = master.relax() relax.optimize() pi = [relax.getDualsolLinear(c) for c in relax.getConss()] # keep dual variables knapsack = Model("KP") # knapsack sub-problem knapsack.setMaximize # maximize y = {} for i in range(m): y[i] = knapsack.addVar(lb=0, ub=q[i], vtype="I", name="y(%s)"%i) knapsack.addCons(quicksum(w[i]*y[i] for i in range(m)) <= B, "Width") knapsack.setObjective(quicksum(pi[i]*y[i] for i in range(m)), "maximize") knapsack.hideOutput() # silent mode knapsack.optimize() # if LOG: # print "objective of knapsack problem:", knapsack.ObjVal if knapsack.getObjVal() < 1+EPS: # break if no more columns break pat = [int(y[i].X+0.5) for i in y] # new pattern t.append(pat) # if LOG: # print "shadow prices and new pattern:" # for (i,d) in enumerate(pi): # print "\t%5s%12s%7s" % (i,d,pat[i]) # print # add new column to the master problem col = Column() for i in range(m): if t[K][i] > 0: col.addTerms(t[K][i], orders[i]) x[K] = master.addVar(obj=1, vtype="I", name="x(%s)"%K, column=col) # master.write("MP" + str(iter) + ".lp") K += 1 # Finally, solve the IP # if LOG: # master.Params.OutputFlag = 1 # verbose mode master.optimize() # if LOG: # print # print "final solution (integer master problem): objective =", master.ObjVal # print "patterns:" # for k in x: # if x[k].X > EPS: # print "pattern",k, # print "\tsizes:", # print [w[i] for i in range(m) if t[k][i]>0 for j in range(t[k][i]) ], # print "--> %s rolls" % int(x[k].X+.5) rolls = [] for k in x: for j in range(int(x[k].X + .5)): rolls.append(sorted([w[i] for i in range(m) if t[k][i]>0 for j in range(t[k][i])])) rolls.sort() return rolls def CuttingStockExample1(): """CuttingStockExample1: create toy instance for the cutting stock problem.""" B = 110 # roll width (bin size) w = [20,45,50,55,75] # width (size) of orders (items) q = [48,35,24,10,8] # quantitiy of orders return w,q,B def CuttingStockExample2(): """CuttingStockExample2: create toy instance for the cutting stock problem.""" B = 9 # roll width (bin size) w = [2,3,4,5,6,7,8] # width (size) of orders (items) q = [4,2,6,6,2,2,2] # quantitiy of orders return w,q,B def mkCuttingStock(s): """mkCuttingStock: convert a bin packing instance into cutting stock format""" w,q = [],[] # list of different widths (sizes) of items, their quantities for item in sorted(s): if w == [] or item != w[-1]: w.append(item) q.append(1) else: q[-1] += 1 return w,q def mkBinPacking(w,q): """mkBinPacking: convert a cutting stock instance into bin packing format""" s = [] for j in range(len(w)): for i in range(q[j]): s.append(w[j]) return s if __name__ == "__main__": from bpp import FFD,solveBinPacking w,q,B = CuttingStockExample1() # w,q,B = CuttingStockExample2() # n = 500 # B = 100 # s,B = DiscreteUniform(n,18,50,B) s = mkBinPacking(w,q) ffd = FFD(s,B) print("\n\n\nSolution of FFD:") print(ffd) print(len(ffd), "bins") print("\n\n\nCutting stock problem, column generation:") rolls = solveCuttingStock(w,q,B) print(len(rolls), "rolls:") print(rolls) print("\n\n\nBin packing problem:") bins = solveBinPacking(s,B) print(len(bins), "bins:") print(bins)
6,000
28.561576
95
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/diet_std.py
""" diet.py: model for the modern diet problem Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def diet(F,N,a,b,c,d): """diet -- model for the modern diet problem Parameters: F - set of foods N - set of nutrients a[i] - minimum intake of nutrient i b[i] - maximum intake of nutrient i c[j] - cost of food j d[j][i] - amount of nutrient i in food j Returns a model, ready to be solved. """ model = Model("modern diet") # Create variables x,y,z = {},{},{} for j in F: x[j] = model.addVar(vtype="I", name="x(%s)" % j) for i in N: z[i] = model.addVar(lb=a[i], ub=b[i], vtype="C", name="z(%s)" % i) # Constraints: for i in N: model.addCons(quicksum(d[j][i]*x[j] for j in F) == z[i], name="Nutr(%s)" % i) model.setObjective(quicksum(c[j]*x[j] for j in F), "minimize") model.data = x,y,z return model def make_inst(): """make_inst: prepare data for the diet model""" F,c,d = multidict({ # cost # composition "CQPounder": [ 360, {"Cal":556, "Carbo":39, "Protein":30, "VitA":147,"VitC": 10, "Calc":221, "Iron":2.4}], "Big Mac" : [ 320, {"Cal":556, "Carbo":46, "Protein":26, "VitA":97, "VitC": 9, "Calc":142, "Iron":2.4}], "FFilet" : [ 270, {"Cal":356, "Carbo":42, "Protein":14, "VitA":28, "VitC": 1, "Calc": 76, "Iron":0.7}], "Chicken" : [ 290, {"Cal":431, "Carbo":45, "Protein":20, "VitA": 9, "VitC": 2, "Calc": 37, "Iron":0.9}], "Fries" : [ 190, {"Cal":249, "Carbo":30, "Protein": 3, "VitA": 0, "VitC": 5, "Calc": 7, "Iron":0.6}], "Milk" : [ 170, {"Cal":138, "Carbo":10, "Protein": 7, "VitA":80, "VitC": 2, "Calc":227, "Iron": 0}], "VegJuice" : [ 100, {"Cal": 69, "Carbo":17, "Protein": 1, "VitA":750,"VitC": 2, "Calc":18, "Iron": 0}], }) N,a,b = multidict({ # min,max intake "Cal" : [ 2000, 3000], "Carbo" : [ 300, 375 ], "Protein" : [ 50, 60 ], "VitA" : [ 500, 750 ], "VitC" : [ 85, 100 ], "Calc" : [ 660, 900 ], "Iron" : [ 6.0, 7.5 ], }) return F,N,a,b,c,d if __name__ == "__main__": F,N,a,b,c,d = make_inst() model = diet(F,N,a,b,c,d) model.optimize() status = model.getStatus() if status == "optimal": print("Optimal value:",model.getObjVal()) x,y,z = model.data for j in x: if model.getVal(x[j]) > 0: print((j,model.getVal(x[j]))) print("amount of nutrients:") for i in z: print((i,model.getVal(z[i]))) exit(0) if status == "unbounded" or status == "infeasible": model.setObjective(0, "maximize") model.optimize() status = model.getStatus() if status == "optimal": print("Instance unbounded") elif status == "infeasible": print("Infeasible instance") # model.computeIIS() # model.writeProblem("diet.lp") # for c in model.getConss(): # if c.IISConstr: # print(c.name) # model.feasRelaxS(1,False,False,True) # model.optimize() # model.writeProblem("diet-feasiblity.lp") # status = model.Status # if status == "optimal": # print("Optimal Value=",model.getObjVal()) # for v in model.getVars(): # print(v.name,"=",model.getVal(v)) # exit(0)
3,753
33.440367
85
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/eld.py
""" eld.py: economic load dispatching in electricity generation Approach: use an SOS2 constraints for modeling non-linear functions. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict import math import random from piecewise import convex_comb_sos def cost(a,b,c,e,f,p_min,p): """cost: fuel cost based on "standard" parameters (with valve-point loading effect) """ return a + b*p + c*p*p + abs(e*math.sin(f*(p_min-p))) def lower_brkpts(a,b,c,e,f,p_min,p_max,n): """lower_brkpts: lower approximation of the cost function Parameters: - a,...,p_max: cost parameters - n: number of breakpoints' intervals to insert between valve points Returns: list of breakpoints in the form [(x0,y0),...,(xK,yK)] """ EPS = 1.e-12 # for avoiding round-off errors if f == 0: f = math.pi/(p_max-p_min) brk = [] nvalve = int(math.ceil(f*(p_max-p_min)/math.pi)) for i in range(nvalve+1): p0 = p_min + i*math.pi/f if p0 >= p_max-EPS: brk.append((p_max,cost(a,b,c,e,f,p_min,p_max))) break for j in range(n): p = p0 + j*math.pi/f/n if p >= p_max: break brk.append((p,cost(a,b,c,e,f,p_min,p))) return brk def eld_complete(U,p_min,p_max,d,brk): """eld -- economic load dispatching in electricity generation Parameters: - U: set of generators (units) - p_min[u]: minimum operating power for unit u - p_max[u]: maximum operating power for unit u - d: demand - brk[k]: (x,y) coordinates of breakpoint k, k=0,...,K Returns a model, ready to be solved. """ model = Model("Economic load dispatching") p,F = {},{} for u in U: p[u] = model.addVar(lb=p_min[u], ub=p_max[u], name="p(%s)"%u) # capacity F[u] = model.addVar(lb=0,name="fuel(%s)"%u) # set fuel costs based on piecewise linear approximation for u in U: abrk = [X for (X,Y) in brk[u]] bbrk = [Y for (X,Y) in brk[u]] # convex combination part: K = len(brk[u])-1 z = {} for k in range(K+1): z[k] = model.addVar(ub=1) # do not name variables for avoiding clash model.addCons(p[u] == quicksum(abrk[k]*z[k] for k in range(K+1))) model.addCons(F[u] == quicksum(bbrk[k]*z[k] for k in range(K+1))) model.addCons(quicksum(z[k] for k in range(K+1)) == 1) model.addConsSOS2([z[k] for k in range(K+1)]) # demand satisfaction model.addCons(quicksum(p[u] for u in U) == d, "demand") # objective model.setObjective(quicksum(F[u] for u in U), "minimize") model.data = p return model def eld_another(U,p_min,p_max,d,brk): """eld -- economic load dispatching in electricity generation Parameters: - U: set of generators (units) - p_min[u]: minimum operating power for unit u - p_max[u]: maximum operating power for unit u - d: demand - brk[u][k]: (x,y) coordinates of breakpoint k, k=0,...,K for unit u Returns a model, ready to be solved. """ model = Model("Economic load dispatching") # set objective based on piecewise linear approximation p,F,z = {},{},{} for u in U: abrk = [X for (X,Y) in brk[u]] bbrk = [Y for (X,Y) in brk[u]] p[u],F[u],z[u] = convex_comb_sos(model,abrk,bbrk) p[u].lb = p_min[u] p[u].ub = p_max[u] # demand satisfaction model.addCons(quicksum(p[u] for u in U) == d, "demand") # objective model.setObjective(quicksum(F[u] for u in U), "minimize") model.data = p return model def eld13(): U, a, b, c, e, f, p_min, p_max = multidict({ 1 : [ 550, 8.1, 0.00028, 300, 0.035, 0, 680 ], 2 : [ 309, 8.1, 0.00056, 200, 0.042, 0, 360 ], 3 : [ 307, 8.1, 0.00056, 200, 0.042, 0, 360 ], 4 : [ 240, 7.74, 0.00324, 150, 0.063, 60, 180 ], 5 : [ 240, 7.74, 0.00324, 150, 0.063, 60, 180 ], 6 : [ 240, 7.74, 0.00324, 150, 0.063, 60, 180 ], 7 : [ 240, 7.74, 0.00324, 150, 0.063, 60, 180 ], 8 : [ 240, 7.74, 0.00324, 150, 0.063, 60, 180 ], 9 : [ 240, 7.74, 0.00324, 150, 0.063, 60, 180 ], 10 : [ 126, 8.6, 0.00284, 100, 0.084, 40, 120 ], 11 : [ 126, 8.6, 0.00284, 100, 0.084, 40, 120 ], 12 : [ 126, 8.6, 0.00284, 100, 0.084, 55, 120 ], 13 : [ 126, 8.6, 0.00284, 100, 0.084, 55, 120 ], }) return U, a, b, c, e, f, p_min, p_max def eld40(): U, a, b, c, e, f, p_min, p_max = multidict({ 1 : [ 94.705, 6.73, 0.00690, 100, 0.084, 36, 114], 2 : [ 94.705, 6.73, 0.00690, 100, 0.084, 36, 114], 3 : [ 309.54, 7.07, 0.02028, 100, 0.084, 60, 120], 4 : [ 369.03, 8.18, 0.00942, 150, 0.063, 80, 190], 5 : [ 148.89, 5.35, 0.01140, 120, 0.077, 47, 97], 6 : [ 222.33, 8.05, 0.01142, 100, 0.084, 68, 140], 7 : [ 287.71, 8.03, 0.00357, 200, 0.042, 110, 300], 8 : [ 391.98, 6.99, 0.00492, 200, 0.042, 135, 300], 9 : [ 455.76, 6.60, 0.00573, 200, 0.042, 135, 300], 10 : [ 722.82, 12.9, 0.00605, 200, 0.042, 130, 300], 11 : [ 635.20, 12.9, 0.00515, 200, 0.042, 94, 375], 12 : [ 654.69, 12.8, 0.00569, 200, 0.042, 94, 375], 13 : [ 913.40, 12.5, 0.00421, 300, 0.035, 125, 500], 14 : [ 1760.4, 8.84, 0.00752, 300, 0.035, 125, 500], 15 : [ 1728.3, 9.15, 0.00708, 300, 0.035, 125, 500], 16 : [ 1728.3, 9.15, 0.00708, 300, 0.035, 125, 500], 17 : [ 647.85, 7.97, 0.00313, 300, 0.035, 220, 500], 18 : [ 649.69, 7.95, 0.00313, 300, 0.035, 220, 500], 19 : [ 647.83, 7.97, 0.00313, 300, 0.035, 242, 550], 20 : [ 647.81, 7.97, 0.00313, 300, 0.035, 242, 550], 21 : [ 785.96, 6.63, 0.00298, 300, 0.035, 254, 550], 22 : [ 785.96, 6.63, 0.00298, 300, 0.035, 254, 550], 23 : [ 794.53, 6.66, 0.00284, 300, 0.035, 254, 550], 24 : [ 794.53, 6.66, 0.00284, 300, 0.035, 254, 550], 25 : [ 801.32, 7.10, 0.00277, 300, 0.035, 254, 550], 26 : [ 801.32, 7.10, 0.00277, 300, 0.035, 254, 550], 27 : [ 1055.1, 3.33, 0.52124, 120, 0.077, 10, 150], 28 : [ 1055.1, 3.33, 0.52124, 120, 0.077, 10, 150], 29 : [ 1055.1, 3.33, 0.52124, 120, 0.077, 10, 150], 30 : [ 148.89, 5.35, 0.01140, 120, 0.077, 47, 97], 31 : [ 222.92, 6.43, 0.00160, 150, 0.063, 60, 190], 32 : [ 222.92, 6.43, 0.00160, 150, 0.063, 60, 190], 33 : [ 222.92, 6.43, 0.00160, 150, 0.063, 60, 190], 34 : [ 107.87, 8.95, 0.00010, 200, 0.042, 90, 200], 35 : [ 116.58, 8.62, 0.00010, 200, 0.042, 90, 200], 36 : [ 116.58, 8.62, 0.00010, 200, 0.042, 90, 200], 37 : [ 307.45, 5.88, 0.01610, 80, 0.098, 25, 110], 38 : [ 307.45, 5.88, 0.01610, 80, 0.098, 25, 110], 39 : [ 307.45, 5.88, 0.01610, 80, 0.098, 25, 110], 40 : [ 647.83, 7.97, 0.00313, 300, 0.035, 242, 550], }) U = list(a.keys()) return U,a,b,c,e,f,p_min,p_max,d if __name__ == "__main__": # U,a,b,c,e,f,p_min,p_max = eld13(); d=1800 U,a,b,c,e,f,p_min,p_max = eld13(); d=2520 # U,a,b,c,e,f,p_min,p_max = eld40(); d=10500 n = 100 # number of breakpoints between valve points brk = {} for u in U: brk[u] = lower_brkpts(a[u],b[u],c[u],e[u],f[u],p_min[u],p_max[u],n) lower = eld_complete(U,p_min,p_max,d,brk) # lower = eld_another(U,p_min,p_max,d,brk) lower.setRealParam("limits/gap", 1e-12) lower.setRealParam("limits/absgap", 1e-12) lower.setRealParam("numerics/feastol", 1e-9) lower.optimize() p = lower.data print("Lower bound:",lower.ObjBound) UB = sum(cost(a[u],b[u],c[u],e[u],f[u],p_min[u],lower.getVal(p[u])) for u in U) print("Upper bound:",UB) print("Solution:") for u in p: print(u,lower.getVal(p[u]))
8,669
40.090047
83
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/eoq_soco.py
""" eoq_soco.py: model to the multi-item economic ordering quantity problem. Approach: use second-order cone optimization. Copyright (c) by Joao Pedro PEDROSO, Masahiro MURAMATSU and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def eoq_soco(I,F,h,d,w,W): """eoq_soco -- multi-item capacitated economic ordering quantity model using soco Parameters: - I: set of items - F[i]: ordering cost for item i - h[i]: holding cost for item i - d[i]: demand for item i - w[i]: unit weight for item i - W: capacity (limit on order quantity) Returns a model, ready to be solved. """ model = Model("EOQ model using SOCO") T,c = {},{} for i in I: T[i] = model.addVar(vtype="C", name="T(%s)"%i) # cycle time for item i c[i] = model.addVar(vtype="C", name="c(%s)"%i) # total cost for item i for i in I: model.addCons(F[i] <= c[i]*T[i]) model.addCons(quicksum(w[i]*d[i]*T[i] for i in I) <= W) model.setObjective(quicksum(c[i] + h[i]*d[i]*T[i]*0.5 for i in I), "minimize") model.data = T,c return model if __name__ == "__main__": # multiple item EOQ I,F,h,d,w = multidict( {1:[300,10,10,20], 2:[300,10,30,40], 3:[300,10,50,10]} ) W = 2000 model = eoq_soco(I,F,h,d,w,W) model.optimize() T,c = model.data EPS = 1.e-6 print("%5s\t%8s\t%8s" % ("i","T[i]","c[i]")) for i in I: print("%5s\t%8g\t%8g" % (i,model.getVal(T[i]),model.getVal(c[i]))) print print("Optimal value:", model.getObjVal())
1,616
26.87931
86
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/flp_nonlinear.py
# todo """ flp_nonlinear.py: piecewise linear model for the capacitated facility location problem minimize the total (weighted) travel cost from n customers to a given set of facilities, with fixed costs and limited capacities; costs are nonlinear (square root of the total quantity serviced by a facility). Approaches: use - convex combination - multiple selection formulations defined in 'piecewise.py'. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random from pyscipopt import Model, quicksum, multidict from piecewise import * def flp_nonlinear_mselect(I,J,d,M,f,c,K): """flp_nonlinear_mselect -- use multiple selection model Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- piecewise linear version with multiple selection") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,z = {},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],z[j] = mult_selection(model,a[j],b[j]) X[j].ub = M[j] # for i in I: # model.addCons( # x[i,j] <= \ # quicksum(min(d[i],a[j][k+1]) * z[j][k] for k in range(K)),\ # "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def flp_nonlinear_cc_dis_strong(I,J,d,M,f,c,K): """flp_nonlinear_bin -- use convex combination model, with binary variables Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- piecewise linear version with convex combination") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,z = {},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],z[j] = convex_comb_dis(model,a[j],b[j]) X[j].ub = M[j] for i in I: model.addCons( x[i,j] <= \ quicksum(min(d[i],a[j][k+1]) * z[j][k] for k in range(K)),\ "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def flp_nonlinear_cc_dis(I,J,d,M,f,c,K): """flp_nonlinear_bin -- use convex combination model, with binary variables Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- piecewise linear version with convex combination") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,z = {},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],z[j] = convex_comb_dis(model,a[j],b[j]) X[j].ub = M[j] # for i in I: # model.addCons( # x[i,j] <= \ # quicksum(min(d[i],a[j][k+1]) * z[j][k] for k in range(K)),\ # "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def flp_nonlinear_cc_dis_log(I,J,d,M,f,c,K): """flp_nonlinear_cc_dis_log -- convex combination model with logarithmic number of binary variables Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- convex combination model with logarithmic number of binary variables") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,yL,yR = {},{},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],yL[j],yR[j] = convex_comb_dis_log(model,a[j],b[j]) X[j].ub = M[j] # for i in I: # model.addCons( # x[i,j] <= \ # quicksum(min(d[i],a[j][k+1]) * (yL[j][k]+yR[j][k]) for k in range(K)),\ # "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def flp_nonlinear_cc_agg(I,J,d,M,f,c,K): """flp_nonlinear_cc_agg -- aggregated convex combination model Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- piecewise linear aggregated convex combination") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,z = {},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],z[j] = convex_comb_agg(model,a[j],b[j]) X[j].ub = M[j] # for i in I: # model.addCons( # x[i,j] <= \ # quicksum(min(d[i],a[j][k+1]) * z[j][k] for k in range(K)),\ # "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def flp_nonlinear_cc_agg_log(I,J,d,M,f,c,K): """flp_nonlinear_cc_agg_logg -- aggregated convex combination model, with log. binary variables Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- piecewise linear version with convex combination") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,y = {},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],y[j] = convex_comb_agg_log(model,a[j],b[j]) X[j].ub = M[j] # for i in I: # model.addCons( # x[i,j] <= \ # quicksum(min(d[i],a[j][k+1]) * (y[j][k]+y[j][k+1]) for k in range(K)),\ # "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def flp_nonlinear_sos(I,J,d,M,f,c,K): """flp_nonlinear_sos -- use model with SOS constraints Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j - K: number of linear pieces for approximation of non-linear cost function Returns a model, ready to be solved. """ a,b = {},{} for j in J: U = M[j] L = 0 width = U/float(K) a[j] = [k*width for k in range(K+1)] b[j] = [f[j]*math.sqrt(value) for value in a[j]] model = Model("nonlinear flp -- use model with SOS constraints") x = {} for j in J: for i in I: x[i,j] = model.addVar(vtype="C", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # total volume transported from plant j, corresponding (linearized) cost, selection variable: X,F,z = {},{},{} for j in J: # add constraints for linking piecewise linear part: X[j],F[j],z[j] = convex_comb_sos(model,a[j],b[j]) X[j].ub = M[j] # for i in I: # model.addCons( # x[i,j] <= \ # quicksum(min(d[i],a[j][k+1]) * (z[j][k] + z[j][k+1])\ # for k in range(len(a[j])-1)), # "Strong(%s,%s)"%(i,j)) # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in J: model.addCons(quicksum(x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.setObjective(quicksum(F[j] for j in J) +\ quicksum(c[i,j]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,X,F return model def distance(x1,y1,x2,y2): return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n,m,same=True): x,y = {},{} if same == True: I = range(1,n+1) J = range(1,m+1) for i in range(1,1+max(m,n)): # positions of the points in the plane x[i] = random.random() y[i] = random.random() else: I = range(1,n+1) J = range(n+1,n+m+1) for i in I: # positions of the points in the plane x[i] = random.random() y[i] = random.random() for j in J: # positions of the points in the plane x[j] = random.random() y[j] = random.random() f,c,d,M = {},{},{},{} total_demand = 0. for i in I: for j in J: c[i,j] = int(100*distance(x[i],y[i],x[j],y[j])) + 1 d[i] = random.randint(1,10) total_demand += d[i] total_cap = 0. r = {} for j in J: r[j] = random.randint(0,m) f[j] = random.randint(100,100+r[j]*m) M[j] = 1 + 100+r[j]*m - f[j] # M[j] = int(total_demand/m) + random.randint(1,m) total_cap += M[j] for j in J: M[j] = int(M[j] * total_demand / total_cap + 1) + random.randint(0,r[j]) # print("%s\t%s\t%s" % (j,f[j],M[j]) # print("demand:",total_demand # print("capacity:",sum([M[j] for j in J]) return I,J,d,M,f,c,x,y def example(): I,d = multidict({1:80, 2:270, 3:250, 4:160, 5:180}) # demand J,M,f = multidict({10:[500,100], 11:[500,100], 12:[500,100]}) # capacity, fixed costs c = {(1,10):4, (1,11):6, (1,12):9, # transportation costs (2,10):5, (2,11):4, (2,12):7, (3,10):6, (3,11):3, (3,12):4, (4,10):8, (4,11):5, (4,12):3, (5,10):10, (5,11):8, (5,12):4, } x_pos = {1:0, 2:0, 3:0, 4:0, 5:0, 10:2, 11:2, 12:2} # positions of the points in the plane y_pos = {1:2, 2:1, 3:0, 4:-1, 5:-2, 10:1, 11:0, 12:-1} return I,J,d,M,f,c,x_pos,y_pos if __name__ == "__main__": # I,J,d,M,f,c,x_pos,y_pos = example() random.seed(1) n = 25 m = 5 I,J,d,M,f,c,x_pos,y_pos = make_data(n,m,same=False) # from flp_make_data import read_orlib,read_cortinhal # I,J,d,M,f,c,x_pos,y_pos = read_orlib("DATA/ORLIB/cap101.txt.gz") # I,J,d,M,f,c,x_pos,y_pos = read_cortinhal("DATA/8_25/A8_25_11.DAT") # I,J,d,M,f,c,x_pos,y_pos = example() K = 4 print("demand:",d) print("cost:",c) print("fixed:",f) print("capacity:",M) # print("x:",x_pos # print("y:",y_pos print("number of intervals:",K) print("\n\n\nflp: multiple selection") model = flp_nonlinear_mselect(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput() # silent/verbose mode model.optimize() objMS = model.getObjVal() print("Obj.",objMS) print("\n\n\nflp: convex combination with binary variables") model = flp_nonlinear_cc_dis(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput() # silent/verbose mode model.optimize() objCC = model.getObjVal() print("Obj.",objCC) print("\n\n\nflp: convex combination with logarithmic number of binary variables") model = flp_nonlinear_cc_dis_log(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput() # silent/verbose mode model.optimize() objLOG = model.getObjVal() print("Obj.",objLOG) print("\n\n\nflp: model with SOS constraints") model = flp_nonlinear_sos(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput() # silent/verbose mode model.optimize() objSOS = model.getObjVal() print("Obj.",objSOS) print("\n\n\nflp: aggregated CC model") model = flp_nonlinear_cc_agg(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput() # silent/verbose mode model.optimize() objND = model.getObjVal() print("Obj.",objND) print("\n\n\nflp: aggregated CC model, log number variables") model = flp_nonlinear_cc_agg_log(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput() # silent/verbose mode model.optimize() objNDlog = model.getObjVal() print("Obj.",objNDlog) EPS = 1.e-4 assert abs(objCC-objMS)<EPS and abs(objLOG-objMS)<EPS and abs(objSOS-objMS)<EPS\ and abs(objSOS-objND)<EPS and abs(objSOS-objNDlog)<EPS edges = [] flow = {} for (i,j) in sorted(x): if model.getVal(x[i,j]) > EPS: edges.append((i,j)) flow[(i,j)] = model.getVal(x[i,j]) print("\n\n\nflp: model with piecewise linear approximation of cost function") print("Obj.",model.getObjVal(),"\nedges",sorted(edges)) print("flows:",flow) if x_pos == None: exit(0) try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() facilities = J client = I G.add_nodes_from(facilities) G.add_nodes_from(client) for (i,j) in edges: G.add_edge(i,j) position = {} for i in I + J: position[i] = (x_pos[i],y_pos[i]) NX.draw(G,position,node_color="g",nodelist=client) NX.draw(G,position,node_color="y",nodelist=facilities) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting")
19,258
32.262522
106
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/flp_nonlinear_soco.py
# todo """ flp_nonlinear.py: soco approach to the capacitated facility location problem minimize the total (weighted) travel cost from n customers to a given set of facilities, with fixed costs and limited capacities; costs are nonlinear (square root of the total quantity serviced by a facility). Approach: use a second-order cone optimization formulation. Copyright (c) by Joao Pedro PEDROSO, Masahiro MURAMATSU and Mikio KUBO, 2012 """ import math import random from pyscipopt import Model, quicksum, multidict def flp_nonlinear_soco(I,J,d,M,f,c): """flp_nonlinear_soco -- use Parameters: - I: set of customers - J: set of facilities - d[i]: demand for product i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j Returns a model, ready to be solved. """ model = Model("nonlinear flp -- soco formulation") x,X,u = {},{},{} for j in J: X[j] = model.addVar(ub=M[j], vtype="C", name="X(%s)"%j) # for sum_i x_ij u[j] = model.addVar(vtype="C", name="u(%s)"%j) # for replacing sqrt sum_i x_ij in soco for i in I: x[i,j] = model.addVar(vtype="B", name="x(%s,%s)"%(i,j)) # i's demand satisfied from j # constraints for customer's demand satisfaction for i in I: model.addCons(quicksum(x[i,j] for j in J) == 1, "Demand(%s)"%i) for j in J: model.addCons(quicksum(d[i]*x[i,j] for i in I) == X[j], "Capacity(%s)"%j) model.addQConstr(quicksum(f[j]**2*d[i]*x[i,j]*x[i,j] for i in I) <= u[j]*u[j], "SOC(%s)"%j) model.setObjective(quicksum(u[j] for j in J) +\ quicksum(c[i,j]*d[i]*x[i,j] for j in J for i in I),\ "minimize") model.data = x,u return model if __name__ == "__main__": from flp_nonlinear import distance,make_data,example,read_orlib,read_cortinhal # I,J,d,M,f,c,x_pos,y_pos = example() K = 100 random.seed(1) n = 25 m = 5 I,J,d,M,f,c,x_pos,y_pos = make_data(n,m) # I,J,d,M,f,c,x_pos,y_pos = read_orlib("DATA/cap41.txt.gz") # I,J,d,M,f,c,x_pos,y_pos = read_cortinhal("DATA/8_25/A8_25_11.DAT.gz") print("demand:",d) print("cost:",c) print("fixed:",f) print("capacity:",M) print("x:",x_pos) print("y:",y_pos) print("number of intervals:",K) from flp_nonlinear import flp_nonlinear_sos print("\n\n\nflp: model with SOS constraints") model = flp_nonlinear_sos(I,J,d,M,f,c,K) x,X,F = model.data model.hideOutput = 1 # silent/verbose mode model.optimize() objSOS = model.getObjVal() print("obj:",objSOS) EPS = 1.e-4 # assert abs(objSOS-objSOCO) < EPS edges = [] for (i,j) in sorted(x): if model.getVal(x[i,j]) > EPS: edges.append((i,j)) print("\n\n\nflp: model with piecewise linear approximation of cost function") print("obj:",model.getObjVal(),"\nedges",sorted(edges)) try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() facilities = J client = I G.add_nodes_from(facilities) G.add_nodes_from(client) for (i,j) in edges: G.add_edge(i,j) position = {} for i in I + J: position[i] = (x_pos[i],y_pos[i]) NX.draw(G,position,node_color="g",nodelist=client) NX.draw(G,position,node_color="y",nodelist=facilities) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting") print("\n\n\nflp: soco model") model = flp_nonlinear_soco(I,J,d,M,f,c) x,u = model.data model.hideOutput = 1 # silent/verbose mode model.optimize() objSOCO = model.getObjVal() print("obj:",objSOCO) EPS = 1.e-4 # assert abs(objSOS-objSOCO) < EPS edges = [] for (i,j) in sorted(x): if model.getVal(x[i,j]) > EPS: edges.append((i,j)) print("\n\n\nflp: model with piecewise linear approximation of cost function") print("obj:",model.getObjVal(),"\nedges",sorted(edges)) if x_pos == None: exit(0) try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() facilities = J client = I G.add_nodes_from(facilities) G.add_nodes_from(client) for (i,j) in edges: G.add_edge(i,j) position = {} for i in I + J: position[i] = (x_pos[i],y_pos[i]) NX.draw(G,position,node_color="g",nodelist=client) NX.draw(G,position,node_color="y",nodelist=facilities) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting")
4,919
30.33758
99
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/kcenter.py
""" kcenter.py: model for solving the k-center problem. select k facility positions such that the maximum distance of each vertex in the graph to a facility is minimum Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def kcenter(I,J,c,k): """kcenter -- minimize the maximum travel cost from customers to k facilities. Parameters: - I: set of customers - J: set of potential facilities - c[i,j]: cost of servicing customer i from facility j - k: number of facilities to be used Returns a model, ready to be solved. """ model = Model("k-center") z = model.addVar(vtype="C", name="z") x,y = {},{} for j in J: y[j] = model.addVar(vtype="B", name="y(%s)"%j) for i in I: x[i,j] = model.addVar(vtype="B", name="x(%s,%s)"%(i,j)) for i in I: model.addCons(quicksum(x[i,j] for j in J) == 1, "Assign(%s)"%i) for j in J: model.addCons(x[i,j] <= y[j], "Strong(%s,%s)"%(i,j)) model.addCons(c[i,j]*x[i,j] <= z, "Max_x(%s,%s)"%(i,j)) model.addCons(quicksum(y[j] for j in J) == k, "Facilities") model.setObjective(z, "minimize") model.data = x,y return model import math import random def distance(x1,y1,x2,y2): return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n,m,same=True): if same == True: I = range(n) J = range(m) x = [random.random() for i in range(max(m,n))] # positions of the points in the plane y = [random.random() for i in range(max(m,n))] else: I = range(n) J = range(n,n+m) x = [random.random() for i in range(n+m)] # positions of the points in the plane y = [random.random() for i in range(n+m)] c = {} for i in I: for j in J: c[i,j] = distance(x[i],y[i],x[j],y[j]) return I,J,c,x,y if __name__ == "__main__": random.seed(67) n = 100 m = n I,J,c,x_pos,y_pos = make_data(n,m,same=True) k = 10 model = kcenter(I,J,c,k) model.optimize() EPS = 1.e-6 x,y = model.data edges = [(i,j) for (i,j) in x if model.getVal(x[i,j]) > EPS] facilities = [j for j in y if model.getVal(y[j]) > EPS] print("Optimal value:", model.getObjVal()) print("Selected facilities:", facilities) print("Edges:", edges) print("max c:", max([c[i,j] for (i,j) in edges])) try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() facilities = set(j for j in J if model.getVal(y[j]) > EPS) other = set(j for j in J if j not in facilities) client = set(i for i in I if i not in facilities and i not in other) G.add_nodes_from(facilities) G.add_nodes_from(client) G.add_nodes_from(other) for (i,j) in edges: G.add_edge(i,j) position = {} for i in range(len(x_pos)): position[i] = (x_pos[i],y_pos[i]) NX.draw(G,position,with_labels=False,node_color="w",nodelist=facilities) NX.draw(G,position,with_labels=False,node_color="c",nodelist=other,node_size=50) NX.draw(G,position,with_labels=False,node_color="g",nodelist=client,node_size=50) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting")
3,449
29.263158
96
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/kcenter_binary_search.py
""" kcenter_binary_search.py: use bisection for solving the k-center problem bisects the interval [0, max facility-customer distance] until finding a distance such that all customers are covered, but decreasing that distance by a small amount delta would leave some uncovered. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def kcover(I,J,c,k): """kcover -- minimize the number of uncovered customers from k facilities. Parameters: - I: set of customers - J: set of potential facilities - c[i,j]: cost of servicing customer i from facility j - k: number of facilities to be used Returns a model, ready to be solved. """ model = Model("k-center") z,y,x = {},{},{} for i in I: z[i] = model.addVar(vtype="B", name="z(%s)"%i, obj=1) for j in J: y[j] = model.addVar(vtype="B", name="y(%s)"%j) for i in I: x[i,j] = model.addVar(vtype="B", name="x(%s,%s)"%(i,j)) for i in I: model.addCons(quicksum(x[i,j] for j in J) + z[i] == 1, "Assign(%s)"%i) for j in J: model.addCons(x[i,j] <= y[j], "Strong(%s,%s)"%(i,j)) model.addCons(sum(y[j] for j in J) == k, "k_center") model.data = x,y,z return model def solve_kcenter(I,J,c,k,delta): """solve_kcenter -- locate k facilities minimizing distance of most distant customer. Parameters: I - set of customers J - set of potential facilities c[i,j] - cost of servicing customer i from facility j k - number of facilities to be used delta - tolerance for terminating bisection Returns: - list of facilities to be used - edges linking them to customers """ model = kcover(I,J,c,k) x,y,z = model.data facilities,edges = [],[] LB = 0 UB = max(c[i,j] for (i,j) in c) model.setObjlimit(0.1) while UB-LB > delta: theta = (UB+LB) / 2. # print "\n\ncurrent theta:", theta for j in J: for i in I: if c[i,j]>theta: model.chgVarUb(x[i,j], 0.0) else: model.chgVarUb(x[i,j], 1.0) # model.Params.OutputFlag = 0 # silent mode model.setObjlimit(.1) model.optimize() if model.getStatus == "optimal": # infeasibility = sum([z[i].X for i in I]) # print "infeasibility=",infeasibility UB = theta facilities = [j for j in y if model.getVal(y[j]) > .5] edges = [(i,j) for (i,j) in x if model.getVal(x[i,j]) > .5] # print "updated solution:" # print "facilities",facilities # print "edges",edges else: # infeasibility > 0: LB = theta return facilities,edges import math import random def distance(x1,y1,x2,y2): return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n,m,same=True): if same == True: I = range(n) J = range(m) x = [random.random() for i in range(max(m,n))] # positions of the points in the plane y = [random.random() for i in range(max(m,n))] else: I = range(n) J = range(n,n+m) x = [random.random() for i in range(n+m)] # positions of the points in the plane y = [random.random() for i in range(n+m)] c = {} for i in I: for j in J: c[i,j] = distance(x[i],y[i],x[j],y[j]) return I,J,c,x,y if __name__ == "__main__": random.seed(67) n = 200 m = n I,J,c,x_pos,y_pos = make_data(n,m,same=True) k = 20 delta = 1.e-4 facilities,edges = solve_kcenter(I,J,c,k,delta) print("Selected facilities:", facilities) print("Edges:", edges) print("Max distance from a facility to a customer: ", max([c[i,j] for (i,j) in edges])) try: # plot the result using networkx and matplotlib import networkx as NX import matplotlib.pyplot as P P.clf() G = NX.Graph() facilities = set(facilities) unused = set(j for j in J if j not in facilities) client = set(i for i in I if i not in facilities and i not in unused) G.add_nodes_from(facilities) G.add_nodes_from(client) G.add_nodes_from(unused) for (i,j) in edges: G.add_edge(i,j) position = {} for i in range(len(x_pos)): position[i] = (x_pos[i],y_pos[i]) NX.draw(G,position,with_labels=False,node_color="w",nodelist=facilities) NX.draw(G,position,with_labels=False,node_color="c",nodelist=unused,node_size=50) NX.draw(G,position,with_labels=False,node_color="g",nodelist=client,node_size=50) P.show() except ImportError: print("install 'networkx' and 'matplotlib' for plotting")
4,857
30.141026
96
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/lotsizing.py
""" lotsizing.py: solve the multi-item lot-sizing problem. Approaches: - mils: solve the problem using the standard formulation - mils_fl: solve the problem using the facility location (tighten) formulation Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import random from pyscipopt import Model, quicksum def mils(T,P,f,g,c,d,h,M): """ mils: standard formulation for the multi-item lot-sizing problem Parameters: - T: number of periods - P: set of products - f[t,p]: set-up costs (on period t, for product p) - g[t,p]: set-up times - c[t,p]: variable costs - d[t,p]: demand values - h[t,p]: holding costs - M[t]: resource upper bound on period t Returns a model, ready to be solved. """ def mils_callback(model,where): # remember to set model.params.DualReductions = 0 before using! if where != GRB.Callback.MIPSOL and where != GRB.Callback.MIPNODE: return for p in P: for ell in Ts: lhs = 0 S,L = [],[] for t in range(1,ell+1): yt = model.cbGetSolution(y[t,p]) xt = model.cbGetSolution(x[t,p]) if D[t,ell,p]*yt < xt: S.append(t) lhs += D[t,ell,p]*yt else: L.append(t) lhs += xt if lhs < D[1,ell,p]: # add cutting plane constraint model.cbLazy(quicksum(x[t,p] for t in L) +\ quicksum(D[t,ell,p] * y[t,p] for t in S) >= D[1,ell,p]) return model = Model("standard multi-item lotsizing") y,x,I = {},{},{} Ts = range(1,T+1) for p in P: for t in Ts: y[t,p] = model.addVar(vtype="B", name="y(%s,%s)"%(t,p)) x[t,p] = model.addVar(vtype="C", name="x(%s,%s)"%(t,p)) I[t,p] = model.addVar(vtype="C", name="I(%s,%s)"%(t,p)) I[0,p] = 0 for t in Ts: # time capacity constraints model.addCons(quicksum(g[t,p]*y[t,p] + x[t,p] for p in P) <= M[t], "TimeUB(%s)"%(t)) for p in P: # flow conservation constraints model.addCons(I[t-1,p] + x[t,p] == I[t,p] + d[t,p], "FlowCons(%s,%s)"%(t,p)) # capacity connection constraints model.addCons(x[t,p] <= (M[t]-g[t,p])*y[t,p], "ConstrUB(%s,%s)"%(t,p)) # tighten constraints model.addCons(x[t,p] <= d[t,p]*y[t,p] + I[t,p], "Tighten(%s,%s)"%(t,p)) model.setObjective(\ quicksum(f[t,p]*y[t,p] + c[t,p]*x[t,p] + h[t,p]*I[t,p] for t in Ts for p in P),\ "minimize") # compute D[i,j,p] = sum_{t=i}^j d[t,p] D = {} for p in P: for t in Ts: s = 0 for j in range(t,T+1): s += d[j,p] D[t,j,p] = s model.data = y,x,I return model,mils_callback def mils_fl(T,P,f,g,c,d,h,M): """ mils_fl: facility location formulation for the multi-item lot-sizing problem Requires more variables, but gives a better solution because LB is better than the standard formulation. It can be used as a heuristic method that is sometimes better than relax-and-fix. Parameters: - T: number of periods - P: set of products - f[t,p]: set-up costs (on period t, for product p) - g[t,p]: set-up times - c[t,p]: variable costs - d[t,p]: demand values - h[t,p]: holding costs - M[t]: resource upper bound on period t Returns a model, ready to be solved. """ Ts = range(1,T+1) model = Model("multi-item lotsizing -- facility location formulation") y,X = {},{} for p in P: for t in Ts: y[t,p] = model.addVar(vtype="B", name="y(%s,%s)"%(t,p)) for s in range(1,t+1): X[s,t,p] = model.addVar(name="X(%s,%s,%s)"%(s,t,p)) for t in Ts: # capacity constraints model.addCons(quicksum(X[t,s,p] for s in range(t,T+1) for p in P) + \ quicksum(g[t,p]*y[t,p] for p in P) <= M[t], "Capacity(%s)"%(t)) for p in P: # demand satisfaction constraints model.addCons(quicksum(X[s,t,p] for s in range(1,t+1)) == d[t,p], "Demand(%s,%s)"%(t,p)) # connection constraints for s in range(1,t+1): model.addCons(X[s,t,p] <= d[t,p] * y[s,p], "Connect(%s,%s,%s)"%(s,t,p)) C = {} # variable costs plus holding costs for p in P: for s in Ts: sumC = 0 for t in range(s,T+1): C[s,t,p] = (c[s,p] + sumC) sumC += h[t,p] model.setObjective(quicksum(f[t,p]*y[t,p] for t in Ts for p in P) + \ quicksum(C[s,t,p]*X[s,t,p] for t in Ts for p in P for s in range(1,t+1)), "minimize") model.data = y,X model.write("tmp.lp") return model def trigeiro(T,N,factor): """ Data generator for the multi-item lot-sizing problem it uses a simular algorithm for generating the standard benchmarks in: "Capacitated Lot Sizing with Setup Times" by William W. Trigeiro, L. Joseph Thomas, John O. McClain MANAGEMENT SCIENCE Vol. 35, No. 3, March 1989, pp. 353-366 Parameters: - T: number of periods - N: number of products - factor: value for controlling constraining factor of capacity: - 0.75: lightly-constrained instances - 1.10: constrained instances """ P = range(1,N+1) f,g,c,d,h,M = {},{},{},{},{},{} sumT = 0 for t in range(1,T+1): for p in P: # capacity used per unit production: 1, except for # except for specific instances with random value in [0.5, 1.5] # (not tackled in our model) # setup times g[t,p] = 10 * random.randint(1,5) # 10, 50: trigeiro's values # set-up costs f[t,p] = 100 * random.randint(1,10) # checked from Wolsey's instances c[t,p] = 0 # variable costs # demands d[t,p] = 100+random.randint(-25,25) # checked from Wolsey's instances if t <= 4: if random.random() < .25: # trigeiro's parameter d[t,p] = 0 sumT += g[t,p] + d[t,p] # sumT is the total capacity usage in the lot-for-lot solution h[t,p] = random.randint(1,5) # holding costs; checked from Wolsey's instances for t in range(1,T+1): M[t] = int(float(sumT)/float(T)/factor) return P,f,g,c,d,h,M if __name__ == "__main__": # test only a subset of instances T,N,factor = 15,6,0.75 P,f,g,c,d,h,M = trigeiro(T,N,factor) print("\n\n\nStandard formulation + cutting plane ======================") model,mils_callback = mils(T,P,f,g,c,d,h,M) model.setBoolParam("misc/allowdualreds", 0) model.optimize(mils_callback) y,x,I = model.data print("Optimal value:",model.getObjVal()) standard = model.getObjVal() print("%7s%7s%7s%7s%12s%12s" % ("prod","t","dem","y","x","I")) for p in P: for t in range(1,T+1): print("%7s%7s%7s%7s%12s%12s" % \ (p,t,d[t,p],int(y[t,p].X+0.5),round(x[t,p].X,5),round(I[t,p].X,5))) exit(0) # to test all instances: remove 'exit' above # sizes: 4 to 36 items, 15 to 30 time periods; table 2: T = 15, 30, N = 6, 12, 24 # all costs constant over time for T in [15,30]: for N in [6,12,24]: for factor in [0.75,1.0,1.1]: # 0.75: lightly-constrained instances # 1.1: constrained instances random.seed(1) # T,P = 10,5 # number of periods and number of products # # T,P = 30,24 # number of periods and number of products # P,f,g,c,d,h,M = make_data(T,P) P,f,g,c,d,h,M = trigeiro(T,N,factor) #for i in d: # d[i] = 100 # print("f",f # print("g",g # print("c",c # print("d",d # print("h",h # print("M",M print("\n\n\n*** Trigeiros instance for %s periods, %s products, %s capacity factor" %\ (T,N,factor)) # standard formulation print("\n\n\nStandard formulation======================") model,_ = mils(T,P,f,g,c,d,h,M) model.optimize() y,x,I = model.data status = model.getStatus() if status == "unbounded": print("Unbounded instance") elif status == "optimal": print("Optimal value:",model.getObjVal()) standard = model.getObjVal() print("%7s%7s%7s%7s%12s%12s" % ("prod","t","dem","y","x","I")) for p in P: for t in range(1,T+1): print("%7s%7s%7s%7s%12s%12s" % \ (p,t,d[t,p],int(y[t,p].X+0.5),round(x[t,p].X,5),round(I[t,p].X,5))) elif status != "unbounded" and status != "infeasible": print("Optimization stopped with status",status) else: print("Instance infeasible") # standard formulation + cutting plane print("\n\n\nStandard formulation + cutting plane ======================") model,mils_callback = mils(T,P,f,g,c,d,h,M) model.params.DualReductions = 0 model.optimize(mils_callback) y,x,I = model.data status = model.getStatus() if status == "unbounded": print("Unbounded instance") elif status == "optimal": print("Optimal value:",model.getObjVal()) standard = model.getObjVal() print("%7s%7s%7s%7s%12s%12s" % ("prod","t","dem","y","x","I")) for p in P: for t in range(1,T+1): print("%7s%7s%7s%7s%12s%12s" % \ (p,t,d[t,p],int(y[t,p].X+0.5),round(x[t,p].X,5),round(I[t,p].X,5))) assert abs(model.objval - standard) < 1.e-6 elif status != "unbounded" and status != "infeasible": print("Optimization stopped with status",status) else: print("Instance infeasible") # facility location formulation print("\n\n\nFacility location formulation======================") model = mils_fl(T,P,f,g,c,d,h,M) model.optimize() y,X = model.data status = model.getStatus() if status == "unbounded": print("Unbounded instance") elif status == "optimal": print("Optimal value:",model.getObjVal()) print("%7s%7s%7s%7s%12s%12s" % ("prod","t","dem","y","sum(X)","inv.mov")) for p in P: for t in range(1,T+1): xd = sum(X[t,s,p].X for s in range(t,T+1)) I = xd - d[t,p] print("%7s%7s%7s%7s%12s%12s" % \ (p,t,d[t,p],int(y[t,p].X+0.5),round(xd,5),round(I))) assert abs(model.objval - standard) < 1.e-6 elif status != "unbounded" and status != "infeasible": print("Optimization stopped with status",status) else: print("Instance infeasible")
12,056
36.444099
110
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/lotsizing_cut.py
""" lotsizing_cut.py: solve the single-item lot-sizing problem. Approaches: - sils: solve the problem using the standard formulation - sils_cut: solve the problem using cutting planes Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def sils(T,f,c,d,h): """sils -- LP lotsizing for the single item lot sizing problem Parameters: - T: number of periods - P: set of products - f[t]: set-up costs (on period t) - c[t]: variable costs - d[t]: demand values - h[t]: holding costs Returns a model, ready to be solved. """ model = Model("single item lotsizing") Ts = range(1,T+1) M = sum(d[t] for t in Ts) y,x,I = {},{},{} for t in Ts: y[t] = model.addVar(vtype="I", ub=1, name="y(%s)"%t) x[t] = model.addVar(vtype="C", ub=M, name="x(%s)"%t) I[t] = model.addVar(vtype="C", name="I(%s)"%t) I[0] = 0 for t in Ts: model.addCons(x[t] <= M*y[t], "ConstrUB(%s)"%t) model.addCons(I[t-1] + x[t] == I[t] + d[t], "FlowCons(%s)"%t) model.setObjective(\ quicksum(f[t]*y[t] + c[t]*x[t] + h[t]*I[t] for t in Ts),\ "minimize") model.data = y,x,I return model def sils_cut(T,f,c,d,h): """solve_sils -- solve the lot sizing problem with cutting planes - start with a relaxed model - add cuts until there are no fractional setup variables Parameters: - T: number of periods - P: set of products - f[t]: set-up costs (on period t) - c[t]: variable costs - d[t]: demand values - h[t]: holding costs Returns the final model solved, with all necessary cuts added. """ Ts = range(1,T+1) model = sils(T,f,c,d,h) y,x,I = model.data # relax integer variables for t in Ts: y[t].vtype = "C" # compute D[i,j] = sum_{t=i}^j d[t] D = {} for t in Ts: s = 0 for j in range(t,T+1): s += d[j] D[t,j] = s EPS = 1.e-6 cuts = True while cuts: model.optimize() cuts = False for ell in Ts: lhs = 0 S,L = [],[] for t in range(1,ell+1): yt = model.getVal(y[t]) xt = model.getVal(x[t]) if D[t,ell]*yt < xt: S.append(t) lhs += D[t,ell]*yt else: L.append(t) lhs += xt if lhs < D[1,ell]: # add cutting plane constraint model.addCons(quicksum([x[t] for t in L]) +\ quicksum(D[t,ell] * y[t] for t in S) >= D[1,ell]) cuts = True model.data = y,x,I return model def mk_example(): """mk_example: book example for the single item lot sizing""" T = 5 _,f,c,d,h = multidict({ 1 : [3,1,5,1], 2 : [3,1,7,1], 3 : [3,3,3,1], 4 : [3,3,6,1], 5 : [3,3,4,1], }) return T,f,c,d,h if __name__ == "__main__": T,f,c,d,h = mk_example() model = sils(T,f,c,d,h) y,x,I = model.data model.optimize() print("\nOptimal value [standard]=",model.getObjVal()) print("%8s%8s%8s%8s%8s%8s%12s%12s" % ("t","fix","var","h","dem","y","x","I")) for t in range(1,T+1): print("%8s%8s%8s%8s%8s%8s%12s%12s" % (t,f[t],c[t],h[t],d[t],model.getVal(y[t]),model.getVal(x[t]),model.getVal(I[t]))) model = sils_cut(T,f,c,d,h) y,x,I = model.data print("\nnOptimal value [cutting planes]=",model.getObjVal()) print("%8s%8s%8s%8s%8s%8s%12s%12s" % ("t","fix","var","h","dem","y","x","I")) for t in range(1,T+1): print("%8s%8s%8s%8s%8s%8s%12s%12s" % (t,f[t],c[t],h[t],d[t],model.getVal(y[t]),model.getVal(x[t]),model.getVal(I[t])))
3,915
28.223881
126
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/lotsizing_echelon.py
""" lotsizing.py: solve the multi-item, multi-stage lot-sizing problem. Approaches: - mils_standard: standard formulation - mils_echelon: echelon formulation Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import random from pyscipopt import Model, quicksum, multidict def mils_standard(T,K,P,f,g,c,d,h,a,M,UB,phi): """ mils_standard: standard formulation for the multi-item, multi-stage lot-sizing problem Parameters: - T: number of periods - K: set of resources - P: set of items - f[t,p]: set-up costs (on period t, for product p) - g[t,p]: set-up times - c[t,p]: variable costs - d[t,p]: demand values - h[t,p]: holding costs - a[t,k,p]: amount of resource k for producing p in period t - M[t,k]: resource k upper bound on period t - UB[t,p]: upper bound of production time of product p in period t - phi[(i,j)]: units of i required to produce a unit of j (j parent of i) """ model = Model("multi-stage lotsizing -- standard formulation") y,x,I = {},{},{} Ts = range(1,T+1) for p in P: for t in Ts: y[t,p] = model.addVar(vtype="B", name="y(%s,%s)"%(t,p)) x[t,p] = model.addVar(vtype="C",name="x(%s,%s)"%(t,p)) I[t,p] = model.addVar(vtype="C",name="I(%s,%s)"%(t,p)) I[0,p] = model.addVar(name="I(%s,%s)"%(0,p)) for t in Ts: for p in P: # flow conservation constraints model.addCons(I[t-1,p] + x[t,p] == \ quicksum(phi[p,q]*x[t,q] for (p2,q) in phi if p2 == p) \ + I[t,p] + d[t,p], "FlowCons(%s,%s)"%(t,p)) # capacity connection constraints model.addCons(x[t,p] <= UB[t,p]*y[t,p], "ConstrUB(%s,%s)"%(t,p)) # time capacity constraints for k in K: model.addCons(quicksum(a[t,k,p]*x[t,p] + g[t,p]*y[t,p] for p in P) <= M[t,k], "TimeUB(%s,%s)"%(t,k)) # initial inventory quantities for p in P: model.addCons(I[0,p] == 0, "InventInit(%s)"%(p)) model.setObjective(\ quicksum(f[t,p]*y[t,p] + c[t,p]*x[t,p] + h[t,p]*I[t,p] for t in Ts for p in P), \ "minimize") model.data = y,x,I return model def sum_phi(k,rho,pred,phi): for j in pred[k]: if (j,k) in rho: continue rho[j,k] = phi[j,k] sum_phi(j,rho,pred,phi) for i in pred[j]: if (i,k) in rho: rho[i,k] += rho[i,j] * phi[j,k] else: rho[i,k] = rho[i,j] * phi[j,k] return def calc_rho(phi): v = set() for (i,j) in phi: v.add(i) v.add(j) pred,succ = {},{} for i in v: pred[i] = set() succ[i] = set() for (i,j) in phi: pred[j].add(i) succ[i].add(j) # set of vertices corresponding to end products: final = set(i for i in v if len(succ[i]) == 0) rho = {} for j in final: sum_phi(j,rho,pred,phi) return rho def mils_echelon(T,K,P,f,g,c,d,h,a,M,UB,phi): """ mils_echelon: echelon formulation for the multi-item, multi-stage lot-sizing problem Parameters: - T: number of periods - K: set of resources - P: set of items - f[t,p]: set-up costs (on period t, for product p) - g[t,p]: set-up times - c[t,p]: variable costs - d[t,p]: demand values - h[t,p]: holding costs - a[t,k,p]: amount of resource k for producing p in period t - M[t,k]: resource k upper bound on period t - UB[t,p]: upper bound of production time of product p in period t - phi[(i,j)]: units of i required to produce a unit of j (j parent of i) """ rho = calc_rho(phi) # rho[(i,j)]: units of i required to produce a unit of j (j ancestor of i) model = Model("multi-stage lotsizing -- echelon formulation") y,x,E,H = {},{},{},{} Ts = range(1,T+1) for p in P: for t in Ts: y[t,p] = model.addVar(vtype="B", name="y(%s,%s)"%(t,p)) x[t,p] = model.addVar(vtype="C", name="x(%s,%s)"%(t,p)) H[t,p] = h[t,p] - sum([h[t,q]*phi[q,p] for (q,p2) in phi if p2 == p]) E[t,p] = model.addVar(vtype="C", name="E(%s,%s)"%(t,p)) # echelon inventory E[0,p] = model.addVar(vtype="C", name="E(%s,%s)"%(0,p)) # echelon inventory for t in Ts: for p in P: # flow conservation constraints dsum = d[t,p] + sum([rho[p,q]*d[t,q] for (p2,q) in rho if p2 == p]) model.addCons(E[t-1,p] + x[t,p] == E[t,p] + dsum, "FlowCons(%s,%s)"%(t,p)) # capacity connection constraints model.addCons(x[t,p] <= UB[t,p]*y[t,p], "ConstrUB(%s,%s)"%(t,p)) # time capacity constraints for k in K: model.addCons(quicksum(a[t,k,p]*x[t,p] + g[t,p]*y[t,p] for p in P) <= M[t,k], "TimeUB(%s,%s)"%(t,k)) # calculate echelon quantities for p in P: model.addCons(E[0,p] == 0, "EchelonInit(%s)"%(p)) for t in Ts: model.addCons(E[t,p] >= quicksum(phi[p,q]*E[t,q] for (p2,q) in phi if p2 == p), "EchelonLB(%s,%s)"%(t,p)) model.setObjective(\ quicksum(f[t,p]*y[t,p] + c[t,p]*x[t,p] + H[t,p]*E[t,p] for t in Ts for p in P), \ "minimize") model.data = y,x,E return model def make_data(): """ 1..T: set of periods K: set of resources P: set of items f[t,p]: set-up costs g[t,p]: set-up times c[t,p]: variable costs d[t,p]: demand values h[t,p]: holding costs a[t,k,p]: amount of resource k for producing product p in period. t M[t,k]: resource upper bounds UB[t,p]: upper bound of production time of product p in period t phi[(i,j)] : units of i required to produce a unit of j (j parent of i) """ T = 5 K = [1] P = [1,2,3,4,5] _,f,g,c,d,h,UB = multidict({ (1,1): [10, 1, 2, 0, 0.5, 24], (1,2): [10, 1, 2, 0, 0.5, 24], (1,3): [10, 1, 2, 0, 0.5, 24], (1,4): [10, 1, 2, 0, 0.5, 24], (1,5): [10, 1, 2, 0, 0.5, 24], (2,1): [10, 1, 2, 0, 0.5, 24], (2,2): [10, 1, 2, 0, 0.5, 24], (2,3): [10, 1, 2, 0, 0.5, 24], (2,4): [10, 1, 2, 0, 0.5, 24], (2,5): [10, 1, 2, 0, 0.5, 24], (3,1): [10, 1, 2, 0, 0.5, 24], (3,2): [10, 1, 2, 0, 0.5, 24], (3,3): [10, 1, 2, 0, 0.5, 24], (3,4): [10, 1, 2, 0, 0.5, 24], (3,5): [10, 1, 2, 0, 0.5, 24], (4,1): [10, 1, 2, 0, 0.5, 24], (4,2): [10, 1, 2, 0, 0.5, 24], (4,3): [10, 1, 2, 0, 0.5, 24], (4,4): [10, 1, 2, 0, 0.5, 24], (4,5): [10, 1, 2, 0, 0.5, 24], (5,1): [10, 1, 2, 0, 0.5, 24], (5,2): [10, 1, 2, 0, 0.5, 24], (5,3): [10, 1, 2, 0, 0.5, 24], (5,4): [10, 1, 2, 0, 0.5, 24], (5,5): [10, 1, 2, 5, 0.5, 24], }) a = { (1,1,1): 1, (1,1,2): 1, (1,1,3): 1, (1,1,4): 1, (1,1,5): 1, (2,1,1): 1, (2,1,2): 1, (2,1,3): 1, (2,1,4): 1, (2,1,5): 1, (3,1,1): 1, (3,1,2): 1, (3,1,3): 1, (3,1,4): 1, (3,1,5): 1, (4,1,1): 1, (4,1,2): 1, (4,1,3): 1, (4,1,4): 1, (4,1,5): 1, (5,1,1): 1, (5,1,2): 1, (5,1,3): 1, (5,1,4): 1, (5,1,5): 1, } M = { (1,1): 15, (2,1): 15, (3,1): 15, (4,1): 15, (5,1): 15, } phi = { # phi[(i,j)] : units of i required to produce a unit of j (j parent of i) (1,3):2, (2,3):3, (2,4):3/2., (3,5):1/2., (4,5):3 } return T,K,P,f,g,c,d,h,a,M,UB,phi def make_data_10(): """ 1..T: set of periods K: set of resources P: set of items f[t,p]: set-up costs g[t,p]: set-up times c[t,p]: variable costs d[t,p]: demand values h[t,p]: holding costs a[t,k,p]: amount of resource k for producing product p in period. t M[t,k]: resource upper bounds UB[t,p]: upper bound of production time of product p in period t phi[(i,j)] : units of i required to produce a unit of j (j parent of i) """ T = 5 K = [1] P = [1,2,3,4,5,6,7,8,9,10] _, f, g, c, d, h, UB = multidict({ (1,1): [10, 1, 2, 0, 0.5, 24], (1,2): [10, 1, 2, 0, 0.5, 24], (1,3): [10, 1, 2, 0, 0.5, 24], (1,4): [10, 1, 2, 0, 0.5, 24], (1,5): [10, 1, 2, 0, 0.5, 24], (1,6): [10, 1, 2, 0, 0.5, 24], (1,7): [10, 1, 2, 0, 0.5, 24], (1,8): [10, 1, 2, 0, 0.5, 24], (1,9): [10, 1, 2, 0, 0.5, 24], (1,10):[10, 1, 2, 0, 0.5, 24], (2,1): [10, 1, 2, 0, 0.5, 24], (2,2): [10, 1, 2, 0, 0.5, 24], (2,3): [10, 1, 2, 0, 0.5, 24], (2,4): [10, 1, 2, 0, 0.5, 24], (2,5): [10, 1, 2, 0, 0.5, 24], (2,6): [10, 1, 2, 0, 0.5, 24], (2,7): [10, 1, 2, 0, 0.5, 24], (2,8): [10, 1, 2, 0, 0.5, 24], (2,9): [10, 1, 2, 0, 0.5, 24], (2,10):[10, 1, 2, 0, 0.5, 24], (3,1): [10, 1, 2, 0, 0.5, 24], (3,2): [10, 1, 2, 0, 0.5, 24], (3,3): [10, 1, 2, 0, 0.5, 24], (3,4): [10, 1, 2, 0, 0.5, 24], (3,5): [10, 1, 2, 0, 0.5, 24], (3,6): [10, 1, 2, 0, 0.5, 24], (3,7): [10, 1, 2, 0, 0.5, 24], (3,8): [10, 1, 2, 0, 0.5, 24], (3,9): [10, 1, 2, 0, 0.5, 24], (3,10):[10, 1, 2, 0, 0.5, 24], (4,1): [10, 1, 2, 0, 0.5, 24], (4,2): [10, 1, 2, 0, 0.5, 24], (4,3): [10, 1, 2, 0, 0.5, 24], (4,4): [10, 1, 2, 0, 0.5, 24], (4,5): [10, 1, 2, 0, 0.5, 24], (4,6): [10, 1, 2, 0, 0.5, 24], (4,7): [10, 1, 2, 0, 0.5, 24], (4,8): [10, 1, 2, 0, 0.5, 24], (4,9): [10, 1, 2, 0, 0.5, 24], (4,10):[10, 1, 2, 0, 0.5, 24], (5,1): [10, 1, 2, 0, 0.5, 24], (5,2): [10, 1, 2, 0, 0.5, 24], (5,3): [10, 1, 2, 0, 0.5, 24], (5,4): [10, 1, 2, 0, 0.5, 24], (5,5): [10, 1, 2, 0, 0.5, 24], (5,6): [10, 1, 2, 0, 0.5, 24], (5,7): [10, 1, 2, 0, 0.5, 24], (5,8): [10, 1, 2, 0, 0.5, 24], (5,9): [10, 1, 2, 0, 0.5, 24], (5,10):[10, 1, 2, 5, 0.5, 24], }) a = { (1,1,1): 1, (1,1,2): 1, (1,1,3): 1, (1,1,4): 1, (1,1,5): 1, (1,1,6): 1, (1,1,7): 1, (1,1,8): 1, (1,1,9): 1, (1,1,10): 1, (2,1,1): 1, (2,1,2): 1, (2,1,3): 1, (2,1,4): 1, (2,1,5): 1, (2,1,6): 1, (2,1,7): 1, (2,1,8): 1, (2,1,9): 1, (2,1,10): 1, (3,1,1): 1, (3,1,2): 1, (3,1,3): 1, (3,1,4): 1, (3,1,5): 1, (3,1,6): 1, (3,1,7): 1, (3,1,8): 1, (3,1,9): 1, (3,1,10): 1, (4,1,1): 1, (4,1,2): 1, (4,1,3): 1, (4,1,4): 1, (4,1,5): 1, (4,1,6): 1, (4,1,7): 1, (4,1,8): 1, (4,1,9): 1, (4,1,10): 1, (5,1,1): 1, (5,1,2): 1, (5,1,3): 1, (5,1,4): 1, (5,1,5): 1, (5,1,6): 1, (5,1,7): 1, (5,1,8): 1, (5,1,9): 1, (5,1,10): 1, } M = { (1,1): 25, (2,1): 25, (3,1): 25, (4,1): 25, (5,1): 25, (6,1): 25, (7,1): 25, (8,1): 25, (9,1): 25, (10,1):25, } phi = { # phi[(i,j)] : units of i required to produce a unit of j (j parent of i) (1,2):1, (2,5):2, (3,4):3, (4,5):1, (5,6):1, (6,10):1/2., (3,7):1, (7,8):3/2., (8,9):3, (9,10):1 } return T,K,P,f,g,c,d,h,a,M,UB,phi if __name__ == "__main__": random.seed(1) # T,K,P,f,g,c,d,h,a,M,UB,phi = make_data() T,K,P,f,g,c,d,h,a,M,UB,phi = make_data_10() # print("periods",T # print("products:",P # print("resources:",K # print("demand",d # print("a (resource used)",a # print("g (setup time)",g # print("M",M # print("UB",UB # print("phi",phi # print("rho",calc_rho(phi) print("\n\nstandard model") model = mils_standard(T,K,P,f,g,c,d,h,a,M,UB,phi) # model.setParam("MIPGap",0.0) # model.write("lotsize_standard.lp") model.optimize() status = model.getStatus() if status == "unbounded": print("The model cannot be solved because it is unbounded") elif status == "optimal": print("Optimal value:", model.getObjVal()) standard = model.getObjVal() y,x,I = model.data print("%7s%7s%7s%7s%12s%12s" % ("prod","t","dem","y","x","I")) for p in P: print("%7s%7s%7s%7s%12s%12s" % (p,0,"-","-","-",round(model.getVal(I[0,p]),5))) for t in range(1,T+1): print("%7s%7s%7s%7s%12s%12s" % (p,t,d[t,p],int(model.getVal(y[t,p])+0.5),round(model.getVal(x[t,p]),5),round(model.getVal(I[t,p]),5))) print("\n") for k in K: for t in range(1,T+1): print("resource %3s used in period %s: %12s / %-9s" % (k,t,sum(a[t,k,p]*model.getVal(x[t,p])+g[t,p]*model.getVal(y[t,p]) for p in P),M[t,k])) elif status != "unbounded" and status != "infeasible": print("Optimization was stopped with status",status) else: print("The model is infeasible") # model.computeIIS() # print("\nThe following constraint(s) cannot be satisfied:") # for cnstr in model.getConstrs(): # if cnstr.IISConstr: # print(cnstr.ConstrName) print("\n\nechelon model") model = mils_echelon(T,K,P,f,g,c,d,h,a,M,UB,phi) model.setRealParam("limits/gap", 0.0) # model.write("lotsize_echelon.lp") model.optimize() status = model.getStatus() if status == "unbounded": print("The model cannot be solved because it is unbounded") elif status == "optimal": print("Opt.value=",model.getObjVal()) y,x,E = model.data print("%7s%7s%7s%7s%12s%12s" % ("t","prod","dem","y","x","E")) for p in P: print("%7s%7s%7s%7s%12s%12s" % ("t",p,"-","-","-",round(model.getVal(E[0,p]),5))) for t in range(1,T+1): print("%7s%7s%7s%7s%12s%12s" %\ (t,p,d[t,p],int(model.getVal(y[t,p])+0.5),round(model.getVal(x[t,p]),5),round(model.getVal(E[t,p]),5))) print("\n") for k in K: for t in range(1,T+1): print("resource %3s used in period %s: %12s / %-9s" % \ (k,t,sum(a[t,k,p]*model.getVal(x[t,p]) + g[t,p]*model.getVal(y[t,p]) for p in P),M[t,k])) print(model.getObjVal() - standard) assert abs(model.getObjVal() - standard) < 1.e-6 elif status != "unbounded" and status != "infeasible": print("Optimization was stopped with status",status) else: print("The model is infeasible") # model.computeIIS() # print("\nThe following constraint(s) cannot be satisfied:") # for cnstr in model.getConstrs(): # if cnstr.IISConstr: # print(cnstr.ConstrName)
15,109
32.135965
157
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/mctransp_tuplelist.py
""" transp.py: a model for the multi-commodity transportation problem Model for solving the multi-commodity transportation problem: minimize the total transportation cost for satisfying demand at customers, from capacitated facilities. Use tuplelist for selecting arcs. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model def mctransp(I,J,K,c,d,M): """mctransp -- model for solving the Multi-commodity Transportation Problem Parameters: - I: set of customers - J: set of facilities - K: set of commodities - c[i,j,k]: unit transportation cost on arc (i,j) for commodity k - d[i][k]: demand for commodity k at node i - M[j]: capacity Returns a model, ready to be solved. """ model = Model("multi-commodity transportation") # Create variables x = {} for (i,j,k) in c: x[i,j,k] = model.addVar(vtype="C", name="x(%s,%s,%s)" % (i,j,k), obj=c[i,j,k]) # tuplelist is a Gurobi data structure to manage lists of equal sized tuples - try itertools as alternative arcs = tuplelist([(i,j,k) for (i,j,k) in x]) # Demand constraints for i in I: for k in K: model.addCons(sum(x[i,j,k] for (i,j,k) in arcs.select(i,"*",k)) == d[i,k], "Demand(%s,%s)" % (i,k)) # Capacity constraints for j in J: model.addCons(sum(x[i,j,k] for (i,j,k) in arcs.select("*",j,"*")) <= M[j], "Capacity(%s)" % j) model.data = x return model def make_inst1(): d = {(1,1):80, (1,2):85, (1,3):300, (1,4):6, # {customer: {commodity:demand <float>}} (2,1):270, (2,2):160, (2,3):400, (2,4):7, (3,1):250, (3,2):130, (3,3):350, (3,4):4, (4,1):160, (4,2):60, (4,3):200, (4,4):3, (5,1):180, (5,2):40, (5,3):150, (5,4):5 } I = set([i for (i,k) in d]) K = set([k for (i,k) in d]) M = {1:3000, 2:3000, 3:3000} # capacity J = M.keys() produce = {1:[2,4], 2:[1,2,3], 3:[2,3,4]} # products that can be produced in each facility weight = {1:5, 2:2, 3:3, 4:4} # {commodity: weight<float>} cost = {(1,1):4, (1,2):6, (1,3):9, # {(customer,factory): cost<float>} (2,1):5, (2,2):4, (2,3):7, (3,1):6, (3,2):3, (3,3):4, (4,1):8, (4,2):5, (4,3):3, (5,1):10, (5,2):8, (5,3):4 } c = {} for i in I: for j in J: for k in produce[j]: c[i,j,k] = cost[i,j] * weight[k] return I,J,K,c,d,M def make_inst2(): d = {(1,1):45, # {customer: {commodity:demand <float>}} (2,1):20, (3,1):30, (4,1):30, } I = set([i for (i,k) in d]) K = set([k for (i,k) in d]) M = {1:35, 2:50, 3:40} # {factory: capacity<float>}} J = M.keys() produce = {1:[1], 2:[1], 3:[1]} # products that can be produced in each facility weight = {1:1} # {commodity: weight<float>} cost = {(1,1):8, (1,2):9, (1,3):14, # {(customer,factory): cost<float>} (2,1):6, (2,2):12, (2,3):9 , (3,1):10, (3,2):13, (3,3):16, (4,1):9, (4,2):7, (4,3):5 , } c = {} for i in I: for j in J: for k in produce[j]: c[i,j,k] = cost[i,j] * weight[k] return I,J,K,c,d,M if __name__ == "__main__": I,J,K,c,d,M = make_inst1(); model = mctransp(I,J,K,c,d,M) model.writeProblem("transp.lp") model.optimize() print("Optimal value:",model.getObjVal()) EPS = 1.e-6 x = model.data for (i,j,k) in x: if model.getVal(x[i,j,k]) > EPS: print("sending %10s units of %3s from plant %3s to customer %3s" % (model.getVal(x[i,j,k]),k,j,i))
3,806
30.46281
111
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/pareto_front.py
""" pareto_front.py: tools for building a pareto front in multi-objective optimization Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ def dominates(a,b): dominating = False for i in range(len(a)): if a[i] > b[i]: return False if a[i] < b[i]: dominating = True return dominating def is_dominated(a,front): for b in front: if dominates(b,a): return True return False def pareto_front(cand): front = set([]) for i in cand: add_i = True for j in list(front): if dominates(i,j): front.remove(j) if dominates(j,i): add_i = False if add_i: front.add(i) front = list(front) front.sort() return front if __name__ == "__main__": import random # random.seed(1) cand = [(random.random()**.25,random.random()**.25) for i in range(100)] import matplotlib.pyplot as plt for (x,y) in cand: plt.plot(x,y,"bo") front = pareto_front(cand) plt.plot([x for (x,y) in front], [y for (x,y) in front]) plt.show()
1,143
21.88
83
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/portfolio_soco.py
""" portfolio_soco.py: modified markowitz model for portfolio optimization. Approach: use second-order cone optimization. Copyright (c) by Joao Pedro PEDROSO, Masahiro MURAMATSU and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict import math def phi_inv(p): """phi_inv: inverse of gaussian (normal) CDF Source: Handbook of Mathematical Functions Dover Books on Mathematics Milton Abramowitz and Irene A. Stegun (Editors) Formula 26.2.23. """ if p < 0.5: t = math.sqrt(-2.0*math.log(p)) return ((0.010328*t + 0.802853)*t + 2.515517)/(((0.001308*t + 0.189269)*t + 1.432788)*t + 1.0) - t else: t = math.sqrt(-2.0*math.log(1.0-p)) return t - ((0.010328*t + 0.802853)*t + 2.515517)/(((0.001308*t + 0.189269)*t + 1.432788)*t + 1.0) def p_portfolio(I,sigma,r,alpha,beta): """p_portfolio -- modified markowitz model for portfolio optimization. Parameters: - I: set of items - sigma[i]: standard deviation of item i - r[i]: revenue of item i - alpha: acceptance threshold - beta: desired confidence level Returns a model, ready to be solved. """ model = Model("p_portfolio") x = {} for i in I: x[i] = model.addVar(vtype="C", name="x(%s)"%i) # quantity of i to buy rho = model.addVar(vtype="C", name="rho") rhoaux = model.addVar(vtype="C", name="rhoaux") model.addCons(rho == quicksum(r[i]*x[i] for i in I)) model.addCons(quicksum(x[i] for i in I) == 1) model.addCons(rhoaux == (alpha - rho)*(1/phi_inv(beta))) #todo model.addCons(quicksum(sigma[i]**2 * x[i] * x[i] for i in I) <= rhoaux * rhoaux) model.setObjective(rho, "maximize") model.data = x return model if __name__ == "__main__": # portfolio I,sigma,r = multidict( {1:[0.07,1.01], 2:[0.09,1.05], 3:[0.1,1.08], 4:[0.2,1.10], 5:[0.3,1.20]} ) alpha = 0.95 # beta = 0.1 for beta in [0.1, 0.05, 0.02, 0.01]: print("\n\n\nbeta:",beta,"phi inv:",phi_inv(beta)) model = p_portfolio(I,sigma,r,alpha,beta) model.optimize() x = model.data EPS = 1.e-6 print("Investment:") print("%5s\t%8s" % ("i","x[i]")) for i in I: print("%5s\t%8g" % (i,model.getVal(x[i]))) print("Objective:",model.getObjVal())
2,434
27.988095
106
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/read_tsplib.py
""" tsp.py: read standard instances of the traveling salesman problem Functions provided: * read_tsplib - read a symmetric tsp instance * read_atsplib - asymmetric Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import gzip import math def distL2(x1,y1,x2,y2): """Compute the L2-norm (Euclidean) distance between two points. The distance is rounded to the closest integer, for compatibility with the TSPLIB convention. The two points are located on coordinates (x1,y1) and (x2,y2), sent as parameters""" xdiff = x2 - x1 ydiff = y2 - y1 return int(math.sqrt(xdiff*xdiff + ydiff*ydiff) + .5) def distL1(x1,y1,x2,y2): """Compute the L1-norm (Manhattan) distance between two points. The distance is rounded to the closest integer, for compatibility with the TSPLIB convention. The two points are located on coordinates (x1,y1) and (x2,y2), sent as parameters""" return int(abs(x2-x1) + abs(y2-y1)+.5) def distLinf(x1,y1,x2,y2): """Compute the Linfty distance between two points (see TSPLIB documentation)""" return int(max(abs(x2-x1),abs(y2-y1))) def distATT(x1,y1,x2,y2): """Compute the ATT distance between two points (see TSPLIB documentation)""" xd = x2 - x1 yd = y2 - y1 rij = math.sqrt((xd*xd + yd*yd) /10.) tij = int(rij + .5) if tij < rij: return tij + 1 else: return tij def distCEIL2D(x1,y1,x2,y2): xdiff = x2 - x1 ydiff = y2 - y1 return int(math.ceil(math.sqrt(xdiff*xdiff + ydiff*ydiff))) def distGEO(x1,y1,x2,y2): print("Implementation is wrong") assert False PI = 3.141592 deg = int(x1 + .5) min_ = x1 - deg lat1 = PI * (deg + 5.*min_/3)/180. deg = int(y1 + .5) min_ = y1 - deg long1 = PI * (deg + 5.*min_/3)/180. deg = int(x2 + .5) min_ = x2 - deg lat2 = PI * (deg + 5.*min_/3)/180. deg = int(y2 + .5) min_ = y2 - deg long2 = PI * (deg + 5.*min_/3)/180. RRR = 6378.388 q1 = math.cos( long1 - long2 ); q2 = math.cos( lat1 - lat2 ); q3 = math.cos( lat1 + lat2 ); return int(RRR * math.acos(.5*((1.+q1)*q2 - (1.-q1)*q3)) + 1.) def read_explicit_lowerdiag(f,n): c = {} i,j = 1,1 while True: line = f.readline() for data in line.split(): c[j,i] = int(data) j += 1 if j>i: i += 1 j = 1 if i > n: return range(1,n+1),c,None,None def read_explicit_upper(f,n): c = {} i,j = 1,2 while True: line = f.readline() for data in line.split(): c[i,j] = int(data) j += 1 if j>n: i += 1 j = i+1 if i == n: return range(1,n+1),c,None,None def read_explicit_upperdiag(f,n): c = {} i,j = 1,1 while True: line = f.readline() for data in line.split(): c[i,j] = int(data) j += 1 if j>n: i += 1 j = i if i == n: return range(1,n+1),c,None,None def read_explicit_matrix(f,n): c = {} i,j = 1,1 while True: line = f.readline() for data in line.split(): if j>i: c[i,j] = int(data) j += 1 if j>n: i += 1 j = 1 if i == n: return range(1,n+1),c,None,None def read_tsplib(filename): "basic function for reading a symmetric problem in the TSPLIB format" "data is stored in an upper triangular matrix" "NOTE: some distance types are not handled yet" if filename[-3:] == ".gz": f = gzip.open(filename, "rt") else: f = open(filename) line = f.readline() while line.find("DIMENSION") == -1: line = f.readline() n = int(line.split()[-1]) while line.find("EDGE_WEIGHT_TYPE") == -1: line = f.readline() if line.find("EUC_2D") != -1: dist = distL2 elif line.find("MAN_2D") != -1: dist = distL1 elif line.find("MAX_2D") != -1: dist = distLinf elif line.find("ATT") != -1: dist = distATT elif line.find("CEIL_2D") != -1: dist = distCEIL2D # elif line.find("GEO") != -1: # print("geographic" # dist = distGEO elif line.find("EXPLICIT") != -1: while line.find("EDGE_WEIGHT_FORMAT") == -1: line = f.readline() if line.find("LOWER_DIAG_ROW") != -1: while line.find("EDGE_WEIGHT_SECTION") == -1: line = f.readline() return read_explicit_lowerdiag(f,n) if line.find("UPPER_ROW") != -1: while line.find("EDGE_WEIGHT_SECTION") == -1: line = f.readline() return read_explicit_upper(f,n) if line.find("UPPER_DIAG_ROW") != -1: while line.find("EDGE_WEIGHT_SECTION") == -1: line = f.readline() return read_explicit_upperdiag(f,n) if line.find("FULL_MATRIX") != -1: while line.find("EDGE_WEIGHT_SECTION") == -1: line = f.readline() return read_explicit_matrix(f,n) print("error reading line " + line) raise(Exception) else: print("cannot deal with '%s' distances" % line) raise Exception while line.find("NODE_COORD_SECTION") == -1: line = f.readline() x,y = {},{} while 1: line = f.readline() if line.find("EOF") != -1 or not line: break (i,xi,yi) = line.split() x[i] = float(xi) y[i] = float(yi) V = x.keys() c = {} # dictionary to hold n times n matrix for i in V: for j in V: c[i,j] = dist(x[i],y[i],x[j],y[j]) return V,c,x,y def read_atsplib(filename): "basic function for reading a ATSP problem on the TSPLIB format" "NOTE: only works for explicit matrices" if filename[-3:] == ".gz": f = gzip.open(filename, 'r') data = f.readlines() else: f = open(filename, 'r') data = f.readlines() for line in data: if line.find("DIMENSION") >= 0: n = int(line.split()[1]) break else: raise IOError("'DIMENSION' keyword not found in file '%s'" % filename) for line in data: if line.find("EDGE_WEIGHT_TYPE") >= 0: if line.split()[1] == "EXPLICIT": break else: raise IOError("'EDGE_WEIGHT_TYPE' is not 'EXPLICIT' in file '%s'" % filename) for k,line in enumerate(data): if line.find("EDGE_WEIGHT_SECTION") >= 0: break else: raise IOError("'EDGE_WEIGHT_SECTION' not found in file '%s'" % filename) c = {} # flatten list of distances dist = [] for line in data[k+1:]: if line.find("EOF") >= 0: break for val in line.split(): dist.append(int(val)) k = 0 for i in range(n): for j in range(n): c[i+1,j+1] = dist[k] k += 1 return n,c if __name__ == "__main__": import sys # Parse argument if len(sys.argv) < 2: print('Usage: %s instance' % sys.argv[0]) exit(1) from read_tsplib import read_tsplib V,c,x,y = read_tsplib(sys.argv[1]) print(len(V), "vertices,", len(c), "arcs") print("distance matrix:") for i in V: for j in V: if j > i: print(c[i,j],) elif j < i: print(c[j,i],) else: print(0,) print print
7,667
25.811189
85
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/scheduling.py
""" scheduling.py: solve the one machine scheduling problem. approaches: - linear ordering formulation - time-index formulation - disjunctive formulation - heuristics using cutting plane Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict def scheduling_linear_ordering(J,p,d,w): """ scheduling_linear_ordering: model for the one machine total weighted tardiness problem Model for the one machine total weighted tardiness problem using the linear ordering formulation Parameters: - J: set of jobs - p[j]: processing time of job j - d[j]: latest non-tardy time for job j - w[j]: weighted of job j; the objective is the sum of the weighted completion time Returns a model, ready to be solved. """ model = Model("scheduling: linear ordering") T,x = {},{} # tardiness variable; x[j,k] =1 if job j precedes job k, =0 otherwise for j in J: T[j] = model.addVar(vtype="C", name="T(%s)"%(j)) for k in J: if j != k: x[j,k] = model.addVar(vtype="B", name="x(%s,%s)"%(j,k)) for j in J: model.addCons(quicksum(p[k]*x[k,j] for k in J if k != j) - T[j] <= d[j]-p[j], "Tardiness(%r)"%(j)) for k in J: if k <= j: continue model.addCons(x[j,k] + x[k,j] == 1, "Disjunctive(%s,%s)"%(j,k)) for ell in J: if ell > k: model.addCons(x[j,k] + x[k,ell] + x[ell,j] <= 2, "Triangle(%s,%s,%s)"%(j,k,ell)) model.setObjective(quicksum(w[j]*T[j] for j in J), "minimize") model.data = x,T return model def scheduling_time_index(J,p,r,w): """ scheduling_time_index: model for the one machine total weighted tardiness problem Model for the one machine total weighted tardiness problem using the time index formulation Parameters: - J: set of jobs - p[j]: processing time of job j - r[j]: earliest start time of job j - w[j]: weighted of job j; the objective is the sum of the weighted completion time Returns a model, ready to be solved. """ model = Model("scheduling: time index") T = max(r.values()) + sum(p.values()) X = {} # X[j,t]=1 if job j starts processing at time t, 0 otherwise for j in J: for t in range(r[j], T-p[j]+2): X[j,t] = model.addVar(vtype="B", name="x(%s,%s)"%(j,t)) for j in J: model.addCons(quicksum(X[j,t] for t in range(1,T+1) if (j,t) in X) == 1, "JobExecution(%s)"%(j)) for t in range(1,T+1): ind = [(j,t2) for j in J for t2 in range(t-p[j]+1,t+1) if (j,t2) in X] if ind != []: model.addCons(quicksum(X[j,t2] for (j,t2) in ind) <= 1, "MachineUB(%s)"%t) model.setObjective(quicksum((w[j] * (t - 1 + p[j])) * X[j,t] for (j,t) in X), "minimize") model.data = X return model def scheduling_disjunctive(J,p,r,w): """ scheduling_disjunctive: model for the one machine total weighted completion time problem Disjunctive optimization model for the one machine total weighted completion time problem with release times. Parameters: - J: set of jobs - p[j]: processing time of job j - r[j]: earliest start time of job j - w[j]: weighted of job j; the objective is the sum of the weighted completion time Returns a model, ready to be solved. """ model = Model("scheduling: disjunctive") M = max(r.values()) + sum(p.values()) # big M s,x = {},{} # start time variable, x[j,k] = 1 if job j precedes job k, 0 otherwise for j in J: s[j] = model.addVar(lb=r[j], vtype="C", name="s(%s)"%j) for k in J: if j != k: x[j,k] = model.addVar(vtype="B", name="x(%s,%s)"%(j,k)) for j in J: for k in J: if j != k: model.addCons(s[j] - s[k] + M*x[j,k] <= (M-p[j]), "Bound(%s,%s)"%(j,k)) if j < k: model.addCons(x[j,k] + x[k,j] == 1, "Disjunctive(%s,%s)"%(j,k)) model.setObjective(quicksum(w[j]*s[j] for j in J), "minimize") model.data = s,x return model def scheduling_cutting_plane(J,p,r,w): """ scheduling_cutting_plane: heuristic to one machine weighted completion time based on cutting planes Use a cutting-plane method as a heuristics for solving the one-machine total weighted completion time problem with release times. Parameters: - J: set of jobs - p[j]: processing time of job j - r[j]: earliest start time of job j - w[j]: weighted of job j; the objective is the sum of the weighted completion time Returns a tuple with values of: - bestC: corresponding completion time of the best found solution - bestobj: best, best, hobj """ model = Model("scheduling: cutting plane") C = {} # completion time variable for j in J: C[j] = model.addVar(lb=r[j]+p[j], obj=w[j], vtype="C", name="C(%s)"%j) sumP = sum([p[j] for j in J]) sumP2 = sum([p[j]**2 for j in J]) model.addCons(C[j]*p[j] >= sumP2*0.5 + (sumP**2)*0.5, "AllJobs") model.setObjective(quicksum(w[j]*C[j] for j in J), "minimize") cut = 0 bestobj = float("inf") while True: model.optimize() sol = sorted([(model.getVal(C[j]),j) for j in C]) seq = [j for (completion,j) in sol] # print("Opt.value=",model.getObjVal() # print("current solution:", seq hC,hobj = evaluate(seq,p,r,w) if hobj < bestobj: # print("\t*** updating best found solution:", bestobj, "--->", hobj, "***" bestC = hC bestobj = hobj best = list(seq) S,S_ = [],[] sumP,sumP2,f = 0,0,0 for (C_,j) in sol: pj = p[j] delta = pj**2 + ((sumP+pj)**2 - sumP**2) - 2*pj*C_ if f > 0 and delta <= 0: S = S_ break f += delta/2. sumP2 += pj**2 sumP += pj S_.append(j) if S == []: break cut += 1 model.addCons(quicksum(C[j]*p[j] for j in S) >= sumP2*0.5 + (sumP**2)*0.5, "Cut(%s)"%cut) return bestC,bestobj,best def evaluate(seq,p,r,w): C = 0 # completion time of previous job obj = 0 for j in seq: s = max(r[j],C) C = max(r[j],C) + p[j] obj += w[j]*C return C,obj def printsol(seq,p,r,w): print("Solution:",seq) C = 0 # completion time of previous job print("%12s%12s%12s%12s%12s%12s%12s" % ("job","p","r","w","start","completion","obj")) obj = 0 for j in seq: s = max(r[j],C) C = max(r[j],C) + p[j] obj += w[j]*C print("%12s%12s%12s%12s%12s%12s%12s" % (j,p[j],r[j],w[j],s,C,w[j]*C)) print("completion time:",C) print("objective:",obj) print return C import random def make_data(n): """ Data generator for the one machine scheduling problem. """ p,r,d,w = {},{},{},{} J = range(1,n+1) for j in J: p[j] = random.randint(1,4) w[j] = random.randint(1,3) T = sum(p) for j in J: r[j] = random.randint(0,5) d[j] = r[j] + random.randint(0,5) return J,p,r,d,w def example(n): """ Data generator for the one machine scheduling problem. """ J,p,r,d,w = multidict({ 1:[1,4,0,3], 2:[4,0,0,1], 3:[2,2,0,2], 4:[3,4,0,3], 5:[1,1,0,1], 6:[4,5,0,2], }) return J,p,r,d,w if __name__ == "__main__": random.seed(1) n = 5 # number of jobs # J,p,r,d,w = make_data(n) J,p,r,d,w = example(n) print("Linear ordering formulation") model = scheduling_linear_ordering(J,p,d,w) # model.write("scheduling-lo.lp") model.optimize() z = model.getObjVal() x,T = model.data for (i,j) in x: if model.getVal(x[i,j]) > .5: print("x(%s) = %s" % ((i,j), int(model.getVal(x[i,j])+.5))) for i in T: print("T(%s) = %s" % (i, int(model.getVal(T[i])+.5))) print("Opt.value by the linear ordering formulation=",z) print("Time index formulation") model = scheduling_time_index(J,p,r,w) model.optimize() X = model.data z = model.getObjVal() + sum([w[j]*p[j] for j in J]) print("Optimal value by Time Index Formulation:",z) seq = [j for (t,j) in sorted([(t,j) for (j,t) in X if model.getVal(X[j,t]) > .5])] C1 = printsol(seq,p,r,w) print("Disjunctive formulation") model = scheduling_disjunctive(J,p,r,w) model.optimize() s,x = model.data z = model.getObjVal() + sum([w[j]*p[j] for j in J]) print("Optimal value by Disjunctive Formulation:",z) seq = [j for (t,j) in sorted([(int(model.getVal(s[j])+.5),j) for j in s])] C2 = printsol(seq,p,r,w) assert C2 == C1 print("Earliest start time rule:") tmp = sorted([(r[i],i) for i in J]) seq = [i for (dummy,i) in sorted(tmp)] printsol(seq,p,r,w) print("Smith's rule: decreasing order of w/p") tmp = [(float(w[i])/p[i],i) for i in J] seq = [i for (dummy,i) in sorted(tmp,reverse=True)] printsol(seq,p,r,w) print("Scheduling heuristics with cutting planes") C,obj,seq = scheduling_cutting_plane(J,p,r,w) printsol(seq,p,r,w)
9,424
28.270186
106
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/staff_sched.py
""" staff_sched.py: model for staff scheduling Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import random from pyscipopt import Model, quicksum, multidict def staff(I,T,N,J,S,c,b): """ staff: staff scheduling Parameters: - I: set of members in the staff - T: number of periods in a cycle - N: number of working periods required for staff's elements in a cycle - J: set of shifts in each period (shift 0 == rest) - S: subset of shifts that must be kept at least consecutive days - c[i,t,j]: cost of a shift j of staff's element i on period t - b[t,j]: number of staff elements required in period t, shift j Returns a model, ready to be solved. """ Ts = range(1,T+1) model = Model("staff scheduling") x = {} for t in Ts: for j in J: for i in I: x[i,t,j] = model.addVar(vtype="B", name="x(%s,%s,%s)" % (i,t,j)) model.setObjective(quicksum(c[i,t,j]*x[i,t,j] for i in I for t in Ts for j in J if j != 0), "minimize") for t in Ts: for j in J: if j == 0: continue model.addCons(quicksum(x[i,t,j] for i in I) >= b[t,j], "Cover(%s,%s)" % (t,j)) for i in I: model.addCons(quicksum(x[i,t,j] for t in Ts for j in J if j != 0) == N, "Work(%s)"%i) for t in Ts: model.addCons(quicksum(x[i,t,j] for j in J) == 1, "Assign(%s,%s)" % (i,t)) for j in J: if j != 0: model.addCons(x[i,t,j] + quicksum(x[i,t,k] for k in J if k != j and k != 0) <= 1,\ "Require(%s,%s,%s)" % (i,t,j)) for t in range(2,T): for j in S: model.addCons(x[i,t-1,j] + x[i,t+1,j] >= x[i,t,j], "SameShift(%s,%s,%s)" % (i,t,j)) model.data = x return model def make_data(): T = 7 # number of periods N = 5 # number of working periods of each staff element in a cycle J = range(4) # shift set; 0 == rest S = [2,3] # subset of shifts that must be kept at least consecutive days # staff set, base cost I,c_base = multidict({1:8000, 2:9000, 3:10000, 4:11000, 5:12000, 6:13000, 7:14000, 8:15000}) c = {} for i in I: for t in range(1,T+1): for j in J: if j == 0: continue c[i,t,j] = c_base[i] if j == 3: # night shift, more expensive c[i,t,j] *= 2 if t == T-1 or t == T: # weekend, more expensive c[i,t,j] *= 1.5 b = { (1,1):2, (1,2):3, (1,3):1, (2,1):2, (2,2):3, (2,3):1, (3,1):2, (3,2):2, (3,3):1, (4,1):1, (4,2):1, (4,3):1, (5,1):3, (5,2):3, (5,3):1, (6,1):4, (6,2):4, (6,3):2, (7,1):5, (7,2):5, (7,3):2, } return I,T,N,J,S,c,b def make_data_trick(): T = 7 # number of periods N = 5 # number of working periods of each staff element in a cycle J = range(4) # shift set; 0 == rest S = [2,3] # subset of shifts that must be kept at least consecutive days # staff set, base cost I,c_base = multidict({1:8000, 2:9000, 3:10000, 4:11000, 5:12000, 6:13000, 7:14000, 8:15000}) c = {} for i in I: for t in range(1,T+1): for j in J: if j == 0: continue c[i,t,j] = c_base[i] if j == 3: # night shift, more expensive c[i,t,j] *= 2 if t == T-1 or t == T: # weekend, more expensive c[i,t,j] *= 1.5 b = { (1,1):2, (1,2):2, (1,3):2, (2,1):2, (2,2):2, (2,3):2, (3,1):2, (3,2):2, (3,3):2, (4,1):2, (4,2):2, (4,3):2, (5,1):2, (5,2):2, (5,3):2, (6,1):2, (6,2):2, (6,3):2, (7,1):2, (7,2):2, (7,3):2, } return I,T,N,J,S,c,b if __name__ == "__main__": I,T,N,J,S,c,b = make_data_trick() # I,T,N,J,S,c,b = make_data() model = staff(I,T,N,J,S,c,b) model.optimize() status = model.getStatus() if status == "optimal": x = model.data print("Optimum solution found") print("\n\nstaff schedule: (shift on each day)") for i in I: s = "worker %s:\t" % i for t in range(1,T+1): for j in J: if model.getVal(x[i,t,j]) > .5: s += str(j) print(s) print("\n\nuncovered shifts:") # for t in range(1,T+1): # s = "day %s:\t" % t # for j in J: # if y[t,j].X > .5: # s += "%s:%s, " % (j,int(y[t,j].X+.5)) # print(s) elif status == "infeasible": print("Infeasible instance...") # model.computeIIS() # for c in model.getConss(): # if c.IISConstr: # print(c.ConstrName) elif status == "unbounded" or status == "infeasible": print("Unbounded instance") else: print("Error: Solver finished with non-optimal status",status)
5,242
32.825806
102
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/staff_sched_mo.py
""" staff_sched_mo.py: multiobjective model for staff scheduling Objectives: - minimize cost - minimize uncovered shifts Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import random from pyscipopt import Model, quicksum, multidict def staff_mo(I,T,N,J,S,c,b): """ staff: staff scheduling Parameters: - I: set of members in the staff - T: number of periods in a cycle - N: number of working periods required for staff's elements in a cycle - J: set of shifts in each period (shift 0 == rest) - S: subset of shifts that must be kept at least consecutive days - c[i,t,j]: cost of a shit j of staff's element i on period t - b[t,j]: number of staff elements required in period t, shift j Returns a model with no objective function. """ Ts = range(1,T+1) model = Model("staff scheduling -- multiobjective version") x,y = {},{} for t in Ts: for j in J: for i in I: x[i,t,j] = model.addVar(vtype="B", name="x(%s,%s,%s)" % (i,t,j)) y[t,j] = model.addVar(vtype="C", name="y(%s,%s)" % (t,j)) C = model.addVar(vtype="C", name="cost") U = model.addVar(vtype="C", name="uncovered") model.addCons(C >= quicksum(c[i,t,j]*x[i,t,j] for i in I for t in Ts for j in J if j != 0), "Cost") model.addCons(U >= quicksum(y[t,j] for t in Ts for j in J if j != 0), "Uncovered") for t in Ts: for j in J: if j == 0: continue model.addCons(quicksum(x[i,t,j] for i in I) >= b[t,j] - y[t,j], "Cover(%s,%s)" % (t,j)) for i in I: model.addCons(quicksum(x[i,t,j] for t in Ts for j in J if j != 0) == N, "Work(%s)"%i) for t in Ts: model.addCons(quicksum(x[i,t,j] for j in J) == 1, "Assign(%s,%s)" % (i,t)) for j in J: if j != 0: model.addCons(x[i,t,j] + quicksum(x[i,t,k] for k in J if k != j and k != 0) <= 1,\ "Require(%s,%s,%s)" % (i,t,j)) for t in range(2,T): for j in S: model.addCons(x[i,t-1,j] + x[i,t+1,j] >= x[i,t,j], "SameShift(%s,%s,%s)" % (i,t,j)) model.data = x,y,C,U return model def optimize(model,cand,obj): """optimize: function for solving the model, updating candidate solutions' list Parameters: - model: Gurobi model object - cand: list of pairs of objective functions (for appending more solutions) - obj: name of a model's variable to setup as objective Returns the solver's exit status """ # model.Params.OutputFlag = 0 # silent mode model.setObjective(obj,"minimize") model.optimize() x,y,C,U = model.data status = model.getStatus() if status == "optimal" or status == "bestsollimit": # todo GRB.Status.SUBOPTIMAL: sols = model.getSols() for sol in sols: cand.append((model.getVal(var=U,solution=sol),model.getVal(var=C,solution=sol))) # for k in range(model.SolCount): # model.Params.SolutionNumber = k # cand.append(model.getVal(U),model.getVal(C)) return status def solve_segment(I,T,N,J,S,c,b): """ solve_segment: segmentation for finding set of solutions for two-objective TSP Parameters: - I: set of members in the staff - T: number of periods in a cycle - N: number of working periods required for staff's elements in a cycle - J: set of shifts in each period (shift 0 == rest) - S: subset of shifts that must be kept at least consecutive days - c[i,t,j]: cost of a shit j of staff's element i on period t - b[t,j]: number of staff elements required in period t, shift j Returns list of candidate solutions """ model = staff_mo(I,T,N,J,S,c,b) # model for minimizing time x,y,C,U = model.data model.setRealParam("limits/time", 60) # store the set of solutions for plotting cand = [] # first objective: cost stat1 = optimize(model,cand,C) stat2 = optimize(model,cand,U) if stat1 != "optimal" or stat2 != "optimal": return [] ulist = [int(ui+.5) for (ui,ci) in cand] max_u = max(ulist) min_u = min(ulist) # add a time upper bound constraint, moving between min and max values UConstr = model.addCons(U <= max_u, "UConstr") for u_lim in range(max_u-1, min_u, -1): print("limiting u to",u_lim) UConstr.setAttr("RHS",u_lim) optimize(model,cand,C) return cand if __name__ == "__main__": from pareto_front import pareto_front from staff_sched import make_data,make_data_trick # I,T,N,J,S,c,b = make_data() I,T,N,J,S,c,b = make_data_trick() cand_seg = solve_segment(I,T,N,J,S,c,b) print("candidate solutions:") for cand in cand_seg: print("\t",cand) front_seg = pareto_front(cand_seg) print("pareto front:",len(front_seg),"points out of",len(cand_seg)) for cand in front_seg: print("\t",cand) try: import matplotlib.pyplot as P except: print("for graphics, install matplotlib") exit(0) P.clf() P.xlabel("uncovered shifts") P.ylabel("cost") P.title("Pareto front") ### # plot pareto front - scaling ### x = [xi for (xi,yi) in cand_seg] ### y = [yi for (xi,yi) in cand_seg] ### P.plot(x,y,"bo",c="grey") # plot pareto front - scaling x = [xi for (xi,yi) in front_seg] y = [yi for (xi,yi) in front_seg] P.plot(x,y,"bo",c="black") x = [xi for (xi,yi) in front_seg] y = [yi for (xi,yi) in front_seg] P.plot(x,y,c="black",lw=3,label="segmentation") P.legend() P.savefig("tsp_mo_pareto_staff.pdf",format="pdf") P.show()
5,790
31.172222
103
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/tsp_flow.py
""" tsp_flow.py: solve the traveling salesman problem using flow formulation minimize the travel cost for visiting n customers exactly once approach: - start with assignment model - check flow from a source to every other node; - if no flow, a sub-cycle has been found --> add cut - otherwise, the solution is optimal Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random #import networkx todo from pyscipopt import Model, quicksum, multidict EPS = 1.e-6 def maxflow(V,M,source,sink): """maxflow: maximize flow from source to sink, taking into account arc capacities M Parameters: - V: set of vertices - M[i,j]: dictionary or capacity for arcs (i,j) - source: flow origin - sink: flow target Returns a model, ready to be solved. """ # create max-flow underlying model, on which to find cuts model = Model("maxflow") f = {} # flow variable for (i,j) in M: f[i,j] = model.addVar(lb=-M[i,j], ub=M[i,j], name="flow(%s,%s)"%(i,j)) cons = {} for i in V: if i != source and i != sink: cons[i] = model.addCons( quicksum(f[i,j] for j in V if i<j and (i,j) in M) - \ quicksum(f[j,i] for j in V if i>j and (j,i) in M) == 0, "FlowCons(%s)"%i) model.setObjective(quicksum(f[i,j] for (i,j) in M if i==source), "maximize") # model.write("tmp.lp") model.data = f,cons return model def solve_tsp(V,c): """solve_tsp -- solve the traveling salesman problem - start with assignment model - check flow from a source to every other node; - if no flow, a sub-cycle has been found --> add cut - otherwise, the solution is optimal Parameters: - V: set/list of nodes in the graph - c[i,j]: cost for traversing edge (i,j) Returns the optimum objective value and the list of edges used. """ def addcut(X): for sink in V[1:]: mflow = maxflow(V,X,V[0],sink) mflow.optimize() f,cons = mflow.data if mflow.ObjVal < 2-EPS: # no flow to sink, can add cut break else: return False #add a cut/constraint CutA = set([V[0]]) for i in cons: if cons[i].Pi <= -1+EPS: CutA.add(i) CutB = set(V) - CutA main.addCons( quicksum(x[i,j] for i in CutA for j in CutB if j>i) + \ quicksum(x[j,i] for i in CutA for j in CutB if j<i) >= 2) print("mflow:",mflow.getObjVal(),"cut:",CutA,"+",CutB,">= 2") print("mflow:",mflow.getObjVal(),"cut:",[(i,j) for i in CutA for j in CutB if j>i],"+",[(j,i) for i in CutA for j in CutB if j<i],">= 2") return True def isMIP(x): for var in x: if var.vtype == "CONTINUOUS": return False return True # main part of the solution process: main = Model("tsp") x = {} for i in V: for j in V: if j > i: x[i,j] = main.addVar(ub=1, vtype="C", name="x(%s,%s)"%(i,j)) for i in V: main.addCons(quicksum(x[j,i] for j in V if j < i) + \ quicksum(x[i,j] for j in V if j > i) == 2, "Degree(%s)"%i) main.setObjective(quicksum(c[i,j]*x[i,j] for i in V for j in V if j > i), "minimize") while True: main.optimize() z = main.getObjVal() X = {} for (i,j) in x: if main.getVal(x[i,j]) > EPS: X[i,j] = main.getVal(x[i,j]) if addcut(X) == False: # i.e., components are connected if isMIP(): # integer variables, components connected: solution found break for (i,j) in x: # all components connected, switch to integer model main.chgVarType(x[i,j], "BINARY") # process solution edges = [] for (i,j) in x: if main.getVal(x[i,j]) > EPS: edges.append((i,j)) return main.getObjVal(),edges def distance(x1,y1,x2,y2): """distance: euclidean distance between (x1,y1) and (x2,y2)""" return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n): """make_data: compute matrix distance based on euclidean distance""" V = range(1,n+1) x = dict([(i,random.random()) for i in V]) y = dict([(i,random.random()) for i in V]) c = {} for i in V: for j in V: if j > i: c[i,j] = distance(x[i],y[i],x[j],y[j]) return V,c if __name__ == "__main__": import sys # Parse argument if len(sys.argv) < 2: print("Usage: %s instance" % sys.argv[0]) exit(1) # n = 200 # seed = 1 # random.seed(seed) # V,c = make_data(n) from read_tsplib import read_tsplib try: V,c,x,y = read_tsplib(sys.argv[1]) except: print("Cannot read TSPLIB file",sys.argv[1]) exit(1) obj,edges = solve_tsp(V,c) print print("Optimal tour:",edges) print("Optimal cost:",obj) print
5,113
29.082353
145
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/tsp_lazy.py
""" tsp.py: solve the traveling salesman problem minimize the travel cost for visiting n customers exactly once approach: - start with assignment model - add cuts until there are no sub-cycles Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random import networkx from pyscipopt import Model, Conshdlr, quicksum, SCIP_RESULT, SCIP_PRESOLTIMING, SCIP_PROPTIMING, SCIP_PARAMSETTING class TSPconshdlr(Conshdlr): def findSubtours(self, checkonly, sol): EPS = 1.e-6 edges = [] x = self.model.data for (i, j) in x: if self.model.getSolVal(sol, x[i, j]) > EPS: edges.append((i,j)) G = networkx.Graph() G.add_edges_from(edges) Components = list(networkx.connected_components(G)) if len(Components) == 1: return False elif checkonly: return True for S in Components: self.model.addCons(quicksum(x[i, j] for i in S for j in S if j > i) <= len(S) - 1) print("cut: len(%s) <= %s" % (S, len(S) - 1)) return True def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason): if self.findSubtours(checkonly = True, sol = solution): return {"result": SCIP_RESULT.INFEASIBLE} else: return {"result": SCIP_RESULT.FEASIBLE} def consenfolp(self, constraints, nusefulconss, solinfeasible): if self.findSubtours(checkonly = False, sol = None): return {"result": SCIP_RESULT.CONSADDED} else: return {"result": SCIP_RESULT.FEASIBLE} def conslock(self, constraint, nlockspos, nlocksneg): pass def tsp(V,c): """tsp -- model for solving the traveling salesman problem with callbacks - start with assignment model - add cuts until there are no sub-cycles Parameters: - V: set/list of nodes in the graph - c[i,j]: cost for traversing edge (i,j) Returns the optimum objective value and the list of edges used. """ model = Model("TSP_lazy") conshdlr = TSPconshdlr() x = {} for i in V: for j in V: if j > i: x[i,j] = model.addVar(vtype = "B",name = "x(%s,%s)" % (i,j)) for i in V: model.addCons(quicksum(x[j, i] for j in V if j < i) + quicksum(x[i, j] for j in V if j > i) == 2, "Degree(%s)" % i) model.setObjective(quicksum(c[i, j] * x[i, j] for i in V for j in V if j > i), "minimize") model.data = x return model, conshdlr def distance(x1,y1,x2,y2): """distance: euclidean distance between (x1,y1) and (x2,y2)""" return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) def make_data(n): """make_data: compute matrix distance based on euclidean distance""" V = range(1,n + 1) x = dict([(i,random.random()) for i in V]) y = dict([(i,random.random()) for i in V]) c = {} for i in V: for j in V: if j > i: c[i,j] = distance(x[i],y[i],x[j],y[j]) return V,c,x,y def solve_tsp(V,c): model, conshdlr = tsp(V, c) model.includeConshdlr(conshdlr, "TSP", "TSP subtour eliminator", sepapriority = -1, enfopriority = -1, chckpriority = -1, sepafreq = -1, propfreq = -1, eagerfreq = -1, maxprerounds = 0, delaysepa = False, delayprop = False, needscons = False, presoltiming = SCIP_PRESOLTIMING.FAST, proptiming = SCIP_PROPTIMING.BEFORELP) model.setBoolParam("misc/allowdualreds", 0) model.writeProblem("tsp.cip") model.optimize() x = model.data EPS = 1.e-6 edges = [] for (i,j) in x: if model.getVal(x[i, j]) > EPS: edges.append((i, j)) return model.getObjVal(), edges if __name__ == "__main__": import sys if len(sys.argv) < 2: print("Usage: %s instance" % sys.argv[0]) print("using randomly generated TSP instance") n = 200 seed = 1 random.seed(seed) V,c,x,y = make_data(n) else: from read_tsplib import read_tsplib try: V, c, x, y = read_tsplib(sys.argv[1]) except: print("Cannot read TSPLIB file", sys.argv[1]) exit(1) obj, edges = solve_tsp(V, c) print("") print("Optimal tour:", edges) print("Optimal cost:", obj) print("")
4,435
30.239437
116
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/tsp_mo.py
""" tsp-mp.py: solve the multi-objective traveling salesman problem Approaches: - segmentation - ideal point - scalarization Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random from pyscipopt import Model, quicksum, multidict def optimize(model,cand): """optimize: function for solving the model, updating candidate solutions' list Will add to cand all the intermediate solutions found, as well as the optimum Parameters: - model: Gurobi model object - cand: list of pairs of objective functions (for appending more solutions) Returns the solver's exit status """ model.hideOutput() model.optimize() x,y,C,T = model.data status = model.getStatus() if status == "optimal": # collect suboptimal solutions solutions = model.getSols() for sol in solutions: cand.append((model.getSolVal(T, sol), model.getSolVal(C))) return status def base_model(n,c,t): """base_model: mtz model for the atsp, prepared for two objectives Loads two additional variables/constraints to the mtz model: - C: sum of travel costs - T: sum of travel times Parameters: - n: number of cities - c,t: alternative edge weights, to compute two objective functions Returns list of candidate solutions """ from atsp import mtz_strong model = mtz_strong(n,c) # model for minimizing cost x,u = model.data # some auxiliary information C = model.addVar(vtype="C", name="C") # for computing solution cost T = model.addVar(vtype="C", name="T") # for computing solution time model.addCons(T == quicksum(t[i,j]*x[i,j] for (i,j) in x), "Time") model.addCons(C == quicksum(c[i,j]*x[i,j] for (i,j) in x), "Cost") model.data = x,u,C,T return model def solve_segment_time(n,c,t,segments): """solve_segment: segmentation for finding set of solutions for two-objective TSP Parameters: - n: number of cities - c,t: alternative edge weights, to compute two objective functions - segments: number of segments for finding various non-dominated solutions Returns list of candidate solutions """ model = base_model(n,c,t) # base model for minimizing cost or time x,u,C,T = model.data # store the set of solutions for plotting cand = [] # print("optimizing time" model.setObjective(T, "minimize") stat1 = optimize(model,cand) # print("optimizing cost" model.setObjective(C, "minimize") stat2 = optimize(model,cand) if stat1 != "optimal" or stat2 != "optimal": return [] times = [ti for (ti,ci) in cand] max_time = max(times) min_time = min(times) delta = (max_time-min_time)/segments # print("making time range from",min_time,"to",max_time # add a time upper bound constraint, moving between min and max values TimeCons = model.addCons(T <= max_time, "TimeCons") for i in range(segments+1): time_ub = max_time - delta*i model.chgRhs(TimeCons, time_ub) # print("optimizing cost subject to time <=",time_ub optimize(model,cand) return cand def solve_ideal(n,c,t,segments): """solve_ideal: use ideal point for finding set of solutions for two-objective TSP Parameters: - n: number of cities - c,t: alternative edge weights, to compute two objective functions - segments: number of segments for finding various non-dominated solutions Returns list of candidate solutions """ model = base_model(n,c,t) # base model for minimizing cost or time x,u,C,T = model.data # store the set of solutions for plotting cand = [] # print("optimizing time" model.setObjective(T, "minimize") stat1 = optimize(model,cand) # print("optimizing cost" model.setObjective(C, "minimize") stat2 = optimize(model,cand) #find the minimum cost routes if stat1 != "optimal" or stat2 != "optimal": return [] times = [ti for (ti,ci) in cand] costs = [ci for (ti,ci) in cand] min_time = min(times) min_cost = min(costs) # print("ideal point:",min_time,",",min_cost #=============================================================== # Objective function is f1^2 + f2^2 where f=Sum tx-min_time and g=Sum cx-min_cost f1 = model.addVar(vtype="C", name="f1") f2 = model.addVar(vtype="C", name="f2") model.addCons(f1 == T - min_time, "obj1") model.addCons(f2 == C - min_cost, "obj2") # print("optimizing distance to ideal point:" for i in range(segments+1): lambda_ = float(i)/segments # print(lambda_ z = model.addVar(name="z") Obj = model.addCons(lambda_*f1*f1 + (1-lambda_)*f2*f2 == z) model.setObjective(z, "minimize") optimize(model, cand) # find the minimum cost routes return cand def solve_scalarization(n,c,t): """solve_scalarization: scale objective function to find new point Parameters: - n: number of cities - c,t: alternative edge weights, to compute two objective functions Returns list of candidate solutions """ model = base_model(n,c,t) # base model for minimizing cost or time x,u,C,T = model.data def explore(C1,T1,C2,T2,front): """explore: recursively try to find new non-dominated solutions with a scaled objective Parameters: - C1,T1: cost and time of leftmost point - C1,T1: cost and time of rightmost point - front: current set of non-dominated solutions Returns the updated front """ alpha = float(C1 - C2)/(T2 - T1) # print("%s,%s -- %s,%s (%s)..." % (C1,T1,C2,T2,alpha) init = list(front) model.setObjective(quicksum((c[i,j] + alpha*t[i,j])*x[i,j] for (i,j) in x), "minimize") optimize(model,front) front = pareto_front(front) # print("... added %s points" % (len(front)-len(init)) if front == init: # print("no points added, returning" return front CM = model.getVal(C) TM = model.getVal(T) # print("will explore %s,%s -- %s,%s and %s,%s -- %s,%s" % (C1,T1,CM,TM,CM,TM,C2,T2) if TM > T1: front = explore(C1,T1,CM,TM,front) if T2 > TM: front = explore(CM,TM,C2,T2,front) return front # store the set of solutions for plotting cand = [] # to store the set of solutions for plotting model.setObjective(T, "minimize") stat = optimize(model,cand) if stat != "optimal": return [] C1 = model.getVal(C) T1 = model.getVal(T) # change the objective function to minimize the travel cost model.setObjective(C, "minimize") stat = optimize(model,cand) if stat != "optimal": return [] C2 = model.getVal(C) T2 = model.getVal(T) front = pareto_front(cand) return explore(C1,T1,C2,T2,front) def distance(x1,y1,x2,y2): return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n): x,y = {},{} # positions in the plane c,t = {},{} # cost, time for i in range(1,n+1): x[i] = random.random() y[i] = random.random() for i in range(1,n+1): for j in range(1,n+1): c[i,j] = distance(x[i],y[i],x[j],y[j]) t[i,j] = 1/(c[i,j]+1.0)+0.3*random.random() return c,t,x,y if __name__ == "__main__": from pareto_front import pareto_front random.seed(7) n = 20 c,t,x,y = make_data(n) print("\n\n\nmultiobjective optimization: segmentation with additional (time) constraint") segments = 6 cand_seg_time = solve_segment_time(n,c,t,segments) print("candidate solutions:") for cand in cand_seg_time: print("\t",cand) front_seg_time = pareto_front(cand_seg_time) print("pareto front:",len(front_seg_time),"points out of",len(cand_seg_time)) for cand in front_seg_time: print("\t",cand) print("\n\n\nmultiobjective optimization: min distance to ideal point") cand_ideal = solve_ideal(n,c,t,segments) print("candidate solutions:") for cand in cand_ideal: print("\t",cand) front_ideal = pareto_front(cand_ideal) print("pareto front:",len(front_ideal),"points out of",len(cand_ideal)) for cand in front_ideal: print("\t",cand) print("\n\n\nmultiobjective optimization: scalarization strategy") front_scalarization = solve_scalarization(n,c,t) front_scalarization.sort() print("front solutions:") for cand in front_scalarization: print("\t",cand) assert front_scalarization == pareto_front(front_scalarization) try: import matplotlib.pyplot as P except: print("for graphics, install matplotlib") exit(0) P.clf() P.xlabel("cost") P.ylabel("time") P.title("Pareto front") # plot pareto front - scalarization t = [ti for (ti,ci) in front_scalarization] c = [ci for (ti,ci) in front_scalarization] P.plot(t,c,"bo",c="black") t = [ti for (ti,ci) in front_scalarization] c = [ci for (ti,ci) in front_scalarization] P.plot(t,c,c="black",lw=3,label="scalarization") # plot pareto front - segmentation (time) t = [ti for (ti,ci) in cand_seg_time] c = [ci for (ti,ci) in cand_seg_time] P.plot(t,c,"bo",c="cyan") allpoints = [(ti,ci) for (ti,ci) in cand_seg_time] t = [ti for (ti,ci) in front_seg_time] c = [ci for (ti,ci) in front_seg_time] P.plot(t,c,c="cyan",lw=3,label="segmentation (time)") # plot pareto front - -ideal point t = [ti for (ti,ci) in cand_ideal] c = [ci for (ti,ci) in cand_ideal] P.plot(t,c,"bo",c="red") allpoints = [(ti,ci) for (ti,ci) in cand_ideal] t = [ti for (ti,ci) in front_ideal] c = [ci for (ti,ci) in front_ideal] P.plot(t,c,c="red",lw=3,label="ideal point") P.legend() P.savefig("tsp_mo_pareto_ideal.pdf",format="pdf") P.show()
10,031
30.54717
95
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/tsptw.py
""" tsptw.py: solve the asymmetric traveling salesman problem with time window constraints minimize the travel cost for visiting n customers exactly once; each customer has a time window within which the salesman must visit him formulations based on Miller-Tucker-Zemlin's formulation, for the atsp; one- and two-index potential variants Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random from pyscipopt import Model, quicksum, multidict def mtztw(n,c,e,l): """mtzts: model for the traveling salesman problem with time windows (based on Miller-Tucker-Zemlin's one-index potential formulation) Parameters: - n: number of nodes - c[i,j]: cost for traversing arc (i,j) - e[i]: earliest date for visiting node i - l[i]: latest date for visiting node i Returns a model, ready to be solved. """ model = Model("tsptw - mtz") x,u = {},{} for i in range(1,n+1): u[i] = model.addVar(lb=e[i], ub=l[i], vtype="C", name="u(%s)"%i) for j in range(1,n+1): if i != j: x[i,j] = model.addVar(vtype="B", name="x(%s,%s)"%(i,j)) for i in range(1,n+1): model.addCons(quicksum(x[i,j] for j in range(1,n+1) if j != i) == 1, "Out(%s)"%i) model.addCons(quicksum(x[j,i] for j in range(1,n+1) if j != i) == 1, "In(%s)"%i) for i in range(1,n+1): for j in range(2,n+1): if i != j: M = max(l[i] + c[i,j] - e[j], 0) model.addCons(u[i] - u[j] + M*x[i,j] <= M-c[i,j], "MTZ(%s,%s)"%(i,j)) model.setObjective(quicksum(c[i,j]*x[i,j] for (i,j) in x), "minimize") model.data = x,u return model def mtz2tw(n,c,e,l): """mtz: model for the traveling salesman problem with time windows (based on Miller-Tucker-Zemlin's one-index potential formulation, stronger constraints) Parameters: - n: number of nodes - c[i,j]: cost for traversing arc (i,j) - e[i]: earliest date for visiting node i - l[i]: latest date for visiting node i Returns a model, ready to be solved. """ model = Model("tsptw - mtz-strong") x,u = {},{} for i in range(1,n+1): u[i] = model.addVar(lb=e[i], ub=l[i], vtype="C", name="u(%s)"%i) for j in range(1,n+1): if i != j: x[i,j] = model.addVar(vtype="B", name="x(%s,%s)"%(i,j)) for i in range(1,n+1): model.addCons(quicksum(x[i,j] for j in range(1,n+1) if j != i) == 1, "Out(%s)"%i) model.addCons(quicksum(x[j,i] for j in range(1,n+1) if j != i) == 1, "In(%s)"%i) for j in range(2,n+1): if i != j: M1 = max(l[i] + c[i,j] - e[j], 0) M2 = max(l[i] + min(-c[j,i], e[j]-e[i]) - e[j], 0) model.addCons(u[i] + c[i,j] - M1*(1-x[i,j]) + M2*x[j,i] <= u[j], "LiftedMTZ(%s,%s)"%(i,j)) for i in range(2,n+1): model.addCons(e[i] + quicksum(max(e[j]+c[j,i]-e[i],0) * x[j,i] for j in range(1,n+1) if i != j) \ <= u[i], "LiftedLB(%s)"%i) model.addCons(u[i] <= l[i] - \ quicksum(max(l[i]-l[j]+c[i,j],0) * x[i,j] for j in range(2,n+1) if i != j), \ "LiftedUB(%s)"%i) model.setObjective(quicksum(c[i,j]*x[i,j] for (i,j) in x), "minimize") model.data = x,u return model def tsptw2(n,c,e,l): """tsptw2: model for the traveling salesman problem with time windows (based on Miller-Tucker-Zemlin's formulation, two-index potential) Parameters: - n: number of nodes - c[i,j]: cost for traversing arc (i,j) - e[i]: earliest date for visiting node i - l[i]: latest date for visiting node i Returns a model, ready to be solved. """ model = Model("tsptw2") x,u = {},{} for i in range(1,n+1): for j in range(1,n+1): if i != j: x[i,j] = model.addVar(vtype="B", name="x(%s,%s)"%(i,j)) u[i,j] = model.addVar(vtype="C", name="u(%s,%s)"%(i,j)) for i in range(1,n+1): model.addCons(quicksum(x[i,j] for j in range(1,n+1) if j != i) == 1, "Out(%s)"%i) model.addCons(quicksum(x[j,i] for j in range(1,n+1) if j != i) == 1, "In(%s)"%i) for j in range(2,n+1): model.addCons(quicksum(u[i,j] + c[i,j]*x[i,j] for i in range(1,n+1) if i != j) - quicksum(u[j,k] for k in range(1,n+1) if k != j) <= 0, "Relate(%s)"%j) for i in range(1,n+1): for j in range(1,n+1): if i != j: model.addCons(e[i]*x[i,j] <= u[i,j], "LB(%s,%s)"%(i,j)) model.addCons(u[i,j] <= l[i]*x[i,j], "UB(%s,%s)"%(i,j)) model.setObjective(quicksum(c[i,j]*x[i,j] for (i,j) in x), "minimize") model.data = x,u return model def distance(x1,y1,x2,y2): """distance: euclidean distance between (x1,y1) and (x2,y2)""" return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n,width): """make_data: compute matrix distance and time windows.""" x = dict([(i,100*random.random()) for i in range(1,n+1)]) y = dict([(i,100*random.random()) for i in range(1,n+1)]) c = {} for i in range(1,n+1): for j in range(1,n+1): if j != i: c[i,j] = distance(x[i],y[i],x[j],y[j]) e = {1:0} l = {1:0} start = 0 delta = int(76.*math.sqrt(n)/n * width)+1 for i in range(1,n): j = i+1 start += c[i,j] e[j] = max(start-delta,0) l[j] = start + delta return c,x,y,e,l if __name__ == "__main__": EPS = 1.e-6 # n = 10 # width = 10 # c,x,y,e,l = make_data(n,width) n = 5 c = { (1,1):0, (1,2):9, (1,3):10, (1,4):10, (1,5):10, (2,1):10, (2,2):0, (2,3):9, (2,4):10, (2,5):10, (3,1):10, (3,2):10, (3,3):0, (3,4):9, (3,5):10, (4,1):10, (4,2):10, (4,3):10, (4,4):0, (4,5):9, (5,1):9, (5,2):10, (5,3):10, (5,4):10, (5,5):0, } e = {1:0, 2:0, 3:0, 4:0, 5:0} l = {1:100, 2:100, 3:10, 4:100, 5:100} print(c) print(e) print(l) model = mtztw(n,c,e,l) model.optimize() x,u = model.data sol = [i for (v,i) in sorted([(model.getVal(u[i]),i) for i in u])] print("mtz:") print(sol) print("Optimal value:", model.getObjVal()) model = mtz2tw(n,c,e,l) model.optimize() x,u = model.data sol = [i for (v,i) in sorted([(model.getVal(u[i]),i) for i in u])] print("mtz2:") print(sol) print("Optimal value:", model.getObjVal()) # ### import networkx as NX # ### import matplotlib.pyplot as P # ### P.clf() # ### G = NX.Graph() # ### G.add_nodes_from(range(1,n+1)) # ### position = {} # ### for i in range(1,n+1): # ### position[i] = (x[i],y[i]) # ### # ### for i in range(n-1): # ### G.add_edge(perm[i], perm[i+1]) # ### G.add_edge(perm[n-1],perm[0]) # ### NX.draw(G,position) # ### P.show() print("TWO INDEX MODEL") model = tsptw2(n,c,e,l) model.optimize() print("Optimal value:", model.getObjVal()) x,u = model.data for (i,j) in x: if model.getVal(x[i,j]) > EPS: print(x[i,j].name,i,j,model.getVal(x[i,j])) start_time = [0]*(n+1) for (i,j) in u: if model.getVal(u[i,j]) > EPS: print(u[i,j].name,i,j,model.getVal(u[i,j])) start_time[j] += model.getVal(u[i,j]) start = [i for v,i in sorted([(start_time[i],i) for i in range(1,n+1)])] print(start)
7,537
31.491379
106
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/vrp.py
""" vrp.py: solve the vehicle routing problem. approach: - start with assignment model - add cuts until all components of the graph are connected Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random import networkx from pyscipopt import Model, quicksum, multidict def solve_vrp(V,c,m,q,Q): """solve_vrp -- solve the vehicle routing problem. - start with assignment model (depot has a special status) - add cuts until all components of the graph are connected Parameters: - V: set/list of nodes in the graph - c[i,j]: cost for traversing edge (i,j) - m: number of vehicles available - q[i]: demand for customer i - Q: vehicle capacity Returns the optimum objective value and the list of edges used. """ def addcut(cut_edges): """addcut: add constraint to eliminate infeasible solutions Parameters: - cut_edges: list of edges in the current solution, except connections to depot Returns True if a cut was added, False otherwise """ G = networkx.Graph() G.add_edges_from(cut_edges) Components = networkx.connected_components(G) cut = False for S in Components: S_card = len(S) q_sum = sum(q[i] for i in S) NS = int(math.ceil(float(q_sum)/Q)) S_edges = [(i,j) for i in S for j in S if i<j and (i,j) in cut_edges] if S_card >= 3 and (len(S_edges) >= S_card or NS > 1): add = model.addCons(quicksum(x[i,j] for i in S for j in S if j > i) <= S_card-NS) cut = True return cut model = Model("vrp") x = {} for i in V: for j in V: if j > i and i == V[0]: # depot x[i,j] = model.addVar(ub=2, vtype="I", name="x(%s,%s)"%(i,j)) elif j > i: x[i,j] = model.addVar(ub=1, vtype="I", name="x(%s,%s)"%(i,j)) model.addCons(quicksum(x[V[0],j] for j in V[1:]) == 2*m, "DegreeDepot") for i in V[1:]: model.addCons(quicksum(x[j,i] for j in V if j < i) + quicksum(x[i,j] for j in V if j > i) == 2, "Degree(%s)"%i) model.setObjective(quicksum(c[i,j]*x[i,j] for i in V for j in V if j>i), "minimize") model.hideOutput() EPS = 1.e-6 while True: model.optimize() edges = [] for (i,j) in x: if model.getVal(x[i,j]) > EPS: if i != V[0] and j != V[0]: edges.append((i,j)) if addcut(edges) == False: break return model.getObjVal(),edges def distance(x1,y1,x2,y2): """distance: euclidean distance between (x1,y1) and (x2,y2)""" return math.sqrt((x2-x1)**2 + (y2-y1)**2) def make_data(n): """make_data: compute matrix distance based on euclidean distance""" V = range(1,n+1) x = dict([(i,random.random()) for i in V]) y = dict([(i,random.random()) for i in V]) c,q = {},{} Q = 100 for i in V: q[i] = random.randint(10,20) for j in V: if j > i: c[i,j] = distance(x[i],y[i],x[j],y[j]) return V,c,q,Q if __name__ == "__main__": import sys n = 19 m = 3 seed = 1 random.seed(seed) V,c,q,Q = make_data(n) z,edges = solve_vrp(V,c,m,q,Q) print("Optimal solution:",z) print("Edges in the solution:") print(sorted(edges))
3,456
29.866071
97
py
PB-DFS
PB-DFS-master/PySCIPOpt/examples/unfinished/vrp_lazy.py
""" vrp.py: model for the vehicle routing problem using callback for adding cuts. approach: - start with assignment model - add cuts until all components of the graph are connected Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ import math import random import networkx from pyscipopt import Model, Conshdlr, quicksum, multidict, SCIP_RESULT, SCIP_PRESOLTIMING, SCIP_PROPTIMING class VRPconshdlr(Conshdlr): def addCuts(self, checkonly): """add cuts if necessary and return whether model is feasible""" cutsadded = False edges = [] x = self.model.data for (i, j) in x: if self.model.getVal(x[i, j]) > .5: if i != V[0] and j != V[0]: edges.append((i, j)) G = networkx.Graph() G.add_edges_from(edges) Components = list(networkx.connected_components(G)) for S in Components: S_card = len(S) q_sum = sum(q[i] for i in S) NS = int(math.ceil(float(q_sum) / Q)) S_edges = [(i, j) for i in S for j in S if i < j and (i, j) in edges] if S_card >= 3 and (len(S_edges) >= S_card or NS > 1): cutsadded = True if checkonly: break else: self.model.addCons(quicksum(x[i, j] for i in S for j in S if j > i) <= S_card - NS) print("adding cut for", S_edges) return cutsadded def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason): if self.addCuts(checkonly = True): return {"result": SCIP_RESULT.INFEASIBLE} else: return {"result": SCIP_RESULT.FEASIBLE} def consenfolp(self, constraints, nusefulconss, solinfeasible): if self.addCuts(checkonly = False): return {"result": SCIP_RESULT.CONSADDED} else: return {"result": SCIP_RESULT.FEASIBLE} def conslock(self, constraint, nlockspos, nlocksneg): pass def vrp(V, c, m, q, Q): """solve_vrp -- solve the vehicle routing problem. - start with assignment model (depot has a special status) - add cuts until all components of the graph are connected Parameters: - V: set/list of nodes in the graph - c[i,j]: cost for traversing edge (i,j) - m: number of vehicles available - q[i]: demand for customer i - Q: vehicle capacity Returns the optimum objective value and the list of edges used. """ model = Model("vrp") vrp_conshdlr = VRPconshdlr() x = {} for i in V: for j in V: if j > i and i == V[0]: # depot x[i,j] = model.addVar(ub=2, vtype="I", name="x(%s,%s)"%(i,j)) elif j > i: x[i,j] = model.addVar(ub=1, vtype="I", name="x(%s,%s)"%(i,j)) model.addCons(quicksum(x[V[0],j] for j in V[1:]) == 2*m, "DegreeDepot") for i in V[1:]: model.addCons(quicksum(x[j,i] for j in V if j < i) + quicksum(x[i,j] for j in V if j > i) == 2, "Degree(%s)"%i) model.setObjective(quicksum(c[i,j]*x[i,j] for i in V for j in V if j>i), "minimize") model.data = x return model, vrp_conshdlr def distance(x1,y1,x2,y2): """distance: euclidean distance between (x1,y1) and (x2,y2)""" return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) def make_data(n): """make_data: compute matrix distance based on euclidean distance""" V = range(1,n+1) x = dict([(i, random.random()) for i in V]) y = dict([(i, random.random()) for i in V]) c, q = {}, {} Q = 100 for i in V: q[i] = random.randint(10, 20) for j in V: if j > i: c[i, j] = distance(x[i], y[i], x[j], y[j]) return V, c, q, Q if __name__ == "__main__": n = 19 m = 3 seed = 1 random.seed(seed) V,c,q,Q = make_data(n) model, conshdlr = vrp(V, c, m, q, Q) model.setBoolParam("misc/allowdualreds", 0) model.includeConshdlr(conshdlr, "VRP", "VRP constraint handler", sepapriority = 0, enfopriority = 1, chckpriority = 1, sepafreq = -1, propfreq = -1, eagerfreq = -1, maxprerounds = 0, delaysepa = False, delayprop = False, needscons = False, presoltiming = SCIP_PRESOLTIMING.FAST, proptiming = SCIP_PROPTIMING.BEFORELP) model.optimize() x = model.data edges = [] for (i, j) in x: if model.getVal(x[i, j]) > .5: if i != V[0] and j != V[0]: edges.append((i, j)) print("Optimal solution:", model.getObjVal()) print("Edges in the solution:") print(sorted(edges))
4,744
33.136691
116
py
PB-DFS
PB-DFS-master/PySCIPOpt/src/pyscipopt/Multidict.py
##@file Multidict.py #@brief Implementation of Multidictionaries def multidict(D): '''creates a multidictionary''' keys = list(D.keys()) if len(keys) == 0: return [[]] try: N = len(D[keys[0]]) islist = True except: N = 1 islist = False dlist = [dict() for d in range(N)] for k in keys: if islist: for i in range(N): dlist[i][k] = D[k][i] else: dlist[0][k] = D[k] return [keys]+dlist
511
22.272727
43
py
PB-DFS
PB-DFS-master/PySCIPOpt/src/pyscipopt/__init__.py
__version__ = '2.1.5' # export user-relevant objects: from pyscipopt.Multidict import multidict from pyscipopt.scip import Model from pyscipopt.scip import Benders from pyscipopt.scip import Benderscut from pyscipopt.scip import Branchrule from pyscipopt.scip import Nodesel from pyscipopt.scip import Conshdlr from pyscipopt.scip import Eventhdlr from pyscipopt.scip import Heur from pyscipopt.scip import Presol from pyscipopt.scip import Pricer from pyscipopt.scip import Prop from pyscipopt.scip import Sepa from pyscipopt.scip import LP from pyscipopt.scip import Expr from pyscipopt.scip import quicksum from pyscipopt.scip import quickprod from pyscipopt.scip import exp from pyscipopt.scip import log from pyscipopt.scip import sqrt from pyscipopt.scip import PY_SCIP_RESULT as SCIP_RESULT from pyscipopt.scip import PY_SCIP_PARAMSETTING as SCIP_PARAMSETTING from pyscipopt.scip import PY_SCIP_PARAMEMPHASIS as SCIP_PARAMEMPHASIS from pyscipopt.scip import PY_SCIP_STATUS as SCIP_STATUS from pyscipopt.scip import PY_SCIP_STAGE as SCIP_STAGE from pyscipopt.scip import PY_SCIP_PROPTIMING as SCIP_PROPTIMING from pyscipopt.scip import PY_SCIP_PRESOLTIMING as SCIP_PRESOLTIMING from pyscipopt.scip import PY_SCIP_HEURTIMING as SCIP_HEURTIMING from pyscipopt.scip import PY_SCIP_EVENTTYPE as SCIP_EVENTTYPE from pyscipopt.scip import PY_SCIP_LPSOLSTAT as SCIP_LPSOLSTAT from pyscipopt.scip import PY_SCIP_BRANCHDIR as SCIP_BRANCHDIR from pyscipopt.scip import PY_SCIP_BENDERSENFOTYPE as SCIP_BENDERSENFOTYPE
1,701
46.277778
79
py
PB-DFS
PB-DFS-master/PySCIPOpt/src/pyscipopt/scip.c
/* Generated by Cython 0.29.24 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [ "/home/joey/py-venv-test/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h", "/home/joey/py-venv-test/lib/python3.6/site-packages/numpy/core/include/numpy/npy_math.h", "/home/joey/py-venv-test/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h" ], "extra_link_args": [ "-Wl,-rpath,/home/joey/storage/PB-DFS/PySCIPOpt/lib" ], "include_dirs": [ "/home/joey/storage/PB-DFS/PySCIPOpt/include", "/home/joey/py-venv-test/lib/python3.6/site-packages/numpy/core/include" ], "libraries": [ "scip" ], "library_dirs": [ "/home/joey/storage/PB-DFS/PySCIPOpt/lib" ], "name": "pyscipopt.scip", "sources": [ "src/pyscipopt/scip.pyx" ] }, "module_name": "pyscipopt.scip" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else #define CYTHON_ABI "0_29_24" #define CYTHON_HEX_VERSION 0x001D18F0 #define CYTHON_FUTURE_DIVISION 1 #include <stddef.h> #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x02070000 #define HAVE_LONG_LONG #endif #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif #ifndef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR # if defined(__cplusplus) template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #endif #endif #else #include <stdint.h> #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) && __cplusplus >= 201103L #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__ ) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 #define PyMem_RawMalloc(n) PyMem_Malloc(n) #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) #define PyMem_RawFree(p) PyMem_Free(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) #else #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if defined(PyUnicode_IS_READY) #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #else #define __Pyx_PyUnicode_READY(op) (0) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include <math.h> #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pyscipopt__scip #define __PYX_HAVE_API__pyscipopt__scip /* Early includes */ #include "scip/scip.h" #include "scip/tree.h" #include "scip/scipdefplugins.h" #include "scip/cons_linear.h" #include "scip/cons_quadratic.h" #include "scip/cons_sos1.h" #include "scip/cons_sos2.h" #include "scip/cons_and.h" #include "scip/cons_or.h" #include "scip/cons_xor.h" #include "blockmemshell/memory.h" #include "nlpi/pub_expr.h" #include "scip/pub_nlp.h" #include "scip/cons_nonlinear.h" #include "scip/cons_cardinality.h" #include "scip/cons_indicator.h" #include "scip/cons_countsols.h" #include "scip/paramset.h" #include "scip/pub_lp.h" #include "scip/lp.h" #include "scip/def.h" #include "scip/struct_branch.h" #include "scip/type_misc.h" #include "time.h" #include "scip/struct_clock.h" #include "scip/type_history.h" #include "scip/struct_stat.h" #include <string.h> #include <stdio.h> #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" /* NumPy API declarations from "numpy/__init__.pxd" */ #include "pythread.h" #include <stdlib.h> #include "numpy/npy_math.h" #include <math.h> #ifdef _OPENMP #include <omp.h> #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include <cstdlib> #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; /* Header.proto */ #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include <complex> #else #include <complex.h> #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "src/pyscipopt/expr.pxi", "src/pyscipopt/lp.pxi", "src/pyscipopt/benders.pxi", "src/pyscipopt/scip.pyx", "stringsource", "src/pyscipopt/benderscut.pxi", "src/pyscipopt/branchrule.pxi", "src/pyscipopt/conshdlr.pxi", "src/pyscipopt/event.pxi", "src/pyscipopt/heuristic.pxi", "src/pyscipopt/presol.pxi", "src/pyscipopt/pricer.pxi", "src/pyscipopt/propagator.pxi", "src/pyscipopt/sepa.pxi", "src/pyscipopt/relax.pxi", "src/pyscipopt/nodesel.pxi", "__init__.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; /* BufferFormatStructs.proto */ #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":689 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":690 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":691 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":692 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":696 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":697 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":698 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":699 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":703 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":704 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":713 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":714 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":715 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":717 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":718 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":719 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":721 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":722 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":724 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":725 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":726 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); /* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); /*--- Type declarations ---*/ struct __pyx_obj_9pyscipopt_4scip_Expr; struct __pyx_obj_9pyscipopt_4scip_ExprCons; struct __pyx_obj_9pyscipopt_4scip_GenExpr; struct __pyx_obj_9pyscipopt_4scip_SumExpr; struct __pyx_obj_9pyscipopt_4scip_ProdExpr; struct __pyx_obj_9pyscipopt_4scip_VarExpr; struct __pyx_obj_9pyscipopt_4scip_PowExpr; struct __pyx_obj_9pyscipopt_4scip_UnaryExpr; struct __pyx_obj_9pyscipopt_4scip_Constant; struct __pyx_obj_9pyscipopt_4scip_LP; struct __pyx_obj_9pyscipopt_4scip_Benders; struct __pyx_obj_9pyscipopt_4scip_Benderscut; struct __pyx_obj_9pyscipopt_4scip_Branchrule; struct __pyx_obj_9pyscipopt_4scip_Conshdlr; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr; struct __pyx_obj_9pyscipopt_4scip_Heur; struct __pyx_obj_9pyscipopt_4scip_Presol; struct __pyx_obj_9pyscipopt_4scip_Pricer; struct __pyx_obj_9pyscipopt_4scip_Prop; struct __pyx_obj_9pyscipopt_4scip_Sepa; struct __pyx_obj_9pyscipopt_4scip_Relax; struct __pyx_obj_9pyscipopt_4scip_Nodesel; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR; struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE; struct __pyx_obj_9pyscipopt_4scip_Event; struct __pyx_obj_9pyscipopt_4scip_Column; struct __pyx_obj_9pyscipopt_4scip_Row; struct __pyx_obj_9pyscipopt_4scip_Solution; struct __pyx_obj_9pyscipopt_4scip_Node; struct __pyx_obj_9pyscipopt_4scip_Variable; struct __pyx_obj_9pyscipopt_4scip_Constraint; struct __pyx_obj_9pyscipopt_4scip_Model; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":728 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":729 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":730 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":732 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* "src/pyscipopt/expr.pxi":143 * ##@details Polynomial expressions of variables with operator overloading. \n * #See also the @ref ExprDetails "description" in the expr.pxi. * cdef class Expr: # <<<<<<<<<<<<<< * cdef public terms * */ struct __pyx_obj_9pyscipopt_4scip_Expr { PyObject_HEAD PyObject *terms; }; /* "src/pyscipopt/expr.pxi":303 * * * cdef class ExprCons: # <<<<<<<<<<<<<< * '''Constraints with a polynomial expressions and lower/upper bounds.''' * cdef public expr */ struct __pyx_obj_9pyscipopt_4scip_ExprCons { PyObject_HEAD PyObject *expr; PyObject *_lhs; PyObject *_rhs; }; /* "src/pyscipopt/expr.pxi":429 * # * #See also the @ref ExprDetails "description" in the expr.pxi. * cdef class GenExpr: # <<<<<<<<<<<<<< * cdef public operatorIndex * cdef public _op */ struct __pyx_obj_9pyscipopt_4scip_GenExpr { PyObject_HEAD PyObject *operatorIndex; PyObject *_op; PyObject *children; }; /* "src/pyscipopt/expr.pxi":609 * * # Sum Expressions * cdef class SumExpr(GenExpr): # <<<<<<<<<<<<<< * * cdef public constant */ struct __pyx_obj_9pyscipopt_4scip_SumExpr { struct __pyx_obj_9pyscipopt_4scip_GenExpr __pyx_base; PyObject *constant; PyObject *coefs; }; /* "src/pyscipopt/expr.pxi":624 * * # Prod Expressions * cdef class ProdExpr(GenExpr): # <<<<<<<<<<<<<< * cdef public constant * def __init__(self): */ struct __pyx_obj_9pyscipopt_4scip_ProdExpr { struct __pyx_obj_9pyscipopt_4scip_GenExpr __pyx_base; PyObject *constant; }; /* "src/pyscipopt/expr.pxi":635 * * # Var Expressions * cdef class VarExpr(GenExpr): # <<<<<<<<<<<<<< * cdef public var * def __init__(self, var): */ struct __pyx_obj_9pyscipopt_4scip_VarExpr { struct __pyx_obj_9pyscipopt_4scip_GenExpr __pyx_base; PyObject *var; }; /* "src/pyscipopt/expr.pxi":645 * * # Pow Expressions * cdef class PowExpr(GenExpr): # <<<<<<<<<<<<<< * cdef public expo * def __init__(self): */ struct __pyx_obj_9pyscipopt_4scip_PowExpr { struct __pyx_obj_9pyscipopt_4scip_GenExpr __pyx_base; PyObject *expo; }; /* "src/pyscipopt/expr.pxi":656 * * # Exp, Log, Sqrt Expressions * cdef class UnaryExpr(GenExpr): # <<<<<<<<<<<<<< * def __init__(self, op, expr): * self.children = [] */ struct __pyx_obj_9pyscipopt_4scip_UnaryExpr { struct __pyx_obj_9pyscipopt_4scip_GenExpr __pyx_base; }; /* "src/pyscipopt/expr.pxi":666 * * # class for constant expressions * cdef class Constant(GenExpr): # <<<<<<<<<<<<<< * cdef public number * def __init__(self,number): */ struct __pyx_obj_9pyscipopt_4scip_Constant { struct __pyx_obj_9pyscipopt_4scip_GenExpr __pyx_base; PyObject *number; }; /* "src/pyscipopt/lp.pxi":3 * ##@file lp.pxi * #@brief Base class of the LP Plugin * cdef class LP: # <<<<<<<<<<<<<< * cdef SCIP_LPI* lpi * cdef readonly str name */ struct __pyx_obj_9pyscipopt_4scip_LP { PyObject_HEAD SCIP_LPI *lpi; PyObject *name; }; /* "src/pyscipopt/benders.pxi":3 * ##@file benders.pxi * #@brief Base class of the Benders decomposition Plugin * cdef class Benders: # <<<<<<<<<<<<<< * cdef public Model model * cdef public str name */ struct __pyx_obj_9pyscipopt_4scip_Benders { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; PyObject *name; }; /* "src/pyscipopt/benderscut.pxi":3 * ##@file benderscut.pxi * #@brief Base class of the Benderscut Plugin * cdef class Benderscut: # <<<<<<<<<<<<<< * cdef public Model model * cdef public Benders benders */ struct __pyx_obj_9pyscipopt_4scip_Benderscut { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; struct __pyx_obj_9pyscipopt_4scip_Benders *benders; PyObject *name; }; /* "src/pyscipopt/branchrule.pxi":3 * ##@file branchrule.pxi * #@brief Base class of the Branchrule Plugin * cdef class Branchrule: # <<<<<<<<<<<<<< * cdef public Model model * */ struct __pyx_obj_9pyscipopt_4scip_Branchrule { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; }; /* "src/pyscipopt/conshdlr.pxi":4 * #@brief base class of the Constraint Handler plugin * * cdef class Conshdlr: # <<<<<<<<<<<<<< * cdef public Model model * cdef public str name */ struct __pyx_obj_9pyscipopt_4scip_Conshdlr { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; PyObject *name; }; /* "src/pyscipopt/event.pxi":3 * ##@file event.pxi * #@brief Base class of the Event Handler Plugin * cdef class Eventhdlr: # <<<<<<<<<<<<<< * cdef public Model model * cdef public str name */ struct __pyx_obj_9pyscipopt_4scip_Eventhdlr { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; PyObject *name; }; /* "src/pyscipopt/heuristic.pxi":3 * ##@file heuristic.pxi * #@brief Base class of the Heuristics Plugin * cdef class Heur: # <<<<<<<<<<<<<< * cdef public Model model * cdef public str name */ struct __pyx_obj_9pyscipopt_4scip_Heur { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; PyObject *name; }; /* "src/pyscipopt/presol.pxi":3 * ##@file presol.pxi * #@brief Base class of the Presolver Plugin * cdef class Presol: # <<<<<<<<<<<<<< * cdef public Model model * */ struct __pyx_obj_9pyscipopt_4scip_Presol { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; }; /* "src/pyscipopt/pricer.pxi":3 * ##@file pricer.pxi * #@brief Base class of the Pricers Plugin * cdef class Pricer: # <<<<<<<<<<<<<< * cdef public Model model * */ struct __pyx_obj_9pyscipopt_4scip_Pricer { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; }; /* "src/pyscipopt/propagator.pxi":3 * ##@file propagator.pxi * #@brief Base class of the Propagators Plugin * cdef class Prop: # <<<<<<<<<<<<<< * cdef public Model model * */ struct __pyx_obj_9pyscipopt_4scip_Prop { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; }; /* "src/pyscipopt/sepa.pxi":3 * ##@file sepa.pxi * #@brief Base class of the Separator Plugin * cdef class Sepa: # <<<<<<<<<<<<<< * cdef public Model model * cdef public str name */ struct __pyx_obj_9pyscipopt_4scip_Sepa { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; PyObject *name; }; /* "src/pyscipopt/relax.pxi":3 * ##@file relax.pxi * #@brief Base class of the Relaxator Plugin * cdef class Relax: # <<<<<<<<<<<<<< * cdef public Model model * cdef public str name */ struct __pyx_obj_9pyscipopt_4scip_Relax { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; PyObject *name; }; /* "src/pyscipopt/nodesel.pxi":3 * ##@file nodesel.pxi * #@brief Base class of the Nodesel Plugin * cdef class Nodesel: # <<<<<<<<<<<<<< * cdef public Model model * */ struct __pyx_obj_9pyscipopt_4scip_Nodesel { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Model *model; }; /* "pyscipopt/scip.pyx":50 * # In __init__.py this is imported as SCIP_RESULT to keep the * # original naming scheme using capital letters * cdef class PY_SCIP_RESULT: # <<<<<<<<<<<<<< * DIDNOTRUN = SCIP_DIDNOTRUN * DELAYED = SCIP_DELAYED */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT { PyObject_HEAD }; /* "pyscipopt/scip.pyx":69 * SUCCESS = SCIP_SUCCESS * * cdef class PY_SCIP_PARAMSETTING: # <<<<<<<<<<<<<< * DEFAULT = SCIP_PARAMSETTING_DEFAULT * AGGRESSIVE = SCIP_PARAMSETTING_AGGRESSIVE */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING { PyObject_HEAD }; /* "pyscipopt/scip.pyx":75 * OFF = SCIP_PARAMSETTING_OFF * * cdef class PY_SCIP_PARAMEMPHASIS: # <<<<<<<<<<<<<< * DEFAULT = SCIP_PARAMEMPHASIS_DEFAULT * CPSOLVER = SCIP_PARAMEMPHASIS_CPSOLVER */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS { PyObject_HEAD }; /* "pyscipopt/scip.pyx":87 * PHASEPROOF = SCIP_PARAMEMPHASIS_PHASEPROOF * * cdef class PY_SCIP_STATUS: # <<<<<<<<<<<<<< * UNKNOWN = SCIP_STATUS_UNKNOWN * USERINTERRUPT = SCIP_STATUS_USERINTERRUPT */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS { PyObject_HEAD }; /* "pyscipopt/scip.pyx":104 * INFORUNBD = SCIP_STATUS_INFORUNBD * * cdef class PY_SCIP_STAGE: # <<<<<<<<<<<<<< * INIT = SCIP_STAGE_INIT * PROBLEM = SCIP_STAGE_PROBLEM */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE { PyObject_HEAD }; /* "pyscipopt/scip.pyx":120 * FREE = SCIP_STAGE_FREE * * cdef class PY_SCIP_NODETYPE: # <<<<<<<<<<<<<< * FOCUSNODE = SCIP_NODETYPE_FOCUSNODE * PROBINGNODE = SCIP_NODETYPE_PROBINGNODE */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE { PyObject_HEAD }; /* "pyscipopt/scip.pyx":134 * * * cdef class PY_SCIP_PROPTIMING: # <<<<<<<<<<<<<< * BEFORELP = SCIP_PROPTIMING_BEFORELP * DURINGLPLOOP = SCIP_PROPTIMING_DURINGLPLOOP */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING { PyObject_HEAD }; /* "pyscipopt/scip.pyx":140 * AFTERLPNODE = SCIP_PROPTIMING_AFTERLPNODE * * cdef class PY_SCIP_PRESOLTIMING: # <<<<<<<<<<<<<< * NONE = SCIP_PRESOLTIMING_NONE * FAST = SCIP_PRESOLTIMING_FAST */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING { PyObject_HEAD }; /* "pyscipopt/scip.pyx":146 * EXHAUSTIVE = SCIP_PRESOLTIMING_EXHAUSTIVE * * cdef class PY_SCIP_HEURTIMING: # <<<<<<<<<<<<<< * BEFORENODE = SCIP_HEURTIMING_BEFORENODE * DURINGLPLOOP = SCIP_HEURTIMING_DURINGLPLOOP */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING { PyObject_HEAD }; /* "pyscipopt/scip.pyx":159 * AFTERPROPLOOP = SCIP_HEURTIMING_AFTERPROPLOOP * * cdef class PY_SCIP_EVENTTYPE: # <<<<<<<<<<<<<< * DISABLED = SCIP_EVENTTYPE_DISABLED * VARADDED = SCIP_EVENTTYPE_VARADDED */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE { PyObject_HEAD }; /* "pyscipopt/scip.pyx":196 * SYNC = SCIP_EVENTTYPE_SYNC * * cdef class PY_SCIP_LPSOLSTAT: # <<<<<<<<<<<<<< * NOTSOLVED = SCIP_LPSOLSTAT_NOTSOLVED * OPTIMAL = SCIP_LPSOLSTAT_OPTIMAL */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT { PyObject_HEAD }; /* "pyscipopt/scip.pyx":206 * ERROR = SCIP_LPSOLSTAT_ERROR * * cdef class PY_SCIP_BRANCHDIR: # <<<<<<<<<<<<<< * DOWNWARDS = SCIP_BRANCHDIR_DOWNWARDS * UPWARDS = SCIP_BRANCHDIR_UPWARDS */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR { PyObject_HEAD }; /* "pyscipopt/scip.pyx":212 * AUTO = SCIP_BRANCHDIR_AUTO * * cdef class PY_SCIP_BENDERSENFOTYPE: # <<<<<<<<<<<<<< * LP = SCIP_BENDERSENFOTYPE_LP * RELAX = SCIP_BENDERSENFOTYPE_RELAX */ struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE { PyObject_HEAD }; /* "pyscipopt/scip.pyx":260 * raise Exception('SCIP: unknown return code!') * * cdef class Event: # <<<<<<<<<<<<<< * cdef SCIP_EVENT* event * # can be used to store problem data */ struct __pyx_obj_9pyscipopt_4scip_Event { PyObject_HEAD struct __pyx_vtabstruct_9pyscipopt_4scip_Event *__pyx_vtab; SCIP_EVENT *event; PyObject *data; }; /* "pyscipopt/scip.pyx":296 * return Node.create(node) * * cdef class Column: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_COL""" * cdef SCIP_COL* scip_col */ struct __pyx_obj_9pyscipopt_4scip_Column { PyObject_HEAD struct __pyx_vtabstruct_9pyscipopt_4scip_Column *__pyx_vtab; SCIP_COL *scip_col; PyObject *data; }; /* "pyscipopt/scip.pyx":347 * return SCIPcolGetUb(self.scip_col) * * cdef class Row: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_ROW""" * cdef SCIP_ROW* scip_row */ struct __pyx_obj_9pyscipopt_4scip_Row { PyObject_HEAD struct __pyx_vtabstruct_9pyscipopt_4scip_Row *__pyx_vtab; SCIP_ROW *scip_row; PyObject *data; }; /* "pyscipopt/scip.pyx":416 * return [vals[i] for i in range(self.getNNonz())] * * cdef class Solution: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_SOL""" * cdef SCIP_SOL* sol */ struct __pyx_obj_9pyscipopt_4scip_Solution { PyObject_HEAD struct __pyx_vtabstruct_9pyscipopt_4scip_Solution *__pyx_vtab; SCIP_SOL *sol; PyObject *data; }; /* "pyscipopt/scip.pyx":428 * return sol * * cdef class Node: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_NODE""" * cdef SCIP_NODE* scip_node */ struct __pyx_obj_9pyscipopt_4scip_Node { PyObject_HEAD struct __pyx_vtabstruct_9pyscipopt_4scip_Node *__pyx_vtab; SCIP_NODE *scip_node; PyObject *data; }; /* "pyscipopt/scip.pyx":492 * * * cdef class Variable(Expr): # <<<<<<<<<<<<<< * """Is a linear expression and has SCIP_VAR*""" * cdef SCIP_VAR* scip_var */ struct __pyx_obj_9pyscipopt_4scip_Variable { struct __pyx_obj_9pyscipopt_4scip_Expr __pyx_base; struct __pyx_vtabstruct_9pyscipopt_4scip_Variable *__pyx_vtab; SCIP_VAR *scip_var; PyObject *data; }; /* "pyscipopt/scip.pyx":577 * * * cdef class Constraint: # <<<<<<<<<<<<<< * cdef SCIP_CONS* scip_cons * # can be used to store problem data */ struct __pyx_obj_9pyscipopt_4scip_Constraint { PyObject_HEAD struct __pyx_vtabstruct_9pyscipopt_4scip_Constraint *__pyx_vtab; SCIP_CONS *scip_cons; PyObject *data; }; /* "pyscipopt/scip.pyx":665 * #@anchor Model * ## * cdef class Model: # <<<<<<<<<<<<<< * cdef SCIP* _scip * cdef SCIP_Bool* _valid */ struct __pyx_obj_9pyscipopt_4scip_Model { PyObject_HEAD SCIP *_scip; SCIP_Bool *_valid; struct __pyx_obj_9pyscipopt_4scip_Solution *_bestSol; PyObject *data; PyObject *__weakref__; }; /* "src/pyscipopt/expr.pxi":88 * __slots__ = ('vartuple', 'ptrtuple', 'hashval') * * def __init__(self, *vartuple): # <<<<<<<<<<<<<< * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ { PyObject_HEAD PyObject *__pyx_v_self; }; /* "src/pyscipopt/expr.pxi":90 * def __init__(self, *vartuple): * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) # <<<<<<<<<<<<<< * self.hashval = sum(self.ptrtuple) * */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *__pyx_outer_scope; PyObject *__pyx_v_v; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "src/pyscipopt/expr.pxi":295 * return 'Expr(%s)' % repr(self.terms) * * def degree(self): # <<<<<<<<<<<<<< * '''computes highest degree of terms''' * if len(self.terms) == 0: */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self; }; /* "src/pyscipopt/expr.pxi":300 * return 0 * else: * return max(len(v) for v in self.terms) # <<<<<<<<<<<<<< * * */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *__pyx_outer_scope; PyObject *__pyx_v_v; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "src/pyscipopt/lp.pxi":89 * free(c_inds) * * def addCols(self, entrieslist, objs = None, lbs = None, ubs = None): # <<<<<<<<<<<<<< * """Adds multiple columns to the LP. * */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols { PyObject_HEAD PyObject *__pyx_v_entrieslist; }; /* "src/pyscipopt/lp.pxi":100 * * ncols = len(entrieslist) * nnonz = sum(len(entries) for entries in entrieslist) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_objs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *__pyx_outer_scope; PyObject *__pyx_v_entries; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "src/pyscipopt/lp.pxi":183 * free(c_inds) * * def addRows(self, entrieslist, lhss = None, rhss = None): # <<<<<<<<<<<<<< * """Adds multiple rows to the LP. * */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows { PyObject_HEAD PyObject *__pyx_v_entrieslist; }; /* "src/pyscipopt/lp.pxi":192 * """ * nrows = len(entrieslist) * nnonz = sum(len(entries) for entries in entrieslist) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) */ struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr { PyObject_HEAD struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *__pyx_outer_scope; PyObject *__pyx_v_entries; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "pyscipopt/scip.pyx":260 * raise Exception('SCIP: unknown return code!') * * cdef class Event: # <<<<<<<<<<<<<< * cdef SCIP_EVENT* event * # can be used to store problem data */ struct __pyx_vtabstruct_9pyscipopt_4scip_Event { PyObject *(*create)(SCIP_EVENT *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Event *__pyx_vtabptr_9pyscipopt_4scip_Event; /* "pyscipopt/scip.pyx":296 * return Node.create(node) * * cdef class Column: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_COL""" * cdef SCIP_COL* scip_col */ struct __pyx_vtabstruct_9pyscipopt_4scip_Column { PyObject *(*create)(SCIP_COL *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Column *__pyx_vtabptr_9pyscipopt_4scip_Column; /* "pyscipopt/scip.pyx":347 * return SCIPcolGetUb(self.scip_col) * * cdef class Row: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_ROW""" * cdef SCIP_ROW* scip_row */ struct __pyx_vtabstruct_9pyscipopt_4scip_Row { PyObject *(*create)(SCIP_ROW *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Row *__pyx_vtabptr_9pyscipopt_4scip_Row; /* "pyscipopt/scip.pyx":416 * return [vals[i] for i in range(self.getNNonz())] * * cdef class Solution: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_SOL""" * cdef SCIP_SOL* sol */ struct __pyx_vtabstruct_9pyscipopt_4scip_Solution { PyObject *(*create)(SCIP_SOL *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Solution *__pyx_vtabptr_9pyscipopt_4scip_Solution; /* "pyscipopt/scip.pyx":428 * return sol * * cdef class Node: # <<<<<<<<<<<<<< * """Base class holding a pointer to corresponding SCIP_NODE""" * cdef SCIP_NODE* scip_node */ struct __pyx_vtabstruct_9pyscipopt_4scip_Node { PyObject *(*create)(SCIP_NODE *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Node *__pyx_vtabptr_9pyscipopt_4scip_Node; /* "pyscipopt/scip.pyx":492 * * * cdef class Variable(Expr): # <<<<<<<<<<<<<< * """Is a linear expression and has SCIP_VAR*""" * cdef SCIP_VAR* scip_var */ struct __pyx_vtabstruct_9pyscipopt_4scip_Variable { PyObject *(*create)(SCIP_VAR *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Variable *__pyx_vtabptr_9pyscipopt_4scip_Variable; /* "pyscipopt/scip.pyx":577 * * * cdef class Constraint: # <<<<<<<<<<<<<< * cdef SCIP_CONS* scip_cons * # can be used to store problem data */ struct __pyx_vtabstruct_9pyscipopt_4scip_Constraint { PyObject *(*create)(SCIP_CONS *); }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Constraint *__pyx_vtabptr_9pyscipopt_4scip_Constraint; /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* pyobject_as_double.proto */ static double __Pyx__PyObject_AsDouble(PyObject* obj); #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj)\ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\ likely(PyInt_CheckExact(obj)) ?\ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj)\ ((likely(PyFloat_CheckExact(obj))) ?\ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() PyErr_Occurred() #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* PyIntCompare.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } #define __Pyx_GetModuleGlobalNameUncached(var, name) {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall2Args.proto */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyFloatBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_EqObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); #else #define __Pyx_PyFloat_EqObjC(op1, op2, floatval, inplace, zerodivision_check)\ (PyObject_RichCompare(op1, op2, Py_EQ)) #endif /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif /* None.proto */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto */ #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ (likely(is_tuple || PyTuple_Check(tuple)) ?\ (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); static int __Pyx_unpack_tuple2_generic( PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* IterNext.proto */ #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /* py_abs.proto */ #if CYTHON_USE_PYLONG_INTERNALS static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num); #define __Pyx_PyNumber_Absolute(x)\ ((likely(PyLong_CheckExact(x))) ?\ (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\ PyNumber_Absolute(x)) #else #define __Pyx_PyNumber_Absolute(x) PyNumber_Absolute(x) #endif /* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /* UnpackUnboundCMethod.proto */ typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; /* CallUnboundCMethod1.proto */ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #else #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) #endif /* CallUnboundCMethod2.proto */ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); #else #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif /* PyFloatBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_NeObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); #else #define __Pyx_PyFloat_NeObjC(op1, op2, floatval, inplace, zerodivision_check)\ (PyObject_RichCompare(op1, op2, Py_NE)) #endif /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* PyObjectFormatAndDecref.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); /* IncludeStringH.proto */ #include <string.h> /* JoinPyUnicode.proto */ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #define __Pyx_PyObject_Dict_GetItem(obj, name)\ (likely(PyDict_CheckExact(obj)) ?\ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) #endif /* decode_c_string_utf16.proto */ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 0; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = -1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } /* decode_c_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* decode_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_bytes( PyObject* string, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { return __Pyx_decode_c_bytes( PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), start, stop, encoding, errors, decode_func); } /* decode_c_string.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* PyFloatBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); #else #define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2)) #endif /* PyIntCompare.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* UnicodeAsUCS4.proto */ static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); /* object_ord.proto */ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyObject_Ord(c)\ (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c)) #else #define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c) #endif static long __Pyx__PyObject_Ord(PyObject* c); /* PyObjectLookupSpecial.proto */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return __Pyx_PyObject_GetAttrStr(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #else #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* IsLittleEndian.proto */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); /* BufferFormatCheck.proto */ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type); /* BufferGetAndValidate.proto */ #define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ ((obj == Py_None || obj == NULL) ?\ (__Pyx_ZeroBuffer(buf), 0) :\ __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static void __Pyx_ZeroBuffer(Py_buffer* buf); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; /* BufferFallbackError.proto */ static void __Pyx_RaiseBufferFallbackError(void); /* BufferIndexError.proto */ static void __Pyx_RaiseBufferIndexError(int axis); #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) /* SetItemInt.proto */ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /* TypeImport.proto */ #ifndef __PYX_HAVE_RT_ImportType_proto #define __PYX_HAVE_RT_ImportType_proto enum __Pyx_ImportType_CheckSize { __Pyx_ImportType_CheckSize_Error = 0, __Pyx_ImportType_CheckSize_Warn = 1, __Pyx_ImportType_CheckSize_Ignore = 2 }; static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); #endif /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* BufferStructDeclare.proto */ typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif /* GCCDiagnostics.proto */ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* RealImag.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if defined(__cplusplus) && CYTHON_CCOMPLEX\ && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif /* Arithmetic.proto */ #if CYTHON_CCOMPLEX #define __Pyx_c_eq_float(a, b) ((a)==(b)) #define __Pyx_c_sum_float(a, b) ((a)+(b)) #define __Pyx_c_diff_float(a, b) ((a)-(b)) #define __Pyx_c_prod_float(a, b) ((a)*(b)) #define __Pyx_c_quot_float(a, b) ((a)/(b)) #define __Pyx_c_neg_float(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero_float(z) ((z)==(float)0) #define __Pyx_c_conj_float(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs_float(z) (::std::abs(z)) #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero_float(z) ((z)==0) #define __Pyx_c_conj_float(z) (conjf(z)) #if 1 #define __Pyx_c_abs_float(z) (cabsf(z)) #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif /* Arithmetic.proto */ #if CYTHON_CCOMPLEX #define __Pyx_c_eq_double(a, b) ((a)==(b)) #define __Pyx_c_sum_double(a, b) ((a)+(b)) #define __Pyx_c_diff_double(a, b) ((a)-(b)) #define __Pyx_c_prod_double(a, b) ((a)*(b)) #define __Pyx_c_quot_double(a, b) ((a)/(b)) #define __Pyx_c_neg_double(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero_double(z) ((z)==(double)0) #define __Pyx_c_conj_double(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs_double(z) (::std::abs(z)) #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero_double(z) ((z)==0) #define __Pyx_c_conj_double(z) (conj(z)) #if 1 #define __Pyx_c_abs_double(z) (cabs(z)) #define __Pyx_c_pow_double(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPROP value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_RESULT(SCIP_RESULT value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PARAMSETTING(SCIP_PARAMSETTING value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PROPTIMING(SCIP_PROPTIMING value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BRANCHDIR(SCIP_BRANCHDIR value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(SCIP_BENDERSENFOTYPE value); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_RETCODE __Pyx_PyInt_As_SCIP_RETCODE(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_RETCODE(SCIP_RETCODE value); /* CIntFromPy.proto */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_RESULT __Pyx_PyInt_As_SCIP_RESULT(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_LOCKTYPE(SCIP_LOCKTYPE value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BOUNDTYPE(SCIP_BOUNDTYPE value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_Longint(SCIP_Longint value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BOUNDCHGTYPE(SCIP_BOUNDCHGTYPE value); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_PARAMSETTING __Pyx_PyInt_As_SCIP_PARAMSETTING(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_EXPROP __Pyx_PyInt_As_SCIP_EXPROP(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_BENDERSENFOTYPE __Pyx_PyInt_As_SCIP_BENDERSENFOTYPE(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_PROPTIMING __Pyx_PyInt_As_SCIP_PROPTIMING(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_PRESOLTIMING __Pyx_PyInt_As_SCIP_PRESOLTIMING(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_BRANCHDIR __Pyx_PyInt_As_SCIP_BRANCHDIR(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_EVENTTYPE __Pyx_PyInt_As_SCIP_EVENTTYPE(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_Longint __Pyx_PyInt_As_SCIP_Longint(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); /* CIntFromPy.proto */ static CYTHON_INLINE SCIP_PARAMEMPHASIS __Pyx_PyInt_As_SCIP_PARAMEMPHASIS(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); /* CIntFromPy.proto */ static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* CoroutineBase.proto */ typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_ExcInfoStruct _PyErr_StackItem #else typedef struct { PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; } __Pyx_ExcInfoStruct; #endif typedef struct { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; __Pyx_ExcInfoStruct gi_exc_state; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; PyObject *gi_modulename; PyObject *gi_code; PyObject *gi_frame; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); static int __Pyx_Coroutine_clear(PyObject *self); static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_Coroutine_SwapException(self) #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) #else #define __Pyx_Coroutine_SwapException(self) {\ __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ } #define __Pyx_Coroutine_ResetAndClearException(self) {\ __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ } #endif #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) #endif static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); /* PatchModuleWithCoroutine.proto */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); /* PatchGeneratorABC.proto */ static int __Pyx_patch_abc(void); /* Generator.proto */ #define __Pyx_Generator_USED static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static PyObject *__pyx_f_9pyscipopt_4scip_5Event_create(SCIP_EVENT *__pyx_v_scip_event); /* proto*/ static PyObject *__pyx_f_9pyscipopt_4scip_6Column_create(SCIP_COL *__pyx_v_scipcol); /* proto*/ static PyObject *__pyx_f_9pyscipopt_4scip_3Row_create(SCIP_ROW *__pyx_v_sciprow); /* proto*/ static PyObject *__pyx_f_9pyscipopt_4scip_8Solution_create(SCIP_SOL *__pyx_v_scip_sol); /* proto*/ static PyObject *__pyx_f_9pyscipopt_4scip_4Node_create(SCIP_NODE *__pyx_v_scipnode); /* proto*/ static PyObject *__pyx_f_9pyscipopt_4scip_8Variable_create(SCIP_VAR *__pyx_v_scipvar); /* proto*/ static PyObject *__pyx_f_9pyscipopt_4scip_10Constraint_create(SCIP_CONS *__pyx_v_scipcons); /* proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'numpy.math' */ /* Module declarations from 'libc.math' */ /* Module declarations from 'pyscipopt.scip' */ static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Expr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_ExprCons = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_GenExpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_SumExpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_ProdExpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_VarExpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PowExpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_UnaryExpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Constant = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_LP = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Benders = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Benderscut = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Branchrule = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Conshdlr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Eventhdlr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Heur = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Presol = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Pricer = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Prop = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Sepa = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Relax = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Nodesel = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Event = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Column = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Row = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Solution = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Node = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Variable = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Constraint = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip_Model = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct____init__ = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_1_genexpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_2_degree = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_3_genexpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_4_addCols = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_5_genexpr = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_6_addRows = 0; static PyTypeObject *__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_7_genexpr = 0; static struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_f_9pyscipopt_4scip_getPyVar(SCIP_VAR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersCopy(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersFree(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersInit(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersExit(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersInitpre(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersExitpre(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersInitsol(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersExitsol(SCIP *, SCIP_BENDERS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersCreatesub(SCIP *, SCIP_BENDERS *, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersPresubsolve(SCIP *, SCIP_BENDERS *, SCIP_SOL *, SCIP_BENDERSENFOTYPE, SCIP_Bool, SCIP_Bool *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersSolvesubconvex(SCIP *, SCIP_BENDERS *, SCIP_SOL *, int, SCIP_Bool, SCIP_Real *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersSolvesub(SCIP *, SCIP_BENDERS *, SCIP_SOL *, int, SCIP_Real *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersPostsolve(SCIP *, SCIP_BENDERS *, SCIP_SOL *, SCIP_BENDERSENFOTYPE, int *, int, int, SCIP_Bool, SCIP_Bool, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersFreesub(SCIP *, SCIP_BENDERS *, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersGetvar(SCIP *, SCIP_BENDERS *, SCIP_VAR *, SCIP_VAR **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutCopy(SCIP *, SCIP_BENDERS *, SCIP_BENDERSCUT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutFree(SCIP *, SCIP_BENDERSCUT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutInit(SCIP *, SCIP_BENDERSCUT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutExit(SCIP *, SCIP_BENDERSCUT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutInitsol(SCIP *, SCIP_BENDERSCUT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutExitsol(SCIP *, SCIP_BENDERSCUT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutExec(SCIP *, SCIP_BENDERS *, SCIP_BENDERSCUT *, SCIP_SOL *, int, SCIP_BENDERSENFOTYPE, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleCopy(SCIP *, SCIP_BRANCHRULE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleFree(SCIP *, SCIP_BRANCHRULE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleInit(SCIP *, SCIP_BRANCHRULE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExit(SCIP *, SCIP_BRANCHRULE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleInitsol(SCIP *, SCIP_BRANCHRULE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExitsol(SCIP *, SCIP_BRANCHRULE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExeclp(SCIP *, SCIP_BRANCHRULE *, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExecext(SCIP *, SCIP_BRANCHRULE *, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExecps(SCIP *, SCIP_BRANCHRULE *, SCIP_Bool, SCIP_RESULT *); /*proto*/ static struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_f_9pyscipopt_4scip_getPyConshdlr(SCIP_CONSHDLR *); /*proto*/ static struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_f_9pyscipopt_4scip_getPyCons(SCIP_CONS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConshdlrCopy(SCIP *, SCIP_CONSHDLR *, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsFree(SCIP *, SCIP_CONSHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInit(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsExit(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInitpre(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsExitpre(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInitsol(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsExitsol(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, SCIP_Bool); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDelete(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, SCIP_CONSDATA **); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsTrans(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, SCIP_CONS **); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInitlp(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsSepalp(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsSepasol(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, SCIP_SOL *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnfolp(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnforelax(SCIP *, SCIP_SOL *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnfops(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, SCIP_Bool, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsCheck(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, SCIP_SOL *, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsProp(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, int, SCIP_PROPTIMING, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsPresol(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int, int, SCIP_PRESOLTIMING, int, int, int, int, int, int, int, int, int, int, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsResprop(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, SCIP_VAR *, int, SCIP_BOUNDTYPE, SCIP_BDCHGIDX *, SCIP_Real, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsLock(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, SCIP_LOCKTYPE, int, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsActive(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDeactive(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnable(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDisable(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDelvars(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsPrint(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, FILE *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsCopy(SCIP *, SCIP_CONS **, char const *, SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, SCIP_HASHMAP *, SCIP_HASHMAP *, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsParse(SCIP *, SCIP_CONSHDLR *, SCIP_CONS **, char const *, char const *, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsGetvars(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, SCIP_VAR **, int, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsGetnvars(SCIP *, SCIP_CONSHDLR *, SCIP_CONS *, int *, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsGetdivebdchgs(SCIP *, SCIP_CONSHDLR *, SCIP_DIVESET *, SCIP_SOL *, SCIP_Bool *, SCIP_Bool *); /*proto*/ static struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_f_9pyscipopt_4scip_getPyEventhdlr(SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventCopy(SCIP *, SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventFree(SCIP *, SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventInit(SCIP *, SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventExit(SCIP *, SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventInitsol(SCIP *, SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventExitsol(SCIP *, SCIP_EVENTHDLR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventDelete(SCIP *, SCIP_EVENTHDLR *, SCIP_EVENTDATA **); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventExec(SCIP *, SCIP_EVENTHDLR *, SCIP_EVENT *, SCIP_EVENTDATA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurCopy(SCIP *, SCIP_HEUR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurFree(SCIP *, SCIP_HEUR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurInit(SCIP *, SCIP_HEUR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurExit(SCIP *, SCIP_HEUR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurInitsol(SCIP *, SCIP_HEUR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurExitsol(SCIP *, SCIP_HEUR *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurExec(SCIP *, SCIP_HEUR *, SCIP_HEURTIMING, SCIP_Bool, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolCopy(SCIP *, SCIP_PRESOL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolFree(SCIP *, SCIP_PRESOL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolInit(SCIP *, SCIP_PRESOL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolExit(SCIP *, SCIP_PRESOL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolInitpre(SCIP *, SCIP_PRESOL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolExitpre(SCIP *, SCIP_PRESOL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolExec(SCIP *, SCIP_PRESOL *, int, SCIP_PRESOLTIMING, int, int, int, int, int, int, int, int, int, int, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerCopy(SCIP *, SCIP_PRICER *, SCIP_Bool *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerFree(SCIP *, SCIP_PRICER *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerInit(SCIP *, SCIP_PRICER *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerExit(SCIP *, SCIP_PRICER *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerInitsol(SCIP *, SCIP_PRICER *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerExitsol(SCIP *, SCIP_PRICER *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerRedcost(SCIP *, SCIP_PRICER *, SCIP_Real *, SCIP_Bool *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerFarkas(SCIP *, SCIP_PRICER *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropCopy(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropFree(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropInit(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExit(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropInitpre(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExitpre(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropInitsol(SCIP *, SCIP_PROP *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExitsol(SCIP *, SCIP_PROP *, SCIP_Bool); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropPresol(SCIP *, SCIP_PROP *, int, SCIP_PRESOLTIMING, int, int, int, int, int, int, int, int, int, int, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExec(SCIP *, SCIP_PROP *, SCIP_PROPTIMING, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropResProp(SCIP *, SCIP_PROP *, SCIP_VAR *, int, SCIP_BOUNDTYPE, SCIP_BDCHGIDX *, SCIP_Real, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaCopy(SCIP *, SCIP_SEPA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaFree(SCIP *, SCIP_SEPA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaInit(SCIP *, SCIP_SEPA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExit(SCIP *, SCIP_SEPA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaInitsol(SCIP *, SCIP_SEPA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExitsol(SCIP *, SCIP_SEPA *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExeclp(SCIP *, SCIP_SEPA *, SCIP_RESULT *, unsigned int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExecsol(SCIP *, SCIP_SEPA *, SCIP_SOL *, SCIP_RESULT *, unsigned int); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxCopy(SCIP *, SCIP_RELAX *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxFree(SCIP *, SCIP_RELAX *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxInit(SCIP *, SCIP_RELAX *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxExit(SCIP *, SCIP_RELAX *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxInitsol(SCIP *, SCIP_RELAX *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxExitsol(SCIP *, SCIP_RELAX *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxExec(SCIP *, SCIP_RELAX *, SCIP_Real *, SCIP_RESULT *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselCopy(SCIP *, SCIP_NODESEL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselFree(SCIP *, SCIP_NODESEL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselInit(SCIP *, SCIP_NODESEL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselExit(SCIP *, SCIP_NODESEL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselInitsol(SCIP *, SCIP_NODESEL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselExitsol(SCIP *, SCIP_NODESEL *); /*proto*/ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselSelect(SCIP *, SCIP_NODESEL *, SCIP_NODE **); /*proto*/ static int __pyx_f_9pyscipopt_4scip_PyNodeselComp(SCIP *, SCIP_NODESEL *, SCIP_NODE *, SCIP_NODE *); /*proto*/ static void __pyx_f_9pyscipopt_4scip_relayMessage(SCIP_MESSAGEHDLR *, FILE *, char const *); /*proto*/ static void __pyx_f_9pyscipopt_4scip_relayErrorMessage(void *, FILE *, char const *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Expr__set_state(struct __pyx_obj_9pyscipopt_4scip_Expr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_ExprCons__set_state(struct __pyx_obj_9pyscipopt_4scip_ExprCons *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_GenExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_GenExpr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_SumExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_SumExpr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_ProdExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_VarExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_VarExpr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PowExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_PowExpr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_UnaryExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Constant__set_state(struct __pyx_obj_9pyscipopt_4scip_Constant *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Benders__set_state(struct __pyx_obj_9pyscipopt_4scip_Benders *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Benderscut__set_state(struct __pyx_obj_9pyscipopt_4scip_Benderscut *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Branchrule__set_state(struct __pyx_obj_9pyscipopt_4scip_Branchrule *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Conshdlr__set_state(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Eventhdlr__set_state(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Heur__set_state(struct __pyx_obj_9pyscipopt_4scip_Heur *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Presol__set_state(struct __pyx_obj_9pyscipopt_4scip_Presol *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Pricer__set_state(struct __pyx_obj_9pyscipopt_4scip_Pricer *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Prop__set_state(struct __pyx_obj_9pyscipopt_4scip_Prop *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Sepa__set_state(struct __pyx_obj_9pyscipopt_4scip_Sepa *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Relax__set_state(struct __pyx_obj_9pyscipopt_4scip_Relax *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Nodesel__set_state(struct __pyx_obj_9pyscipopt_4scip_Nodesel *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_RESULT__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STATUS__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STAGE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_NODETYPE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PROPTIMING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_HEURTIMING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *, PyObject *); /*proto*/ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *, PyObject *); /*proto*/ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "float_t", NULL, sizeof(__pyx_t_5numpy_float_t), { 0 }, 0, 'R', 0, 0 }; #define __Pyx_MODULE_NAME "pyscipopt.scip" extern int __pyx_module_is_main_pyscipopt__scip; int __pyx_module_is_main_pyscipopt__scip = 0; /* Implementation of 'pyscipopt.scip' */ static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_sorted; static PyObject *__pyx_builtin_sum; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_max; static PyObject *__pyx_builtin_ZeroDivisionError; static PyObject *__pyx_builtin_map; static PyObject *__pyx_builtin_Warning; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_print; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_LookupError; static PyObject *__pyx_builtin_open; static PyObject *__pyx_builtin_chr; static PyObject *__pyx_builtin_ImportError; static const char __pyx_k_[] = ", "; static const char __pyx_k_B[] = "B"; static const char __pyx_k_C[] = "C"; static const char __pyx_k_I[] = "I"; static const char __pyx_k_c[] = "c"; static const char __pyx_k_e[] = "e"; static const char __pyx_k_f[] = "f"; static const char __pyx_k_v[] = "v"; static const char __pyx_k_w[] = "w"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_LP[] = "LP"; static const char __pyx_k_Op[] = "Op"; static const char __pyx_k__5[] = ")"; static const char __pyx_k__8[] = "("; static const char __pyx_k__9[] = ","; static const char __pyx_k_eq[] = "__eq__"; static const char __pyx_k_lb[] = "lb"; static const char __pyx_k_np[] = "np"; static const char __pyx_k_op[] = "op"; static const char __pyx_k_or[] = "or"; static const char __pyx_k_rc[] = "rc"; static const char __pyx_k_ub[] = "ub"; static const char __pyx_k_OFF[] = "OFF"; static const char __pyx_k_Row[] = "Row"; static const char __pyx_k__84[] = ""; static const char __pyx_k_abs[] = "abs"; static const char __pyx_k_add[] = "__add__"; static const char __pyx_k_and[] = "and"; static const char __pyx_k_chr[] = "chr"; static const char __pyx_k_cip[] = ".cip"; static const char __pyx_k_col[] = "col"; static const char __pyx_k_cut[] = "cut"; static const char __pyx_k_div[] = "__div__"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_exp[] = "exp"; static const char __pyx_k_gap[] = "gap"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_idx[] = "idx"; static const char __pyx_k_inf[] = "inf"; static const char __pyx_k_key[] = "key"; static const char __pyx_k_lbs[] = "lbs"; static const char __pyx_k_len[] = "__len__"; static const char __pyx_k_lhs[] = "lhs"; static const char __pyx_k_log[] = "log"; static const char __pyx_k_map[] = "map"; static const char __pyx_k_max[] = "max"; static const char __pyx_k_mul[] = "__mul__"; static const char __pyx_k_new[] = "__new__"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_pos[] = "pos"; static const char __pyx_k_ptr[] = "ptr"; static const char __pyx_k_rhs[] = "rhs"; static const char __pyx_k_row[] = "row"; static const char __pyx_k_sol[] = "sol"; static const char __pyx_k_sum[] = "sum"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_ubs[] = "ubs"; static const char __pyx_k_val[] = "val"; static const char __pyx_k_var[] = "var"; static const char __pyx_k_xor[] = "xor"; static const char __pyx_k_AUTO[] = "AUTO"; static const char __pyx_k_Expr[] = "Expr"; static const char __pyx_k_FAST[] = "FAST"; static const char __pyx_k_FORK[] = "FORK"; static const char __pyx_k_FREE[] = "FREE"; static const char __pyx_k_Heur[] = "Heur"; static const char __pyx_k_INIT[] = "INIT"; static const char __pyx_k_LEAF[] = "LEAF"; static const char __pyx_k_NONE[] = "NONE"; static const char __pyx_k_Node[] = "Node"; static const char __pyx_k_Prop[] = "Prop"; static const char __pyx_k_SYNC[] = "SYNC"; static const char __pyx_k_Sepa[] = "Sepa"; static const char __pyx_k_Term[] = "Term"; static const char __pyx_k__132[] = "+"; static const char __pyx_k__133[] = "-"; static const char __pyx_k__134[] = "*"; static const char __pyx_k__135[] = "/"; static const char __pyx_k__136[] = "**"; static const char __pyx_k_ages[] = "ages"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_both[] = "both"; static const char __pyx_k_ceil[] = "ceil"; static const char __pyx_k_coef[] = "coef"; static const char __pyx_k_cons[] = "cons"; static const char __pyx_k_copy[] = "copy"; static const char __pyx_k_desc[] = "desc"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_dual[] = "dual"; static const char __pyx_k_exit[] = "__exit__"; static const char __pyx_k_expo[] = "expo"; static const char __pyx_k_expr[] = "expr"; static const char __pyx_k_fabs[] = "fabs"; static const char __pyx_k_file[] = "file"; static const char __pyx_k_flag[] = "flag"; static const char __pyx_k_free[] = "free"; static const char __pyx_k_freq[] = "freq"; static const char __pyx_k_hash[] = "__hash__"; static const char __pyx_k_heur[] = "heur"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_keys[] = "keys"; static const char __pyx_k_lhss[] = "lhss"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_math[] = "math"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_nlps[] = "nlps"; static const char __pyx_k_nnzs[] = "nnzs"; static const char __pyx_k_node[] = "node"; static const char __pyx_k_objs[] = "objs"; static const char __pyx_k_op_2[] = "_op"; static const char __pyx_k_open[] = "open"; static const char __pyx_k_plus[] = "plus"; static const char __pyx_k_prod[] = "prod"; static const char __pyx_k_prop[] = "prop"; static const char __pyx_k_repr[] = "__repr__"; static const char __pyx_k_rhss[] = "rhss"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_sepa[] = "sepa"; static const char __pyx_k_side[] = "side"; static const char __pyx_k_sqrt[] = "sqrt"; static const char __pyx_k_term[] = "term"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_true[] = "true"; static const char __pyx_k_val1[] = "val1"; static const char __pyx_k_val2[] = "val2"; static const char __pyx_k_vals[] = "vals"; static const char __pyx_k_vars[] = "vars"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_zero[] = "zero"; static const char __pyx_k_CHECK[] = "CHECK"; static const char __pyx_k_CHILD[] = "CHILD"; static const char __pyx_k_CONST[] = "CONST"; static const char __pyx_k_ERROR[] = "ERROR"; static const char __pyx_k_Event[] = "Event"; static const char __pyx_k_FIXED[] = "FIXED"; static const char __pyx_k_MAJOR[] = "MAJOR"; static const char __pyx_k_MINOR[] = "MINOR"; static const char __pyx_k_Model[] = "Model"; static const char __pyx_k_PATCH[] = "PATCH"; static const char __pyx_k_RELAX[] = "RELAX"; static const char __pyx_k_Relax[] = "Relax"; static const char __pyx_k_add_2[] = "add"; static const char __pyx_k_basic[] = "basic"; static const char __pyx_k_check[] = "check"; static const char __pyx_k_child[] = "child"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_clear[] = "clear"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_coeff[] = "coeff"; static const char __pyx_k_coefs[] = "coefs"; static const char __pyx_k_const[] = "const"; static const char __pyx_k_cutlp[] = "cutlp"; static const char __pyx_k_delay[] = "delay"; static const char __pyx_k_depth[] = "depth"; static const char __pyx_k_div_2[] = "div"; static const char __pyx_k_dtype[] = "dtype"; static const char __pyx_k_empty[] = "empty"; static const char __pyx_k_enter[] = "__enter__"; static const char __pyx_k_exact[] = "exact"; static const char __pyx_k_float[] = "float"; static const char __pyx_k_floor[] = "floor"; static const char __pyx_k_force[] = "force"; static const char __pyx_k_getOp[] = "getOp"; static const char __pyx_k_int32[] = "int32"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_itlim[] = "itlim"; static const char __pyx_k_lhs_2[] = "_lhs"; static const char __pyx_k_local[] = "local"; static const char __pyx_k_lower[] = "lower"; static const char __pyx_k_minus[] = "minus"; static const char __pyx_k_model[] = "model"; static const char __pyx_k_mul_2[] = "mul"; static const char __pyx_k_ncols[] = "ncols"; static const char __pyx_k_nnzrs[] = "nnzrs"; static const char __pyx_k_node1[] = "node1"; static const char __pyx_k_node2[] = "node2"; static const char __pyx_k_nodes[] = "nodes"; static const char __pyx_k_norms[] = "norms"; static const char __pyx_k_nrows[] = "nrows"; static const char __pyx_k_nruns[] = "nruns"; static const char __pyx_k_numpy[] = "numpy"; static const char __pyx_k_nvars[] = "nvars"; static const char __pyx_k_other[] = "other"; static const char __pyx_k_power[] = "power"; static const char __pyx_k_print[] = "print"; static const char __pyx_k_proxy[] = "proxy"; static const char __pyx_k_ps_up[] = "ps_up"; static const char __pyx_k_quiet[] = "quiet"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_relax[] = "relax"; static const char __pyx_k_rhs_2[] = "_rhs"; static const char __pyx_k_sense[] = "sense"; static const char __pyx_k_shape[] = "shape"; static const char __pyx_k_slack[] = "slack"; static const char __pyx_k_slots[] = "__slots__"; static const char __pyx_k_stats[] = "stats"; static const char __pyx_k_terms[] = "terms"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_trans[] = "trans"; static const char __pyx_k_types[] = "types"; static const char __pyx_k_upper[] = "upper"; static const char __pyx_k_utf_8[] = "utf-8"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_vtype[] = "vtype"; static const char __pyx_k_write[] = "write"; static const char __pyx_k_zeros[] = "zeros"; static const char __pyx_k_BINARY[] = "BINARY"; static const char __pyx_k_CUTOFF[] = "CUTOFF"; static const char __pyx_k_Column[] = "Column"; static const char __pyx_k_Expr_s[] = "Expr(%s)"; static const char __pyx_k_HARDLP[] = "HARDLP"; static const char __pyx_k_MEDIUM[] = "MEDIUM"; static const char __pyx_k_ORcons[] = "ORcons"; static const char __pyx_k_PSEUDO[] = "PSEUDO"; static const char __pyx_k_Presol[] = "Presol"; static const char __pyx_k_Pricer[] = "Pricer"; static const char __pyx_k_SOLVED[] = "SOLVED"; static const char __pyx_k_Term_s[] = "Term(%s)"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_bdtype[] = "bdtype"; static const char __pyx_k_binvar[] = "binvar"; static const char __pyx_k_coeffs[] = "coeffs"; static const char __pyx_k_create[] = "create"; static const char __pyx_k_degree[] = "degree"; static const char __pyx_k_extend[] = "extend"; static const char __pyx_k_fileno[] = "fileno"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_getObj[] = "getObj"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_lambda[] = "<lambda>"; static const char __pyx_k_linear[] = "linear"; static const char __pyx_k_lp_obj[] = "lp_obj"; static const char __pyx_k_merged[] = "merged"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_newEnf[] = "newEnf"; static const char __pyx_k_newRem[] = "newRem"; static const char __pyx_k_newlhs[] = "newlhs"; static const char __pyx_k_newobj[] = "newobj"; static const char __pyx_k_newrhs[] = "newrhs"; static const char __pyx_k_newval[] = "newval"; static const char __pyx_k_nnodes[] = "nnodes"; static const char __pyx_k_number[] = "number"; static const char __pyx_k_offset[] = "offset"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_presol[] = "presol"; static const char __pyx_k_pricer[] = "pricer"; static const char __pyx_k_ps_sum[] = "ps_sum"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_result[] = "result"; static const char __pyx_k_resvar[] = "resvar"; static const char __pyx_k_rhsvar[] = "rhsvar"; static const char __pyx_k_sorted[] = "sorted"; static const char __pyx_k_stderr[] = "stderr"; static const char __pyx_k_stdout[] = "stdout"; static const char __pyx_k_timing[] = "timing"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_varidx[] = "varidx"; static const char __pyx_k_weight[] = "weight"; static const char __pyx_k_ANDcons[] = "ANDcons"; static const char __pyx_k_Benders[] = "Benders"; static const char __pyx_k_COUNTER[] = "COUNTER"; static const char __pyx_k_DEADEND[] = "DEADEND"; static const char __pyx_k_DEFAULT[] = "DEFAULT"; static const char __pyx_k_DELAYED[] = "DELAYED"; static const char __pyx_k_EASYCIP[] = "EASYCIP"; static const char __pyx_k_GenExpr[] = "GenExpr"; static const char __pyx_k_INTEGER[] = "INTEGER"; static const char __pyx_k_IOError[] = "IOError"; static const char __pyx_k_LPEVENT[] = "LPEVENT"; static const char __pyx_k_Nodesel[] = "Nodesel"; static const char __pyx_k_OPTIMAL[] = "OPTIMAL"; static const char __pyx_k_PROBLEM[] = "PROBLEM"; static const char __pyx_k_PowExpr[] = "PowExpr"; static const char __pyx_k_SIBLING[] = "SIBLING"; static const char __pyx_k_SOLVELP[] = "SOLVELP"; static const char __pyx_k_SOLVING[] = "SOLVING"; static const char __pyx_k_SUBROOT[] = "SUBROOT"; static const char __pyx_k_SUCCESS[] = "SUCCESS"; static const char __pyx_k_SumExpr[] = "SumExpr"; static const char __pyx_k_UNKNOWN[] = "UNKNOWN"; static const char __pyx_k_UPWARDS[] = "UPWARDS"; static const char __pyx_k_VarExpr[] = "VarExpr"; static const char __pyx_k_Warning[] = "Warning"; static const char __pyx_k_XORcons[] = "XORcons"; static const char __pyx_k_abspath[] = "abspath"; static const char __pyx_k_benders[] = "benders"; static const char __pyx_k_cardval[] = "cardval"; static const char __pyx_k_col_lbs[] = "col_lbs"; static const char __pyx_k_col_ubs[] = "col_ubs"; static const char __pyx_k_colidxs[] = "colidxs"; static const char __pyx_k_confvar[] = "confvar"; static const char __pyx_k_dynamic[] = "dynamic"; static const char __pyx_k_enforce[] = "enforce"; static const char __pyx_k_entries[] = "entries"; static const char __pyx_k_float32[] = "float32"; static const char __pyx_k_freqofs[] = "freqofs"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_getType[] = "getType"; static const char __pyx_k_getVars[] = "getVars"; static const char __pyx_k_getitem[] = "__getitem__"; static const char __pyx_k_hashval[] = "hashval"; static const char __pyx_k_incvals[] = "incvals"; static const char __pyx_k_indices[] = "indices"; static const char __pyx_k_indvars[] = "indvars"; static const char __pyx_k_initial[] = "initial"; static const char __pyx_k_isLocal[] = "isLocal"; static const char __pyx_k_islpcut[] = "islpcut"; static const char __pyx_k_lastcol[] = "lastcol"; static const char __pyx_k_lastrow[] = "lastrow"; static const char __pyx_k_lhs_vec[] = "lhs_vec"; static const char __pyx_k_lincons[] = "lincons"; static const char __pyx_k_linking[] = "linking"; static const char __pyx_k_logicor[] = "logicor"; static const char __pyx_k_nchgbds[] = "nchgbds"; static const char __pyx_k_newInit[] = "newInit"; static const char __pyx_k_nleaves[] = "nleaves"; static const char __pyx_k_nodesel[] = "nodesel"; static const char __pyx_k_nrounds[] = "nrounds"; static const char __pyx_k_nzrcoef[] = "nzrcoef"; static const char __pyx_k_optimal[] = "optimal"; static const char __pyx_k_os_path[] = "os.path"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_ps_down[] = "ps_down"; static const char __pyx_k_restart[] = "restart"; static const char __pyx_k_rhs_vec[] = "rhs_vec"; static const char __pyx_k_rowidxs[] = "rowidxs"; static const char __pyx_k_selnode[] = "selnode"; static const char __pyx_k_solvals[] = "solvals"; static const char __pyx_k_success[] = "success"; static const char __pyx_k_sumexpr[] = "sumexpr"; static const char __pyx_k_truediv[] = "__truediv__"; static const char __pyx_k_unknown[] = "unknown"; static const char __pyx_k_varexpr[] = "varexpr"; static const char __pyx_k_version[] = "version"; static const char __pyx_k_weakref[] = "weakref"; static const char __pyx_k_weights[] = "weights"; static const char __pyx_k_BEFORELP[] = "BEFORELP"; static const char __pyx_k_BRANCHED[] = "BRANCHED"; static const char __pyx_k_CPSOLVER[] = "CPSOLVER"; static const char __pyx_k_Conshdlr[] = "Conshdlr"; static const char __pyx_k_Constant[] = "Constant"; static const char __pyx_k_DISABLED[] = "DISABLED"; static const char __pyx_k_ExprCons[] = "ExprCons("; static const char __pyx_k_FEASIBLE[] = "FEASIBLE"; static const char __pyx_k_FOUNDSOL[] = "FOUNDSOL"; static const char __pyx_k_GAPLIMIT[] = "GAPLIMIT"; static const char __pyx_k_JUNCTION[] = "JUNCTION"; static const char __pyx_k_KeyError[] = "KeyError"; static const char __pyx_k_LPSOLVED[] = "LPSOLVED"; static const char __pyx_k_MEMLIMIT[] = "MEMLIMIT"; static const char __pyx_k_NEWROUND[] = "NEWROUND"; static const char __pyx_k_OBJLIMIT[] = "OBJLIMIT"; static const char __pyx_k_Operator[] = "Operator"; static const char __pyx_k_ProdExpr[] = "ProdExpr"; static const char __pyx_k_SOLLIMIT[] = "SOLLIMIT"; static const char __pyx_k_SOS1cons[] = "SOS1cons"; static const char __pyx_k_SOS2cons[] = "SOS2cons"; static const char __pyx_k_Solution[] = "Solution"; static const char __pyx_k_VARADDED[] = "VARADDED"; static const char __pyx_k_VARFIXED[] = "VARFIXED"; static const char __pyx_k_Variable[] = "Variable"; static const char __pyx_k_cdeg_max[] = "cdeg_max"; static const char __pyx_k_cdeg_min[] = "cdeg_min"; static const char __pyx_k_cdeg_var[] = "cdeg_var"; static const char __pyx_k_checkint[] = "checkint"; static const char __pyx_k_children[] = "children"; static const char __pyx_k_comments[] = "comments"; static const char __pyx_k_cons_lhs[] = "cons_lhs"; static const char __pyx_k_cons_rhs[] = "cons_rhs"; static const char __pyx_k_conscopy[] = "conscopy"; static const char __pyx_k_consexit[] = "consexit"; static const char __pyx_k_consfree[] = "consfree"; static const char __pyx_k_conshdlr[] = "conshdlr"; static const char __pyx_k_consinit[] = "consinit"; static const char __pyx_k_conslock[] = "conslock"; static const char __pyx_k_consprop[] = "consprop"; static const char __pyx_k_constant[] = "constant"; static const char __pyx_k_consvars[] = "consvars"; static const char __pyx_k_cutrelax[] = "cutrelax"; static const char __pyx_k_dispchar[] = "dispchar"; static const char __pyx_k_dualsols[] = "dualsols"; static const char __pyx_k_enfotype[] = "enfotype"; static const char __pyx_k_estimate[] = "estimate"; static const char __pyx_k_filename[] = "filename"; static const char __pyx_k_firstcol[] = "firstcol"; static const char __pyx_k_firstrow[] = "firstrow"; static const char __pyx_k_fixedval[] = "fixedval"; static const char __pyx_k_forcecut[] = "forcecut"; static const char __pyx_k_getNNonz[] = "getNNonz"; static const char __pyx_k_getStage[] = "getStage"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_heurexec[] = "heurexec"; static const char __pyx_k_heurexit[] = "heurexit"; static const char __pyx_k_heurfree[] = "heurfree"; static const char __pyx_k_heurinit[] = "heurinit"; static const char __pyx_k_infinity[] = "infinity"; static const char __pyx_k_is_local[] = "is_local"; static const char __pyx_k_knapsack[] = "knapsack"; static const char __pyx_k_locktype[] = "locktype"; static const char __pyx_k_maxdepth[] = "maxdepth"; static const char __pyx_k_maximize[] = "maximize"; static const char __pyx_k_minimize[] = "minimize"; static const char __pyx_k_nduallps[] = "nduallps"; static const char __pyx_k_newCheck[] = "newCheck"; static const char __pyx_k_newbound[] = "newbound"; static const char __pyx_k_nlocksup[] = "nlocksup"; static const char __pyx_k_nnodelps[] = "nnodelps"; static const char __pyx_k_nodecomp[] = "nodecomp"; static const char __pyx_k_nodeexit[] = "nodeexit"; static const char __pyx_k_nodefree[] = "nodefree"; static const char __pyx_k_nodeinit[] = "nodeinit"; static const char __pyx_k_onlyroot[] = "onlyroot"; static const char __pyx_k_origcopy[] = "origcopy"; static const char __pyx_k_original[] = "original"; static const char __pyx_k_priority[] = "priority"; static const char __pyx_k_prodexpr[] = "prodexpr"; static const char __pyx_k_propexec[] = "propexec"; static const char __pyx_k_propexit[] = "propexit"; static const char __pyx_k_propfree[] = "propfree"; static const char __pyx_k_propfreq[] = "propfreq"; static const char __pyx_k_propinit[] = "propinit"; static const char __pyx_k_ps_ratio[] = "ps_ratio"; static const char __pyx_k_ptrtuple[] = "ptrtuple"; static const char __pyx_k_pyx_type[] = "__pyx_type"; static const char __pyx_k_quadcons[] = "quadcons"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_quicksum[] = "quicksum"; static const char __pyx_k_redcosts[] = "redcosts"; static const char __pyx_k_sepaexit[] = "sepaexit"; static const char __pyx_k_sepafree[] = "sepafree"; static const char __pyx_k_sepafreq[] = "sepafreq"; static const char __pyx_k_sepainit[] = "sepainit"; static const char __pyx_k_separate[] = "separate"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_shareaux[] = "shareaux"; static const char __pyx_k_solfracs[] = "solfracs"; static const char __pyx_k_solution[] = "solution"; static const char __pyx_k_solvecip[] = "solvecip"; static const char __pyx_k_splitext[] = "splitext"; static const char __pyx_k_termlist[] = "termlist"; static const char __pyx_k_transgap[] = "transgap"; static const char __pyx_k_varbound[] = "varbound"; static const char __pyx_k_variable[] = "variable"; static const char __pyx_k_vartuple[] = "vartuple"; static const char __pyx_k_warnings[] = "warnings"; static const char __pyx_k_CONSADDED[] = "CONSADDED"; static const char __pyx_k_DIDNOTRUN[] = "DIDNOTRUN"; static const char __pyx_k_DOWNWARDS[] = "DOWNWARDS"; static const char __pyx_k_EXITSOLVE[] = "EXITSOLVE"; static const char __pyx_k_Eventhdlr[] = "Eventhdlr"; static const char __pyx_k_FOCUSNODE[] = "FOCUSNODE"; static const char __pyx_k_FREETRANS[] = "FREETRANS"; static const char __pyx_k_IMPLADDED[] = "IMPLADDED"; static const char __pyx_k_INFORUNBD[] = "INFORUNBD"; static const char __pyx_k_INITSOLVE[] = "INITSOLVE"; static const char __pyx_k_ITERLIMIT[] = "ITERLIMIT"; static const char __pyx_k_LBRELAXED[] = "LBRELAXED"; static const char __pyx_k_NODELIMIT[] = "NODELIMIT"; static const char __pyx_k_NOTSOLVED[] = "NOTSOLVED"; static const char __pyx_k_PHASEFEAS[] = "PHASEFEAS"; static const char __pyx_k_PRESOLVED[] = "PRESOLVED"; static const char __pyx_k_SEPARATED[] = "SEPARATED"; static const char __pyx_k_SUSPENDED[] = "SUSPENDED"; static const char __pyx_k_TIMELIMIT[] = "TIMELIMIT"; static const char __pyx_k_Term___eq[] = "Term.__eq__"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_UBRELAXED[] = "UBRELAXED"; static const char __pyx_k_UNBOUNDED[] = "UNBOUNDED"; static const char __pyx_k_UnaryExpr[] = "UnaryExpr"; static const char __pyx_k_acons_nb1[] = "acons_nb1"; static const char __pyx_k_acons_nb2[] = "acons_nb2"; static const char __pyx_k_acons_nb3[] = "acons_nb3"; static const char __pyx_k_acons_nb4[] = "acons_nb4"; static const char __pyx_k_basestats[] = "basestats"; static const char __pyx_k_branchdir[] = "branchdir"; static const char __pyx_k_cdeg_mean[] = "cdeg_mean"; static const char __pyx_k_coefs_neg[] = "coefs_neg"; static const char __pyx_k_coefs_pos[] = "coefs_pos"; static const char __pyx_k_col_coefs[] = "col_coefs"; static const char __pyx_k_col_nnzrs[] = "col_nnzrs"; static const char __pyx_k_col_ps_up[] = "col_ps_up"; static const char __pyx_k_cons_nneg[] = "cons_nneg"; static const char __pyx_k_cons_npos[] = "cons_npos"; static const char __pyx_k_conscheck[] = "conscheck"; static const char __pyx_k_consparse[] = "consparse"; static const char __pyx_k_consprint[] = "consprint"; static const char __pyx_k_constrans[] = "constrans"; static const char __pyx_k_createSol[] = "createSol"; static const char __pyx_k_cutpseudo[] = "cutpseudo"; static const char __pyx_k_delayprop[] = "delayprop"; static const char __pyx_k_delaysepa[] = "delaysepa"; static const char __pyx_k_dualbound[] = "dualbound"; static const char __pyx_k_eagerfreq[] = "eagerfreq"; static const char __pyx_k_enumerate[] = "enumerate"; static const char __pyx_k_eventcopy[] = "eventcopy"; static const char __pyx_k_eventexec[] = "eventexec"; static const char __pyx_k_eventexit[] = "eventexit"; static const char __pyx_k_eventfree[] = "eventfree"; static const char __pyx_k_eventhdlr[] = "eventhdlr"; static const char __pyx_k_eventinit[] = "eventinit"; static const char __pyx_k_eventtype[] = "eventtype"; static const char __pyx_k_extension[] = "extension"; static const char __pyx_k_getSolVal[] = "getSolVal"; static const char __pyx_k_inferinfo[] = "inferinfo"; static const char __pyx_k_isChecked[] = "isChecked"; static const char __pyx_k_isDynamic[] = "isDynamic"; static const char __pyx_k_isInitial[] = "isInitial"; static const char __pyx_k_is_at_lhs[] = "is_at_lhs"; static const char __pyx_k_is_at_rhs[] = "is_at_rhs"; static const char __pyx_k_is_number[] = "_is_number"; static const char __pyx_k_mappedvar[] = "mappedvar"; static const char __pyx_k_maxrounds[] = "maxrounds"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_model_cip[] = "model.cip"; static const char __pyx_k_naddconss[] = "naddconss"; static const char __pyx_k_naddholes[] = "naddholes"; static const char __pyx_k_naggrvars[] = "naggrvars"; static const char __pyx_k_nchgcoefs[] = "nchgcoefs"; static const char __pyx_k_nchgsides[] = "nchgsides"; static const char __pyx_k_nchildren[] = "nchildren"; static const char __pyx_k_ndelconss[] = "ndelconss"; static const char __pyx_k_needscons[] = "needscons"; static const char __pyx_k_nlocksneg[] = "nlocksneg"; static const char __pyx_k_nlockspos[] = "nlockspos"; static const char __pyx_k_nnewholes[] = "nnewholes"; static const char __pyx_k_normalize[] = "normalize"; static const char __pyx_k_objective[] = "objective"; static const char __pyx_k_param_set[] = "param.set"; static const char __pyx_k_pricedVar[] = "pricedVar"; static const char __pyx_k_propagate[] = "propagate"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_quadratic[] = "quadratic"; static const char __pyx_k_quickprod[] = "quickprod"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_relaxedbd[] = "relaxedbd"; static const char __pyx_k_relaxexec[] = "relaxexec"; static const char __pyx_k_relaxexit[] = "relaxexit"; static const char __pyx_k_relaxfree[] = "relaxfree"; static const char __pyx_k_relaxinit[] = "relaxinit"; static const char __pyx_k_removable[] = "removable"; static const char __pyx_k_root_info[] = "root_info"; static const char __pyx_k_skipsolve[] = "skipsolve"; static const char __pyx_k_solutions[] = "solutions"; static const char __pyx_k_stopearly[] = "stopearly"; static const char __pyx_k_timelimit[] = "timelimit"; static const char __pyx_k_unbounded[] = "unbounded"; static const char __pyx_k_validnode[] = "validnode"; static const char __pyx_k_AGGRESSIVE[] = "AGGRESSIVE"; static const char __pyx_k_BEFORENODE[] = "BEFORENODE"; static const char __pyx_k_Benderscut[] = "Benderscut"; static const char __pyx_k_Branchrule[] = "Branchrule"; static const char __pyx_k_CONTINUOUS[] = "CONTINUOUS"; static const char __pyx_k_Constraint[] = "Constraint"; static const char __pyx_k_DIDNOTFIND[] = "DIDNOTFIND"; static const char __pyx_k_EXHAUSTIVE[] = "EXHAUSTIVE"; static const char __pyx_k_ExprCons_2[] = "ExprCons"; static const char __pyx_k_GHOLEADDED[] = "GHOLEADDED"; static const char __pyx_k_GLBCHANGED[] = "GLBCHANGED"; static const char __pyx_k_GUBCHANGED[] = "GUBCHANGED"; static const char __pyx_k_INFEASIBLE[] = "INFEASIBLE"; static const char __pyx_k_LHOLEADDED[] = "LHOLEADDED"; static const char __pyx_k_OBJCHANGED[] = "OBJCHANGED"; static const char __pyx_k_OPTIMALITY[] = "OPTIMALITY"; static const char __pyx_k_PHASEPROOF[] = "PHASEPROOF"; static const char __pyx_k_PRESOLVING[] = "PRESOLVING"; static const char __pyx_k_PSEUDOFORK[] = "PSEUDOFORK"; static const char __pyx_k_REDUCEDDOM[] = "REDUCEDDOM"; static const char __pyx_k_ROWADDEDLP[] = "ROWADDEDLP"; static const char __pyx_k_Term___add[] = "Term.__add__"; static const char __pyx_k_Term___len[] = "Term.__len__"; static const char __pyx_k_VARDELETED[] = "VARDELETED"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_acons_max1[] = "acons_max1"; static const char __pyx_k_acons_max2[] = "acons_max2"; static const char __pyx_k_acons_max3[] = "acons_max3"; static const char __pyx_k_acons_max4[] = "acons_max4"; static const char __pyx_k_acons_min1[] = "acons_min1"; static const char __pyx_k_acons_min2[] = "acons_min2"; static const char __pyx_k_acons_min3[] = "acons_min3"; static const char __pyx_k_acons_min4[] = "acons_min4"; static const char __pyx_k_acons_sum1[] = "acons_sum1"; static const char __pyx_k_acons_sum2[] = "acons_sum2"; static const char __pyx_k_acons_sum3[] = "acons_sum3"; static const char __pyx_k_acons_sum4[] = "acons_sum4"; static const char __pyx_k_acons_var1[] = "acons_var1"; static const char __pyx_k_acons_var2[] = "acons_var2"; static const char __pyx_k_acons_var3[] = "acons_var3"; static const char __pyx_k_acons_var4[] = "acons_var4"; static const char __pyx_k_activities[] = "activities"; static const char __pyx_k_addLinCons[] = "_addLinCons"; static const char __pyx_k_avgincvals[] = "avgincvals"; static const char __pyx_k_benderscut[] = "benderscut"; static const char __pyx_k_branchexit[] = "branchexit"; static const char __pyx_k_branchfree[] = "branchfree"; static const char __pyx_k_branchinit[] = "branchinit"; static const char __pyx_k_branchrule[] = "branchrule"; static const char __pyx_k_candidates[] = "candidates"; static const char __pyx_k_col_ps_sum[] = "col_ps_sum"; static const char __pyx_k_completely[] = "completely"; static const char __pyx_k_cons_is_OR[] = "cons_is_OR"; static const char __pyx_k_cons_nnzrs[] = "cons_nnzrs"; static const char __pyx_k_consactive[] = "consactive"; static const char __pyx_k_consdelete[] = "consdelete"; static const char __pyx_k_consenable[] = "consenable"; static const char __pyx_k_consenfolp[] = "consenfolp"; static const char __pyx_k_consenfops[] = "consenfops"; static const char __pyx_k_consinitlp[] = "consinitlp"; static const char __pyx_k_conspresol[] = "conspresol"; static const char __pyx_k_conssepalp[] = "conssepalp"; static const char __pyx_k_constraint[] = "constraint"; static const char __pyx_k_cumulative[] = "cumulative"; static const char __pyx_k_focusdepth[] = "focusdepth"; static const char __pyx_k_getOpIndex[] = "getOpIndex"; static const char __pyx_k_globalcopy[] = "globalcopy"; static const char __pyx_k_heurtiming[] = "heurtiming"; static const char __pyx_k_infeasible[] = "infeasible"; static const char __pyx_k_isEnforced[] = "isEnforced"; static const char __pyx_k_isOriginal[] = "isOriginal"; static const char __pyx_k_is_integer[] = "is_integer"; static const char __pyx_k_lowerbound[] = "lowerbound"; static const char __pyx_k_modifiable[] = "modifiable"; static const char __pyx_k_ncutsfound[] = "ncutsfound"; static const char __pyx_k_ndivinglps[] = "ndivinglps"; static const char __pyx_k_nfixedvars[] = "nfixedvars"; static const char __pyx_k_nlocksdown[] = "nlocksdown"; static const char __pyx_k_nnewchgbds[] = "nnewchgbds"; static const char __pyx_k_nnodesleft[] = "nnodesleft"; static const char __pyx_k_nodeselect[] = "nodeselect"; static const char __pyx_k_npricevars[] = "npricevars"; static const char __pyx_k_nprimallps[] = "nprimallps"; static const char __pyx_k_nreoptruns[] = "nreoptruns"; static const char __pyx_k_nsolsfound[] = "nsolsfound"; static const char __pyx_k_nupgdconss[] = "nupgdconss"; static const char __pyx_k_objcossims[] = "objcossims"; static const char __pyx_k_onlyconvex[] = "onlyconvex"; static const char __pyx_k_ota_nn_max[] = "ota_nn_max"; static const char __pyx_k_ota_nn_min[] = "ota_nn_min"; static const char __pyx_k_ota_np_max[] = "ota_np_max"; static const char __pyx_k_ota_np_min[] = "ota_np_min"; static const char __pyx_k_ota_pn_max[] = "ota_pn_max"; static const char __pyx_k_ota_pn_min[] = "ota_pn_min"; static const char __pyx_k_ota_pp_max[] = "ota_pp_max"; static const char __pyx_k_ota_pp_min[] = "ota_pp_min"; static const char __pyx_k_percentile[] = "percentile"; static const char __pyx_k_presolexec[] = "presolexec"; static const char __pyx_k_presolexit[] = "presolexit"; static const char __pyx_k_presolfree[] = "presolfree"; static const char __pyx_k_presolinit[] = "presolinit"; static const char __pyx_k_prev_state[] = "prev_state"; static const char __pyx_k_pricerexit[] = "pricerexit"; static const char __pyx_k_pricerfree[] = "pricerfree"; static const char __pyx_k_pricerinit[] = "pricerinit"; static const char __pyx_k_probnumber[] = "probnumber"; static const char __pyx_k_proppresol[] = "proppresol"; static const char __pyx_k_proptiming[] = "proptiming"; static const char __pyx_k_ps_product[] = "ps_product"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_sepaexeclp[] = "sepaexeclp"; static const char __pyx_k_subproblem[] = "subproblem"; static const char __pyx_k_targetcons[] = "targetcons"; static const char __pyx_k_timingmask[] = "timingmask"; static const char __pyx_k_upperbound[] = "upperbound"; static const char __pyx_k_AFTERLPLOOP[] = "AFTERLPLOOP"; static const char __pyx_k_AFTERLPNODE[] = "AFTERLPNODE"; static const char __pyx_k_CONSCHANGED[] = "CONSCHANGED"; static const char __pyx_k_FEASIBILITY[] = "FEASIBILITY"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_LBTIGHTENED[] = "LBTIGHTENED"; static const char __pyx_k_LookupError[] = "LookupError"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_NODEFOCUSED[] = "NODEFOCUSED"; static const char __pyx_k_PROBINGNODE[] = "PROBINGNODE"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_REFOCUSNODE[] = "REFOCUSNODE"; static const char __pyx_k_TRANSFORMED[] = "TRANSFORMED"; static const char __pyx_k_Term___hash[] = "Term.__hash__"; static const char __pyx_k_Term___init[] = "Term.__init__"; static const char __pyx_k_Term___repr[] = "Term.__repr__"; static const char __pyx_k_UBTIGHTENED[] = "UBTIGHTENED"; static const char __pyx_k_VARUNLOCKED[] = "VARUNLOCKED"; static const char __pyx_k_acons_mean1[] = "acons_mean1"; static const char __pyx_k_acons_mean2[] = "acons_mean2"; static const char __pyx_k_acons_mean3[] = "acons_mean3"; static const char __pyx_k_acons_mean4[] = "acons_mean4"; static const char __pyx_k_addQuadCons[] = "_addQuadCons"; static const char __pyx_k_bendersexit[] = "bendersexit"; static const char __pyx_k_bendersfree[] = "bendersfree"; static const char __pyx_k_bendersinit[] = "bendersinit"; static const char __pyx_k_cardinality[] = "cardinality"; static const char __pyx_k_checkbounds[] = "checkbounds"; static const char __pyx_k_checklprows[] = "checklprows"; static const char __pyx_k_col_ps_down[] = "col_ps_down"; static const char __pyx_k_col_solvals[] = "col_solvals"; static const char __pyx_k_cons_is_AND[] = "cons_is_AND"; static const char __pyx_k_cons_is_XOR[] = "cons_is_XOR"; static const char __pyx_k_cons_matrix[] = "cons_matrix"; static const char __pyx_k_consdelvars[] = "consdelvars"; static const char __pyx_k_consdisable[] = "consdisable"; static const char __pyx_k_consexitpre[] = "consexitpre"; static const char __pyx_k_consexitsol[] = "consexitsol"; static const char __pyx_k_consgetvars[] = "consgetvars"; static const char __pyx_k_consinitpre[] = "consinitpre"; static const char __pyx_k_consinitsol[] = "consinitsol"; static const char __pyx_k_consresprop[] = "consresprop"; static const char __pyx_k_conssepasol[] = "conssepasol"; static const char __pyx_k_constraints[] = "constraints"; static const char __pyx_k_cutoffbound[] = "cutoffbound"; static const char __pyx_k_cutoffdepth[] = "cutoffdepth"; static const char __pyx_k_entrieslist[] = "entrieslist"; static const char __pyx_k_eventdelete[] = "eventdelete"; static const char __pyx_k_heurexitsol[] = "heurexitsol"; static const char __pyx_k_heurinitsol[] = "heurinitsol"; static const char __pyx_k_isQuadratic[] = "isQuadratic"; static const char __pyx_k_isRemovable[] = "isRemovable"; static const char __pyx_k_isSeparated[] = "isSeparated"; static const char __pyx_k_lowerbounds[] = "lowerbounds"; static const char __pyx_k_nbacktracks[] = "nbacktracks"; static const char __pyx_k_nbarrierlps[] = "nbarrierlps"; static const char __pyx_k_nodeexitsol[] = "nodeexitsol"; static const char __pyx_k_nodeinitsol[] = "nodeinitsol"; static const char __pyx_k_nodeselprio[] = "nodeselprio"; static const char __pyx_k_nresolvelps[] = "nresolvelps"; static const char __pyx_k_nseparounds[] = "nseparounds"; static const char __pyx_k_ntotalnodes[] = "ntotalnodes"; static const char __pyx_k_onlychanged[] = "onlychanged"; static const char __pyx_k_plungedepth[] = "plungedepth"; static const char __pyx_k_primalbound[] = "primalbound"; static const char __pyx_k_printreason[] = "printreason"; static const char __pyx_k_problemName[] = "problemName"; static const char __pyx_k_propexitpre[] = "propexitpre"; static const char __pyx_k_propexitsol[] = "propexitsol"; static const char __pyx_k_propinitpre[] = "propinitpre"; static const char __pyx_k_propinitsol[] = "propinitsol"; static const char __pyx_k_propresprop[] = "propresprop"; static const char __pyx_k_repropdepth[] = "repropdepth"; static const char __pyx_k_result_dict[] = "result_dict"; static const char __pyx_k_sepaexecsol[] = "sepaexecsol"; static const char __pyx_k_sepaexitsol[] = "sepaexitsol"; static const char __pyx_k_sepainitsol[] = "sepainitsol"; static const char __pyx_k_setIntParam[] = "setIntParam"; static const char __pyx_k_setMaximize[] = "setMaximize"; static const char __pyx_k_setMinimize[] = "setMinimize"; static const char __pyx_k_solvingtime[] = "solvingtime"; static const char __pyx_k_sourceModel[] = "sourceModel"; static const char __pyx_k_stdpriority[] = "stdpriority"; static const char __pyx_k_targetvalue[] = "targetvalue"; static const char __pyx_k_transformed[] = "transformed"; static const char __pyx_k_usessubscip[] = "usessubscip"; static const char __pyx_k_write_zeros[] = "write_zeros"; static const char __pyx_k_BEFOREPRESOL[] = "BEFOREPRESOL"; static const char __pyx_k_BESTSOLFOUND[] = "BESTSOLFOUND"; static const char __pyx_k_BESTSOLLIMIT[] = "BESTSOLLIMIT"; static const char __pyx_k_DURINGLPLOOP[] = "DURINGLPLOOP"; static const char __pyx_k_EXITPRESOLVE[] = "EXITPRESOLVE"; static const char __pyx_k_GHOLEREMOVED[] = "GHOLEREMOVED"; static const char __pyx_k_INITPRESOLVE[] = "INITPRESOLVE"; static const char __pyx_k_LHOLEREMOVED[] = "LHOLEREMOVED"; static const char __pyx_k_NODEBRANCHED[] = "NODEBRANCHED"; static const char __pyx_k_NODEFEASIBLE[] = "NODEFEASIBLE"; static const char __pyx_k_PHASEIMPROVE[] = "PHASEIMPROVE"; static const char __pyx_k_POORSOLFOUND[] = "POORSOLFOUND"; static const char __pyx_k_PY_SCIP_CALL[] = "PY_SCIP_CALL"; static const char __pyx_k_RESTARTLIMIT[] = "RESTARTLIMIT"; static const char __pyx_k_ROWADDEDSEPA[] = "ROWADDEDSEPA"; static const char __pyx_k_ROWDELETEDLP[] = "ROWDELETEDLP"; static const char __pyx_k_TRANSFORMING[] = "TRANSFORMING"; static const char __pyx_k_UNBOUNDEDRAY[] = "UNBOUNDEDRAY"; static const char __pyx_k_addObjoffset[] = "addObjoffset"; static const char __pyx_k_allowaddcons[] = "allowaddcons"; static const char __pyx_k_avgdualbound[] = "avgdualbound"; static const char __pyx_k_branchexeclp[] = "branchexeclp"; static const char __pyx_k_branchexecps[] = "branchexecps"; static const char __pyx_k_chckpriority[] = "chckpriority"; static const char __pyx_k_col_cdeg_max[] = "col_cdeg_max"; static const char __pyx_k_col_cdeg_min[] = "col_cdeg_min"; static const char __pyx_k_col_cdeg_std[] = "col_cdeg_std"; static const char __pyx_k_col_ps_ratio[] = "col_ps_ratio"; static const char __pyx_k_col_type_int[] = "col_type_int"; static const char __pyx_k_cons_sum_abs[] = "cons_sum_abs"; static const char __pyx_k_cons_sum_neg[] = "cons_sum_neg"; static const char __pyx_k_cons_sum_pos[] = "cons_sum_pos"; static const char __pyx_k_consdeactive[] = "consdeactive"; static const char __pyx_k_consgetnvars[] = "consgetnvars"; static const char __pyx_k_enfopriority[] = "enfopriority"; static const char __pyx_k_eventexitsol[] = "eventexitsol"; static const char __pyx_k_eventinitsol[] = "eventinitsol"; static const char __pyx_k_expr_richcmp[] = "_expr_richcmp"; static const char __pyx_k_getSolObjVal[] = "getSolObjVal"; static const char __pyx_k_isModifiable[] = "isModifiable"; static const char __pyx_k_isPropagated[] = "isPropagated"; static const char __pyx_k_is_removable[] = "is_removable"; static const char __pyx_k_maxbounddist[] = "maxbounddist"; static const char __pyx_k_maxprerounds[] = "maxprerounds"; static const char __pyx_k_nactivesonss[] = "nactivesonss"; static const char __pyx_k_nb_up_infeas[] = "nb_up_infeas"; static const char __pyx_k_nchgvartypes[] = "nchgvartypes"; static const char __pyx_k_ncutsapplied[] = "ncutsapplied"; static const char __pyx_k_nmarkedconss[] = "nmarkedconss"; static const char __pyx_k_nnewaddconss[] = "nnewaddconss"; static const char __pyx_k_nnewaddholes[] = "nnewaddholes"; static const char __pyx_k_nnewaggrvars[] = "nnewaggrvars"; static const char __pyx_k_nnewchgcoefs[] = "nnewchgcoefs"; static const char __pyx_k_nnewchgsides[] = "nnewchgsides"; static const char __pyx_k_nnewdelconss[] = "nnewdelconss"; static const char __pyx_k_nnodeinitlps[] = "nnodeinitlps"; static const char __pyx_k_npricerounds[] = "npricerounds"; static const char __pyx_k_nsubproblems[] = "nsubproblems"; static const char __pyx_k_nusefulconss[] = "nusefulconss"; static const char __pyx_k_origprob_sol[] = "origprob.sol"; static const char __pyx_k_paraemphasis[] = "paraemphasis"; static const char __pyx_k_presoltiming[] = "presoltiming"; static const char __pyx_k_pricerfarkas[] = "pricerfarkas"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_relaxexitsol[] = "relaxexitsol"; static const char __pyx_k_relaxinitsol[] = "relaxinitsol"; static const char __pyx_k_sepapriority[] = "sepapriority"; static const char __pyx_k_setBoolParam[] = "setBoolParam"; static const char __pyx_k_sol_is_at_lb[] = "sol_is_at_lb"; static const char __pyx_k_sol_is_at_ub[] = "sol_is_at_ub"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_version_info[] = "version_info"; static const char __pyx_k_AFTERLPPLUNGE[] = "AFTERLPPLUNGE"; static const char __pyx_k_AFTERPROPLOOP[] = "AFTERPROPLOOP"; static const char __pyx_k_FIRSTLPSOLVED[] = "FIRSTLPSOLVED"; static const char __pyx_k_IndicatorCons[] = "IndicatorCons"; static const char __pyx_k_Op_getOpIndex[] = "Op.getOpIndex"; static const char __pyx_k_PRESOLVEROUND[] = "PRESOLVEROUND"; static const char __pyx_k_PY_SCIP_STAGE[] = "PY_SCIP_STAGE"; static const char __pyx_k_StopIteration[] = "StopIteration"; static const char __pyx_k_USERINTERRUPT[] = "USERINTERRUPT"; static const char __pyx_k_avglowerbound[] = "avglowerbound"; static const char __pyx_k_bendersgetvar[] = "bendersgetvar"; static const char __pyx_k_branchexecext[] = "branchexecext"; static const char __pyx_k_branchexitsol[] = "branchexitsol"; static const char __pyx_k_branchinitsol[] = "branchinitsol"; static const char __pyx_k_col_cdeg_mean[] = "col_cdeg_mean"; static const char __pyx_k_col_coefs_neg[] = "col_coefs_neg"; static const char __pyx_k_col_coefs_pos[] = "col_coefs_pos"; static const char __pyx_k_col_nup_locks[] = "col_nup_locks"; static const char __pyx_k_col_red_costs[] = "col_red_costs"; static const char __pyx_k_cons_coef_max[] = "cons_coef_max"; static const char __pyx_k_cons_coef_min[] = "cons_coef_min"; static const char __pyx_k_cons_dual_sol[] = "cons_dual_sol"; static const char __pyx_k_consenforelax[] = "consenforelax"; static const char __pyx_k_dualboundroot[] = "dualboundroot"; static const char __pyx_k_enablepricing[] = "enablepricing"; static const char __pyx_k_expr_to_array[] = "expr_to_array"; static const char __pyx_k_expr_to_nodes[] = "expr_to_nodes"; static const char __pyx_k_indicator_arr[] = "indicator_arr"; static const char __pyx_k_interpolation[] = "interpolation"; static const char __pyx_k_is_modifiable[] = "is_modifiable"; static const char __pyx_k_maxtotaldepth[] = "maxtotaldepth"; static const char __pyx_k_ncreatednodes[] = "ncreatednodes"; static const char __pyx_k_nenabledconss[] = "nenabledconss"; static const char __pyx_k_nlimsolsfound[] = "nlimsolsfound"; static const char __pyx_k_nlpiterations[] = "nlpiterations"; static const char __pyx_k_nnewfixedvars[] = "nnewfixedvars"; static const char __pyx_k_nnewupgdconss[] = "nnewupgdconss"; static const char __pyx_k_nobjlimleaves[] = "nobjlimleaves"; static const char __pyx_k_objinfeasible[] = "objinfeasible"; static const char __pyx_k_presolexitpre[] = "presolexitpre"; static const char __pyx_k_presolinitpre[] = "presolinitpre"; static const char __pyx_k_pricerexitsol[] = "pricerexitsol"; static const char __pyx_k_pricerinitsol[] = "pricerinitsol"; static const char __pyx_k_pricerredcost[] = "pricerredcost"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_root_cdeg_max[] = "root_cdeg_max"; static const char __pyx_k_root_cdeg_min[] = "root_cdeg_min"; static const char __pyx_k_root_cdeg_var[] = "root_cdeg_var"; static const char __pyx_k_solinfeasible[] = "solinfeasible"; static const char __pyx_k_userinterrupt[] = "userinterrupt"; static const char __pyx_k_NODEINFEASIBLE[] = "NODEINFEASIBLE"; static const char __pyx_k_PY_SCIP_RESULT[] = "PY_SCIP_RESULT"; static const char __pyx_k_PY_SCIP_STATUS[] = "PY_SCIP_STATUS"; static const char __pyx_k_ROWCOEFCHANGED[] = "ROWCOEFCHANGED"; static const char __pyx_k_ROWDELETEDSEPA[] = "ROWDELETEDSEPA"; static const char __pyx_k_ROWSIDECHANGED[] = "ROWSIDECHANGED"; static const char __pyx_k_STALLNODELIMIT[] = "STALLNODELIMIT"; static const char __pyx_k_TOTALNODELIMIT[] = "TOTALNODELIMIT"; static const char __pyx_k_Term___getitem[] = "Term.__getitem__"; static const char __pyx_k_avgcutoffscore[] = "avgcutoffscore"; static const char __pyx_k_benderscutexec[] = "benderscutexec"; static const char __pyx_k_benderscutexit[] = "benderscutexit"; static const char __pyx_k_benderscutfree[] = "benderscutfree"; static const char __pyx_k_benderscutinit[] = "benderscutinit"; static const char __pyx_k_bendersexitpre[] = "bendersexitpre"; static const char __pyx_k_bendersexitsol[] = "bendersexitsol"; static const char __pyx_k_bendersfreesub[] = "bendersfreesub"; static const char __pyx_k_bendersinitpre[] = "bendersinitpre"; static const char __pyx_k_bendersinitsol[] = "bendersinitsol"; static const char __pyx_k_cdeg_max_ratio[] = "cdeg_max_ratio"; static const char __pyx_k_cdeg_min_ratio[] = "cdeg_min_ratio"; static const char __pyx_k_col_ncoefs_max[] = "col_ncoefs_max"; static const char __pyx_k_col_ncoefs_min[] = "col_ncoefs_min"; static const char __pyx_k_col_ncoefs_std[] = "col_ncoefs_std"; static const char __pyx_k_col_ncoefs_sum[] = "col_ncoefs_sum"; static const char __pyx_k_col_pcoefs_max[] = "col_pcoefs_max"; static const char __pyx_k_col_pcoefs_min[] = "col_pcoefs_min"; static const char __pyx_k_col_pcoefs_std[] = "col_pcoefs_std"; static const char __pyx_k_col_pcoefs_sum[] = "col_pcoefs_sum"; static const char __pyx_k_col_ps_product[] = "col_ps_product"; static const char __pyx_k_col_sol_isfrac[] = "col_sol_isfrac"; static const char __pyx_k_cons_coef_mean[] = "cons_coef_mean"; static const char __pyx_k_defaultPlugins[] = "defaultPlugins"; static const char __pyx_k_frac_up_infeas[] = "frac_up_infeas"; static const char __pyx_k_lowerboundroot[] = "lowerboundroot"; static const char __pyx_k_nb_down_infeas[] = "nb_down_infeas"; static const char __pyx_k_nbestsolsfound[] = "nbestsolsfound"; static const char __pyx_k_ninternalnodes[] = "ninternalnodes"; static const char __pyx_k_nodeinfeasible[] = "nodeinfeasible"; static const char __pyx_k_nrhs_ratio_max[] = "nrhs_ratio_max"; static const char __pyx_k_nrhs_ratio_min[] = "nrhs_ratio_min"; static const char __pyx_k_nstrongbranchs[] = "nstrongbranchs"; static const char __pyx_k_origprob_stats[] = "origprob.stats"; static const char __pyx_k_presolpriority[] = "presolpriority"; static const char __pyx_k_prhs_ratio_max[] = "prhs_ratio_max"; static const char __pyx_k_prhs_ratio_min[] = "prhs_ratio_min"; static const char __pyx_k_pyscipopt_scip[] = "pyscipopt.scip"; static const char __pyx_k_root_cdeg_mean[] = "root_cdeg_mean"; static const char __pyx_k_stickingatnode[] = "stickingatnode"; static const char __pyx_k_str_conversion[] = "str_conversion"; static const char __pyx_k_value_to_array[] = "value_to_array"; static const char __pyx_k_AFTERPSEUDONODE[] = "AFTERPSEUDONODE"; static const char __pyx_k_CardinalityCons[] = "CardinalityCons"; static const char __pyx_k_ROWCONSTCHANGED[] = "ROWCONSTCHANGED"; static const char __pyx_k_SCIP_read_error[] = "SCIP: read error!"; static const char __pyx_k_benderssolvesub[] = "benderssolvesub"; static const char __pyx_k_buildGenExprObj[] = "buildGenExprObj"; static const char __pyx_k_cdeg_mean_ratio[] = "cdeg_mean_ratio"; static const char __pyx_k_col_ncoefs_mean[] = "col_ncoefs_mean"; static const char __pyx_k_col_ndown_locks[] = "col_ndown_locks"; static const char __pyx_k_col_pcoefs_mean[] = "col_pcoefs_mean"; static const char __pyx_k_col_sol_frac_up[] = "col_sol_frac_up"; static const char __pyx_k_col_type_binary[] = "col_type_binary"; static const char __pyx_k_cons_coef_stdev[] = "cons_coef_stdev"; static const char __pyx_k_cons_is_linking[] = "cons_is_linking"; static const char __pyx_k_cons_is_logicor[] = "cons_is_logicor"; static const char __pyx_k_createProbBasic[] = "createProbBasic"; static const char __pyx_k_inrepropagation[] = "inrepropagation"; static const char __pyx_k_is_memory_freed[] = "is_memory_freed"; static const char __pyx_k_memsavepriority[] = "memsavepriority"; static const char __pyx_k_mergecandidates[] = "mergecandidates"; static const char __pyx_k_nactivatednodes[] = "nactivatednodes"; static const char __pyx_k_ncutsfoundround[] = "ncutsfoundround"; static const char __pyx_k_ndelayedcutoffs[] = "ndelayedcutoffs"; static const char __pyx_k_ndualresolvelps[] = "ndualresolvelps"; static const char __pyx_k_nfeasibleleaves[] = "nfeasibleleaves"; static const char __pyx_k_nnewchgvartypes[] = "nnewchgvartypes"; static const char __pyx_k_npricevarsfound[] = "npricevarsfound"; static const char __pyx_k_npriomergecands[] = "npriomergecands"; static const char __pyx_k_overwrite_input[] = "overwrite_input"; static const char __pyx_k_presolmaxrounds[] = "presolmaxrounds"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_root_ncoefs_max[] = "root_ncoefs_max"; static const char __pyx_k_root_ncoefs_min[] = "root_ncoefs_min"; static const char __pyx_k_root_ncoefs_var[] = "root_ncoefs_var"; static const char __pyx_k_root_pcoefs_max[] = "root_pcoefs_max"; static const char __pyx_k_root_pcoefs_min[] = "root_pcoefs_min"; static const char __pyx_k_root_pcoefs_var[] = "root_pcoefs_var"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_DURINGPRESOLLOOP[] = "DURINGPRESOLLOOP"; static const char __pyx_k_PY_SCIP_NODETYPE[] = "PY_SCIP_NODETYPE"; static const char __pyx_k_SCIP_write_error[] = "SCIP: write error!"; static const char __pyx_k_addNonlinearCons[] = "_addNonlinearCons"; static const char __pyx_k_avgconflictscore[] = "avgconflictscore"; static const char __pyx_k_benderscreatesub[] = "benderscreatesub"; static const char __pyx_k_benderspostsolve[] = "benderspostsolve"; static const char __pyx_k_checkintegrality[] = "checkintegrality"; static const char __pyx_k_cons_is_knapsack[] = "cons_is_knapsack"; static const char __pyx_k_firstprimalbound[] = "firstprimalbound"; static const char __pyx_k_frac_down_infeas[] = "frac_down_infeas"; static const char __pyx_k_isStickingAtNode[] = "isStickingAtNode"; static const char __pyx_k_isprimalboundsol[] = "isprimalboundsol"; static const char __pyx_k_ncreatednodesrun[] = "ncreatednodesrun"; static const char __pyx_k_operatorIndexDic[] = "operatorIndexDic"; static const char __pyx_k_root_ncoefs_mean[] = "root_ncoefs_mean"; static const char __pyx_k_root_pcoefs_mean[] = "root_pcoefs_mean"; static const char __pyx_k_AFTERPSEUDOPLUNGE[] = "AFTERPSEUDOPLUNGE"; static const char __pyx_k_DURINGPRICINGLOOP[] = "DURINGPRICINGLOOP"; static const char __pyx_k_PY_SCIP_BRANCHDIR[] = "PY_SCIP_BRANCHDIR"; static const char __pyx_k_PY_SCIP_EVENTTYPE[] = "PY_SCIP_EVENTTYPE"; static const char __pyx_k_PY_SCIP_LPSOLSTAT[] = "PY_SCIP_LPSOLSTAT"; static const char __pyx_k_ZeroDivisionError[] = "ZeroDivisionError"; static const char __pyx_k_avginferencescore[] = "avginferencescore"; static const char __pyx_k_benderscutexitsol[] = "benderscutexitsol"; static const char __pyx_k_benderscutinitsol[] = "benderscutinitsol"; static const char __pyx_k_col_sol_frac_down[] = "col_sol_frac_down"; static const char __pyx_k_cons_basis_status[] = "cons_basis_status"; static const char __pyx_k_cons_is_singleton[] = "cons_is_singleton"; static const char __pyx_k_consgetdivebdchgs[] = "consgetdivebdchgs"; static const char __pyx_k_deterministictime[] = "deterministictime"; static const char __pyx_k_getObjectiveSense[] = "getObjectiveSense"; static const char __pyx_k_ndeactivatednodes[] = "ndeactivatednodes"; static const char __pyx_k_nduallpiterations[] = "nduallpiterations"; static const char __pyx_k_ninfeasibleleaves[] = "ninfeasibleleaves"; static const char __pyx_k_nnodelpiterations[] = "nnodelpiterations"; static const char __pyx_k_npricevarsapplied[] = "npricevarsapplied"; static const char __pyx_k_nprimalresolvelps[] = "nprimalresolvelps"; static const char __pyx_k_nrootlpiterations[] = "nrootlpiterations"; static const char __pyx_k_opennodes_10quant[] = "opennodes_10quant"; static const char __pyx_k_opennodes_25quant[] = "opennodes_25quant"; static const char __pyx_k_opennodes_50quant[] = "opennodes_50quant"; static const char __pyx_k_opennodes_75quant[] = "opennodes_75quant"; static const char __pyx_k_opennodes_90quant[] = "opennodes_90quant"; static const char __pyx_k_pyx_unpickle_Expr[] = "__pyx_unpickle_Expr"; static const char __pyx_k_pyx_unpickle_Heur[] = "__pyx_unpickle_Heur"; static const char __pyx_k_pyx_unpickle_Prop[] = "__pyx_unpickle_Prop"; static const char __pyx_k_pyx_unpickle_Sepa[] = "__pyx_unpickle_Sepa"; static const char __pyx_k_root_ncoefs_count[] = "root_ncoefs_count"; static const char __pyx_k_root_pcoefs_count[] = "root_pcoefs_count"; static const char __pyx_k_PY_SCIP_HEURTIMING[] = "PY_SCIP_HEURTIMING"; static const char __pyx_k_PY_SCIP_PROPTIMING[] = "PY_SCIP_PROPTIMING"; static const char __pyx_k_avgpseudocostscore[] = "avgpseudocostscore"; static const char __pyx_k_benderspresubsolve[] = "benderspresubsolve"; static const char __pyx_k_cannot_divide_by_0[] = "cannot divide by 0"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_col_nlhs_ratio_max[] = "col_nlhs_ratio_max"; static const char __pyx_k_col_nlhs_ratio_min[] = "col_nlhs_ratio_min"; static const char __pyx_k_col_nrhs_ratio_max[] = "col_nrhs_ratio_max"; static const char __pyx_k_col_nrhs_ratio_min[] = "col_nrhs_ratio_min"; static const char __pyx_k_col_plhs_ratio_max[] = "col_plhs_ratio_max"; static const char __pyx_k_col_plhs_ratio_min[] = "col_plhs_ratio_min"; static const char __pyx_k_col_prhs_ratio_max[] = "col_prhs_ratio_max"; static const char __pyx_k_col_prhs_ratio_min[] = "col_prhs_ratio_min"; static const char __pyx_k_cons_is_precedence[] = "cons_is_precedence"; static const char __pyx_k_effectiverootdepth[] = "effectiverootdepth"; static const char __pyx_k_getTransformedCons[] = "getTransformedCons"; static const char __pyx_k_nrootstrongbranchs[] = "nrootstrongbranchs"; static const char __pyx_k_pyx_unpickle_Relax[] = "__pyx_unpickle_Relax"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_addGenNonlinearCons[] = "_addGenNonlinearCons"; static const char __pyx_k_cons_is_aggregation[] = "cons_is_aggregation"; static const char __pyx_k_cons_is_cardinality[] = "cons_is_cardinality"; static const char __pyx_k_nconflictconssfound[] = "nconflictconssfound"; static const char __pyx_k_ndivinglpiterations[] = "ndivinglpiterations"; static const char __pyx_k_nprimallpiterations[] = "nprimallpiterations"; static const char __pyx_k_print_memory_in_use[] = "print_memory_in_use"; static const char __pyx_k_pyx_unpickle_Presol[] = "__pyx_unpickle_Presol"; static const char __pyx_k_pyx_unpickle_Pricer[] = "__pyx_unpickle_Pricer"; static const char __pyx_k_PY_SCIP_PARAMSETTING[] = "PY_SCIP_PARAMSETTING"; static const char __pyx_k_PY_SCIP_PRESOLTIMING[] = "PY_SCIP_PRESOLTIMING"; static const char __pyx_k_firstlpdualboundroot[] = "firstlpdualboundroot"; static const char __pyx_k_nbarrierlpiterations[] = "nbarrierlpiterations"; static const char __pyx_k_nresolvelpiterations[] = "nresolvelpiterations"; static const char __pyx_k_pyx_unpickle_Benders[] = "__pyx_unpickle_Benders"; static const char __pyx_k_pyx_unpickle_GenExpr[] = "__pyx_unpickle_GenExpr"; static const char __pyx_k_pyx_unpickle_Nodesel[] = "__pyx_unpickle_Nodesel"; static const char __pyx_k_pyx_unpickle_PowExpr[] = "__pyx_unpickle_PowExpr"; static const char __pyx_k_pyx_unpickle_SumExpr[] = "__pyx_unpickle_SumExpr"; static const char __pyx_k_pyx_unpickle_VarExpr[] = "__pyx_unpickle_VarExpr"; static const char __pyx_k_repr___locals_lambda[] = "__repr__.<locals>.<lambda>"; static const char __pyx_k_PY_SCIP_PARAMEMPHASIS[] = "PY_SCIP_PARAMEMPHASIS"; static const char __pyx_k_avgconfliclengthscore[] = "avgconfliclengthscore"; static const char __pyx_k_benderssolvesubconvex[] = "benderssolvesubconvex"; static const char __pyx_k_degree_locals_genexpr[] = "degree.<locals>.genexpr"; static const char __pyx_k_firstlplowerboundroot[] = "firstlplowerboundroot"; static const char __pyx_k_includeDefaultPlugins[] = "includeDefaultPlugins"; static const char __pyx_k_nconflictconssapplied[] = "nconflictconssapplied"; static const char __pyx_k_nnodeinitlpiterations[] = "nnodeinitlpiterations"; static const char __pyx_k_propagating_maxrounds[] = "propagating/maxrounds"; static const char __pyx_k_pyx_unpickle_Conshdlr[] = "__pyx_unpickle_Conshdlr"; static const char __pyx_k_pyx_unpickle_Constant[] = "__pyx_unpickle_Constant"; static const char __pyx_k_pyx_unpickle_ExprCons[] = "__pyx_unpickle_ExprCons"; static const char __pyx_k_pyx_unpickle_ProdExpr[] = "__pyx_unpickle_ProdExpr"; static const char __pyx_k_wrote_problem_to_file[] = "wrote problem to file "; static const char __pyx_k_SCIP_no_problem_exists[] = "SCIP: no problem exists!"; static const char __pyx_k_SCIP_unspecified_error[] = "SCIP: unspecified error!"; static const char __pyx_k_addCols_locals_genexpr[] = "addCols.<locals>.genexpr"; static const char __pyx_k_addRows_locals_genexpr[] = "addRows.<locals>.genexpr"; static const char __pyx_k_cons_is_general_linear[] = "cons_is_general_linear"; static const char __pyx_k_cons_is_variable_bound[] = "cons_is_variable_bound"; static const char __pyx_k_nrootfirstlpiterations[] = "nrootfirstlpiterations"; static const char __pyx_k_pyx_unpickle_Eventhdlr[] = "__pyx_unpickle_Eventhdlr"; static const char __pyx_k_pyx_unpickle_UnaryExpr[] = "__pyx_unpickle_UnaryExpr"; static const char __pyx_k_src_pyscipopt_expr_pxi[] = "src/pyscipopt/expr.pxi"; static const char __pyx_k_src_pyscipopt_scip_pyx[] = "src/pyscipopt/scip.pyx"; static const char __pyx_k_PY_SCIP_BENDERSENFOTYPE[] = "PY_SCIP_BENDERSENFOTYPE"; static const char __pyx_k_SCIP_cannot_create_file[] = "SCIP: cannot create file!"; static const char __pyx_k_SCIP_error_in_LP_solver[] = "SCIP: error in LP solver!"; static const char __pyx_k_This_is_a_monomial_term[] = "This is a monomial term"; static const char __pyx_k_col_coef_max3_dual_cost[] = "col_coef_max3_dual_cost"; static const char __pyx_k_col_coef_min3_dual_cost[] = "col_coef_min3_dual_cost"; static const char __pyx_k_col_coef_std3_dual_cost[] = "col_coef_std3_dual_cost"; static const char __pyx_k_col_coef_sum3_dual_cost[] = "col_coef_sum3_dual_cost"; static const char __pyx_k_event_handler_not_found[] = "event handler not found"; static const char __pyx_k_nconflictconssfoundnode[] = "nconflictconssfoundnode"; static const char __pyx_k_pyx_unpickle_Benderscut[] = "__pyx_unpickle_Benderscut"; static const char __pyx_k_pyx_unpickle_Branchrule[] = "__pyx_unpickle_Branchrule"; static const char __pyx_k_SCIP_error_in_input_data[] = "SCIP: error in input data!"; static const char __pyx_k_SCIP_unknown_return_code[] = "SCIP: unknown return code!"; static const char __pyx_k_avgcuroffscorecurrentrun[] = "avgcuroffscorecurrentrun"; static const char __pyx_k_col_coef_mean3_dual_cost[] = "col_coef_mean3_dual_cost"; static const char __pyx_k_ndualresolvelpiterations[] = "ndualresolvelpiterations"; static const char __pyx_k_SCIP_file_not_found_error[] = "SCIP: file not found error!"; static const char __pyx_k_col_coef_max1_unit_weight[] = "col_coef_max1_unit_weight"; static const char __pyx_k_col_coef_max2_inverse_sum[] = "col_coef_max2_inverse_sum"; static const char __pyx_k_col_coef_min1_unit_weight[] = "col_coef_min1_unit_weight"; static const char __pyx_k_col_coef_min2_inverse_sum[] = "col_coef_min2_inverse_sum"; static const char __pyx_k_col_coef_std1_unit_weight[] = "col_coef_std1_unit_weight"; static const char __pyx_k_col_coef_std2_inverse_sum[] = "col_coef_std2_inverse_sum"; static const char __pyx_k_col_coef_sum1_unit_weight[] = "col_coef_sum1_unit_weight"; static const char __pyx_k_col_coef_sum2_inverse_sum[] = "col_coef_sum2_inverse_sum"; static const char __pyx_k_exponents_must_be_numbers[] = "exponents must be numbers"; static const char __pyx_k_nstrongbranchlpiterations[] = "nstrongbranchlpiterations"; static const char __pyx_k_propagating_maxroundsroot[] = "propagating/maxroundsroot"; static const char __pyx_k_Not_a_valid_parameter_name[] = "Not a valid parameter name"; static const char __pyx_k_avgconflictscorecurrentrun[] = "avgconflictscorecurrentrun"; static const char __pyx_k_col_coef_mean1_unit_weight[] = "col_coef_mean1_unit_weight"; static const char __pyx_k_col_coef_mean2_inverse_sum[] = "col_coef_mean2_inverse_sum"; static const char __pyx_k_constraints_benders_active[] = "constraints/benders/active"; static const char __pyx_k_nprimalresolvelpiterations[] = "nprimalresolvelpiterations"; static const char __pyx_k_pyx_unpickle_PY_SCIP_STAGE[] = "__pyx_unpickle_PY_SCIP_STAGE"; static const char __pyx_k_unrecognized_variable_type[] = "unrecognized variable type"; static const char __pyx_k_Term___init___locals_lambda[] = "Term.__init__.<locals>.<lambda>"; static const char __pyx_k_avginferencescorecurrentrun[] = "avginferencescorecurrentrun"; static const char __pyx_k_constraint_is_not_quadratic[] = "constraint is not quadratic"; static const char __pyx_k_pyx_unpickle_PY_SCIP_RESULT[] = "__pyx_unpickle_PY_SCIP_RESULT"; static const char __pyx_k_pyx_unpickle_PY_SCIP_STATUS[] = "__pyx_unpickle_PY_SCIP_STATUS"; static const char __pyx_k_Term___init___locals_genexpr[] = "Term.__init__.<locals>.genexpr"; static const char __pyx_k_avgpseudocostscorecurrentrun[] = "avgpseudocostscorecurrentrun"; static const char __pyx_k_constraints_benderslp_active[] = "constraints/benderslp/active"; static const char __pyx_k_unrecognized_objective_sense[] = "unrecognized objective sense"; static const char __pyx_k_nrootstrongbranchlpiterations[] = "nrootstrongbranchlpiterations"; static const char __pyx_k_pyx_unpickle_PY_SCIP_NODETYPE[] = "__pyx_unpickle_PY_SCIP_NODETYPE"; static const char __pyx_k_Error_branching_rule_not_found[] = "Error, branching rule not found!"; static const char __pyx_k_SCIP_insufficient_memory_error[] = "SCIP: insufficient memory error!"; static const char __pyx_k_pyx_unpickle_PY_SCIP_BENDERSEN[] = "__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE"; static const char __pyx_k_pyx_unpickle_PY_SCIP_BRANCHDIR[] = "__pyx_unpickle_PY_SCIP_BRANCHDIR"; static const char __pyx_k_pyx_unpickle_PY_SCIP_EVENTTYPE[] = "__pyx_unpickle_PY_SCIP_EVENTTYPE"; static const char __pyx_k_pyx_unpickle_PY_SCIP_HEURTIMIN[] = "__pyx_unpickle_PY_SCIP_HEURTIMING"; static const char __pyx_k_pyx_unpickle_PY_SCIP_LPSOLSTAT[] = "__pyx_unpickle_PY_SCIP_LPSOLSTAT"; static const char __pyx_k_pyx_unpickle_PY_SCIP_PARAMEMPH[] = "__pyx_unpickle_PY_SCIP_PARAMEMPHASIS"; static const char __pyx_k_pyx_unpickle_PY_SCIP_PARAMSETT[] = "__pyx_unpickle_PY_SCIP_PARAMSETTING"; static const char __pyx_k_pyx_unpickle_PY_SCIP_PRESOLTIM[] = "__pyx_unpickle_PY_SCIP_PRESOLTIMING"; static const char __pyx_k_pyx_unpickle_PY_SCIP_PROPTIMIN[] = "__pyx_unpickle_PY_SCIP_PROPTIMING"; static const char __pyx_k_Provide_BOOLEAN_value_as_rhsvar[] = "Provide BOOLEAN value as rhsvar, you gave %s."; static const char __pyx_k_SCIP_method_cannot_be_called_at[] = "SCIP: method cannot be called at this time in solution process!"; static const char __pyx_k_SCIP_method_returned_an_invalid[] = "SCIP: method returned an invalid result code!"; static const char __pyx_k_SCIP_reading_solution_from_file[] = "SCIP: reading solution from file failed!"; static const char __pyx_k_avgconfliclengthscorecurrentrun[] = "avgconfliclengthscorecurrentrun"; static const char __pyx_k_given_coefficients_are_not_Expr[] = "given coefficients are not Expr but %s"; static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_python_error_in_consenfolp_this[] = "python error in consenfolp: this method needs to be implemented"; static const char __pyx_k_python_error_in_consenfops_this[] = "python error in consenfops: this method needs to be implemented"; static const char __pyx_k_python_error_in_presolexec_this[] = "python error in presolexec: this method needs to be implemented"; static const char __pyx_k_self_lpi_cannot_be_converted_to[] = "self.lpi cannot be converted to a Python object for pickling"; static const char __pyx_k_self_sol_cannot_be_converted_to[] = "self.sol cannot be converted to a Python object for pickling"; static const char __pyx_k_total_number_of_solutions_found[] = "total number of solutions found is not valid!"; static const char __pyx_k_unrecognized_optimization_sense[] = "unrecognized optimization sense: %s"; static const char __pyx_k_Can_t_evaluate_constraints_as_bo[] = "Can't evaluate constraints as booleans.\n\nIf you want to add a ranged constraint of the form\n lhs <= expression <= rhs\nyou have to use parenthesis to break the Python syntax for chained comparisons:\n lhs <= (expression <= rhs)\n"; static const char __pyx_k_Constant_offsets_in_objective_ar[] = "Constant offsets in objective are not supported!"; static const char __pyx_k_ExprCons_already_has_lower_bound[] = "ExprCons already has lower bound"; static const char __pyx_k_ExprCons_already_has_upper_bound[] = "ExprCons already has upper bound"; static const char __pyx_k_Incompatible_checksums_s_vs_0x20[] = "Incompatible checksums (%s vs 0x20f35e6 = (model))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x6f[] = "Incompatible checksums (%s vs 0x6f493bf = (terms))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x88[] = "Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x8f[] = "Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x9b[] = "Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xa0[] = "Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xb3[] = "Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xba[] = "Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())"; static const char __pyx_k_Incompatible_checksums_s_vs_0xec[] = "Incompatible checksums (%s vs 0xecd383d = (model, name))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xfe[] = "Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))"; static const char __pyx_k_Nonlinear_objective_functions_ar[] = "Nonlinear objective functions are not supported!"; static const char __pyx_k_Ranged_ExprCons_is_not_well_defi[] = "Ranged ExprCons is not well defined!"; static const char __pyx_k_SCIP_a_required_plugin_was_not_f[] = "SCIP: a required plugin was not found !"; static const char __pyx_k_SCIP_maximal_branching_depth_lev[] = "SCIP: maximal branching depth level exceeded!"; static const char __pyx_k_SCIP_returned_base_status_zero_f[] = "SCIP returned base status zero for a row!"; static const char __pyx_k_SCIP_returned_unknown_base_statu[] = "SCIP returned unknown base status!"; static const char __pyx_k_SCIP_the_given_key_is_already_ex[] = "SCIP: the given key is already existing in table!"; static const char __pyx_k_SCIP_the_parameter_is_not_of_the[] = "SCIP: the parameter is not of the expected type!"; static const char __pyx_k_SCIP_the_parameter_with_the_give[] = "SCIP: the parameter with the given name was not found!"; static const char __pyx_k_SCIP_the_value_is_invalid_for_th[] = "SCIP: the value is invalid for the given parameter!"; static const char __pyx_k_cannot_create_Constraint_with_SC[] = "cannot create Constraint with SCIP_CONS* == NULL"; static const char __pyx_k_coefficients_not_available_for_c[] = "coefficients not available for constraints of type "; static const char __pyx_k_could_not_change_variable_type_o[] = "could not change variable type of variable %s"; static const char __pyx_k_dual_solution_values_not_availab[] = "dual solution values not available for constraints of type "; static const char __pyx_k_expected_inequality_that_has_eit[] = "expected inequality that has either only a left or right hand side"; static const char __pyx_k_expected_linear_inequality_expre[] = "expected linear inequality, expression has degree %d"; static const char __pyx_k_given_coefficients_are_neither_E[] = "given coefficients are neither Expr or number but %s"; static const char __pyx_k_given_constraint_is_not_ExprCons[] = "given constraint is not ExprCons but %s"; static const char __pyx_k_given_constraint_is_not_linear_d[] = "given constraint is not linear, degree == %d"; static const char __pyx_k_given_constraint_is_not_quadrati[] = "given constraint is not quadratic, degree == %d"; static const char __pyx_k_linked_SCIP_is_not_compatible_to[] = "linked SCIP is not compatible to this version of PySCIPOpt - use at least version"; static const char __pyx_k_linked_SCIP_is_not_recommended_f[] = "linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}"; static const char __pyx_k_method_cannot_be_called_before_p[] = "method cannot be called before problem is solved"; static const char __pyx_k_method_cannot_be_called_for_cons[] = "method cannot be called for constraints of type "; static const char __pyx_k_no_dual_solution_available_for_c[] = "no dual solution available for constraint "; static const char __pyx_k_no_reduced_cost_available_for_va[] = "no reduced cost available for variable "; static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; static const char __pyx_k_python_error_in_benderscreatesub[] = "python error in benderscreatesub: this method needs to be implemented"; static const char __pyx_k_python_error_in_benderscutexec_t[] = "python error in benderscutexec: this method needs to be implemented"; static const char __pyx_k_python_error_in_bendersgetvar_th[] = "python error in bendersgetvar: this method needs to be implemented"; static const char __pyx_k_python_error_in_conscheck_this_m[] = "python error in conscheck: this method needs to be implemented"; static const char __pyx_k_python_error_in_consenforelax_th[] = "python error in consenforelax: this method needs to be implemented"; static const char __pyx_k_python_error_in_conslock_this_me[] = "python error in conslock: this method needs to be implemented"; static const char __pyx_k_python_error_in_eventexec_this_m[] = "python error in eventexec: this method needs to be implemented"; static const char __pyx_k_python_error_in_heurexec_this_me[] = "python error in heurexec: this method needs to be implemented"; static const char __pyx_k_python_error_in_pricerredcost_th[] = "python error in pricerredcost: this method needs to be implemented"; static const char __pyx_k_python_error_in_propexec_this_me[] = "python error in propexec: this method needs to be implemented"; static const char __pyx_k_python_error_in_propresprop_this[] = "python error in propresprop: this method needs to be implemented"; static const char __pyx_k_python_error_in_relaxexec_this_m[] = "python error in relaxexec: this method needs to be implemented"; static const char __pyx_k_self__scip_self__valid_cannot_be[] = "self._scip,self._valid cannot be converted to a Python object for pickling"; static const char __pyx_k_self_event_cannot_be_converted_t[] = "self.event cannot be converted to a Python object for pickling"; static const char __pyx_k_self_scip_col_cannot_be_converte[] = "self.scip_col cannot be converted to a Python object for pickling"; static const char __pyx_k_self_scip_cons_cannot_be_convert[] = "self.scip_cons cannot be converted to a Python object for pickling"; static const char __pyx_k_self_scip_node_cannot_be_convert[] = "self.scip_node cannot be converted to a Python object for pickling"; static const char __pyx_k_self_scip_row_cannot_be_converte[] = "self.scip_row cannot be converted to a Python object for pickling"; static const char __pyx_k_self_scip_var_cannot_be_converte[] = "self.scip_var cannot be converted to a Python object for pickling"; static const char __pyx_k_term_length_must_be_1_or_2_but_i[] = "term length must be 1 or 2 but it is %s"; static const char __pyx_k_wrote_parameter_settings_to_file[] = "wrote parameter settings to file "; static const char __pyx_k_Incompatible_checksums_s_vs_0xfe_2[] = "Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))"; static PyObject *__pyx_kp_u_; static PyObject *__pyx_n_s_AFTERLPLOOP; static PyObject *__pyx_n_s_AFTERLPNODE; static PyObject *__pyx_n_s_AFTERLPPLUNGE; static PyObject *__pyx_n_s_AFTERPROPLOOP; static PyObject *__pyx_n_s_AFTERPSEUDONODE; static PyObject *__pyx_n_s_AFTERPSEUDOPLUNGE; static PyObject *__pyx_n_s_AGGRESSIVE; static PyObject *__pyx_n_u_ANDcons; static PyObject *__pyx_n_s_AUTO; static PyObject *__pyx_n_u_B; static PyObject *__pyx_n_s_BEFORELP; static PyObject *__pyx_n_s_BEFORENODE; static PyObject *__pyx_n_s_BEFOREPRESOL; static PyObject *__pyx_n_s_BESTSOLFOUND; static PyObject *__pyx_n_s_BESTSOLLIMIT; static PyObject *__pyx_n_u_BINARY; static PyObject *__pyx_n_s_BRANCHED; static PyObject *__pyx_n_s_Benders; static PyObject *__pyx_n_s_Benderscut; static PyObject *__pyx_n_s_Branchrule; static PyObject *__pyx_n_u_C; static PyObject *__pyx_n_s_CHECK; static PyObject *__pyx_n_s_CHILD; static PyObject *__pyx_n_s_CONSADDED; static PyObject *__pyx_n_s_CONSCHANGED; static PyObject *__pyx_n_s_CONST; static PyObject *__pyx_n_u_CONTINUOUS; static PyObject *__pyx_n_s_COUNTER; static PyObject *__pyx_n_s_CPSOLVER; static PyObject *__pyx_n_s_CUTOFF; static PyObject *__pyx_kp_u_Can_t_evaluate_constraints_as_bo; static PyObject *__pyx_n_u_CardinalityCons; static PyObject *__pyx_n_s_Column; static PyObject *__pyx_n_s_Conshdlr; static PyObject *__pyx_n_s_Constant; static PyObject *__pyx_kp_u_Constant_offsets_in_objective_ar; static PyObject *__pyx_n_s_Constraint; static PyObject *__pyx_n_s_DEADEND; static PyObject *__pyx_n_s_DEFAULT; static PyObject *__pyx_n_s_DELAYED; static PyObject *__pyx_n_s_DIDNOTFIND; static PyObject *__pyx_n_s_DIDNOTRUN; static PyObject *__pyx_n_s_DISABLED; static PyObject *__pyx_n_s_DOWNWARDS; static PyObject *__pyx_n_s_DURINGLPLOOP; static PyObject *__pyx_n_s_DURINGPRESOLLOOP; static PyObject *__pyx_n_s_DURINGPRICINGLOOP; static PyObject *__pyx_n_s_EASYCIP; static PyObject *__pyx_n_s_ERROR; static PyObject *__pyx_n_s_EXHAUSTIVE; static PyObject *__pyx_n_s_EXITPRESOLVE; static PyObject *__pyx_n_s_EXITSOLVE; static PyObject *__pyx_kp_u_Error_branching_rule_not_found; static PyObject *__pyx_n_s_Event; static PyObject *__pyx_n_s_Eventhdlr; static PyObject *__pyx_n_s_Expr; static PyObject *__pyx_kp_u_ExprCons; static PyObject *__pyx_n_s_ExprCons_2; static PyObject *__pyx_kp_u_ExprCons_already_has_lower_bound; static PyObject *__pyx_kp_u_ExprCons_already_has_upper_bound; static PyObject *__pyx_kp_u_Expr_s; static PyObject *__pyx_n_s_FAST; static PyObject *__pyx_n_s_FEASIBILITY; static PyObject *__pyx_n_s_FEASIBLE; static PyObject *__pyx_n_s_FIRSTLPSOLVED; static PyObject *__pyx_n_s_FIXED; static PyObject *__pyx_n_s_FOCUSNODE; static PyObject *__pyx_n_s_FORK; static PyObject *__pyx_n_s_FOUNDSOL; static PyObject *__pyx_n_s_FREE; static PyObject *__pyx_n_s_FREETRANS; static PyObject *__pyx_n_s_GAPLIMIT; static PyObject *__pyx_n_s_GHOLEADDED; static PyObject *__pyx_n_s_GHOLEREMOVED; static PyObject *__pyx_n_s_GLBCHANGED; static PyObject *__pyx_n_s_GUBCHANGED; static PyObject *__pyx_n_s_GenExpr; static PyObject *__pyx_n_s_HARDLP; static PyObject *__pyx_n_s_Heur; static PyObject *__pyx_n_u_I; static PyObject *__pyx_n_s_IMPLADDED; static PyObject *__pyx_n_s_INFEASIBLE; static PyObject *__pyx_n_s_INFORUNBD; static PyObject *__pyx_n_s_INIT; static PyObject *__pyx_n_s_INITPRESOLVE; static PyObject *__pyx_n_s_INITSOLVE; static PyObject *__pyx_n_u_INTEGER; static PyObject *__pyx_n_s_IOError; static PyObject *__pyx_n_s_ITERLIMIT; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x20; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x6f; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x88; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x8f; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x9b; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa0; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb3; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xba; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xec; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xfe; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xfe_2; static PyObject *__pyx_n_u_IndicatorCons; static PyObject *__pyx_n_s_JUNCTION; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_n_s_LBRELAXED; static PyObject *__pyx_n_s_LBTIGHTENED; static PyObject *__pyx_n_s_LEAF; static PyObject *__pyx_n_s_LHOLEADDED; static PyObject *__pyx_n_s_LHOLEREMOVED; static PyObject *__pyx_n_s_LP; static PyObject *__pyx_n_u_LP; static PyObject *__pyx_n_s_LPEVENT; static PyObject *__pyx_n_s_LPSOLVED; static PyObject *__pyx_n_s_LookupError; static PyObject *__pyx_n_s_MAJOR; static PyObject *__pyx_n_s_MEDIUM; static PyObject *__pyx_n_s_MEMLIMIT; static PyObject *__pyx_n_s_MINOR; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_n_s_Model; static PyObject *__pyx_n_s_NEWROUND; static PyObject *__pyx_n_s_NODEBRANCHED; static PyObject *__pyx_n_s_NODEFEASIBLE; static PyObject *__pyx_n_s_NODEFOCUSED; static PyObject *__pyx_n_s_NODEINFEASIBLE; static PyObject *__pyx_n_s_NODELIMIT; static PyObject *__pyx_n_s_NONE; static PyObject *__pyx_n_s_NOTSOLVED; static PyObject *__pyx_n_s_Node; static PyObject *__pyx_n_s_Nodesel; static PyObject *__pyx_kp_u_Nonlinear_objective_functions_ar; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_kp_u_Not_a_valid_parameter_name; static PyObject *__pyx_n_s_OBJCHANGED; static PyObject *__pyx_n_s_OBJLIMIT; static PyObject *__pyx_n_s_OFF; static PyObject *__pyx_n_s_OPTIMAL; static PyObject *__pyx_n_s_OPTIMALITY; static PyObject *__pyx_n_u_ORcons; static PyObject *__pyx_n_s_Op; static PyObject *__pyx_n_s_Op_getOpIndex; static PyObject *__pyx_n_s_Operator; static PyObject *__pyx_n_s_PATCH; static PyObject *__pyx_n_s_PHASEFEAS; static PyObject *__pyx_n_s_PHASEIMPROVE; static PyObject *__pyx_n_s_PHASEPROOF; static PyObject *__pyx_n_s_POORSOLFOUND; static PyObject *__pyx_n_s_PRESOLVED; static PyObject *__pyx_n_s_PRESOLVEROUND; static PyObject *__pyx_n_s_PRESOLVING; static PyObject *__pyx_n_s_PROBINGNODE; static PyObject *__pyx_n_s_PROBLEM; static PyObject *__pyx_n_s_PSEUDO; static PyObject *__pyx_n_s_PSEUDOFORK; static PyObject *__pyx_n_s_PY_SCIP_BENDERSENFOTYPE; static PyObject *__pyx_n_s_PY_SCIP_BRANCHDIR; static PyObject *__pyx_n_s_PY_SCIP_CALL; static PyObject *__pyx_n_s_PY_SCIP_EVENTTYPE; static PyObject *__pyx_n_s_PY_SCIP_HEURTIMING; static PyObject *__pyx_n_s_PY_SCIP_LPSOLSTAT; static PyObject *__pyx_n_s_PY_SCIP_NODETYPE; static PyObject *__pyx_n_s_PY_SCIP_PARAMEMPHASIS; static PyObject *__pyx_n_s_PY_SCIP_PARAMSETTING; static PyObject *__pyx_n_s_PY_SCIP_PRESOLTIMING; static PyObject *__pyx_n_s_PY_SCIP_PROPTIMING; static PyObject *__pyx_n_s_PY_SCIP_RESULT; static PyObject *__pyx_n_s_PY_SCIP_STAGE; static PyObject *__pyx_n_s_PY_SCIP_STATUS; static PyObject *__pyx_n_s_PickleError; static PyObject *__pyx_n_s_PowExpr; static PyObject *__pyx_n_s_Presol; static PyObject *__pyx_n_s_Pricer; static PyObject *__pyx_n_s_ProdExpr; static PyObject *__pyx_n_s_Prop; static PyObject *__pyx_kp_u_Provide_BOOLEAN_value_as_rhsvar; static PyObject *__pyx_n_s_REDUCEDDOM; static PyObject *__pyx_n_s_REFOCUSNODE; static PyObject *__pyx_n_s_RELAX; static PyObject *__pyx_n_s_RESTARTLIMIT; static PyObject *__pyx_n_s_ROWADDEDLP; static PyObject *__pyx_n_s_ROWADDEDSEPA; static PyObject *__pyx_n_s_ROWCOEFCHANGED; static PyObject *__pyx_n_s_ROWCONSTCHANGED; static PyObject *__pyx_n_s_ROWDELETEDLP; static PyObject *__pyx_n_s_ROWDELETEDSEPA; static PyObject *__pyx_n_s_ROWSIDECHANGED; static PyObject *__pyx_kp_u_Ranged_ExprCons_is_not_well_defi; static PyObject *__pyx_n_s_Relax; static PyObject *__pyx_n_s_Row; static PyObject *__pyx_kp_u_SCIP_a_required_plugin_was_not_f; static PyObject *__pyx_kp_u_SCIP_cannot_create_file; static PyObject *__pyx_kp_u_SCIP_error_in_LP_solver; static PyObject *__pyx_kp_u_SCIP_error_in_input_data; static PyObject *__pyx_kp_u_SCIP_file_not_found_error; static PyObject *__pyx_kp_u_SCIP_insufficient_memory_error; static PyObject *__pyx_kp_u_SCIP_maximal_branching_depth_lev; static PyObject *__pyx_kp_u_SCIP_method_cannot_be_called_at; static PyObject *__pyx_kp_u_SCIP_method_returned_an_invalid; static PyObject *__pyx_kp_u_SCIP_no_problem_exists; static PyObject *__pyx_kp_u_SCIP_read_error; static PyObject *__pyx_kp_u_SCIP_reading_solution_from_file; static PyObject *__pyx_kp_u_SCIP_returned_base_status_zero_f; static PyObject *__pyx_kp_u_SCIP_returned_unknown_base_statu; static PyObject *__pyx_kp_u_SCIP_the_given_key_is_already_ex; static PyObject *__pyx_kp_u_SCIP_the_parameter_is_not_of_the; static PyObject *__pyx_kp_u_SCIP_the_parameter_with_the_give; static PyObject *__pyx_kp_u_SCIP_the_value_is_invalid_for_th; static PyObject *__pyx_kp_u_SCIP_unknown_return_code; static PyObject *__pyx_kp_u_SCIP_unspecified_error; static PyObject *__pyx_kp_u_SCIP_write_error; static PyObject *__pyx_n_s_SEPARATED; static PyObject *__pyx_n_s_SIBLING; static PyObject *__pyx_n_s_SOLLIMIT; static PyObject *__pyx_n_s_SOLVED; static PyObject *__pyx_n_s_SOLVELP; static PyObject *__pyx_n_s_SOLVING; static PyObject *__pyx_n_u_SOS1cons; static PyObject *__pyx_n_u_SOS2cons; static PyObject *__pyx_n_s_STALLNODELIMIT; static PyObject *__pyx_n_s_SUBROOT; static PyObject *__pyx_n_s_SUCCESS; static PyObject *__pyx_n_s_SUSPENDED; static PyObject *__pyx_n_s_SYNC; static PyObject *__pyx_n_s_Sepa; static PyObject *__pyx_n_s_Solution; static PyObject *__pyx_n_s_StopIteration; static PyObject *__pyx_n_s_SumExpr; static PyObject *__pyx_n_s_TIMELIMIT; static PyObject *__pyx_n_s_TOTALNODELIMIT; static PyObject *__pyx_n_s_TRANSFORMED; static PyObject *__pyx_n_s_TRANSFORMING; static PyObject *__pyx_n_s_Term; static PyObject *__pyx_n_s_Term___add; static PyObject *__pyx_n_s_Term___eq; static PyObject *__pyx_n_s_Term___getitem; static PyObject *__pyx_n_s_Term___hash; static PyObject *__pyx_n_s_Term___init; static PyObject *__pyx_n_s_Term___init___locals_genexpr; static PyObject *__pyx_n_s_Term___init___locals_lambda; static PyObject *__pyx_n_s_Term___len; static PyObject *__pyx_n_s_Term___repr; static PyObject *__pyx_kp_u_Term_s; static PyObject *__pyx_kp_s_This_is_a_monomial_term; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_UBRELAXED; static PyObject *__pyx_n_s_UBTIGHTENED; static PyObject *__pyx_n_s_UNBOUNDED; static PyObject *__pyx_n_s_UNBOUNDEDRAY; static PyObject *__pyx_n_s_UNKNOWN; static PyObject *__pyx_n_s_UPWARDS; static PyObject *__pyx_n_s_USERINTERRUPT; static PyObject *__pyx_n_s_UnaryExpr; static PyObject *__pyx_n_s_VARADDED; static PyObject *__pyx_n_s_VARDELETED; static PyObject *__pyx_n_s_VARFIXED; static PyObject *__pyx_n_s_VARUNLOCKED; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_VarExpr; static PyObject *__pyx_n_s_Variable; static PyObject *__pyx_n_s_Warning; static PyObject *__pyx_n_u_XORcons; static PyObject *__pyx_n_s_ZeroDivisionError; static PyObject *__pyx_kp_u__132; static PyObject *__pyx_kp_u__133; static PyObject *__pyx_kp_u__134; static PyObject *__pyx_kp_u__135; static PyObject *__pyx_kp_u__136; static PyObject *__pyx_kp_u__5; static PyObject *__pyx_kp_u__8; static PyObject *__pyx_kp_u__84; static PyObject *__pyx_kp_u__9; static PyObject *__pyx_n_u_abs; static PyObject *__pyx_n_s_abspath; static PyObject *__pyx_n_u_acons_max1; static PyObject *__pyx_n_u_acons_max2; static PyObject *__pyx_n_u_acons_max3; static PyObject *__pyx_n_u_acons_max4; static PyObject *__pyx_n_u_acons_mean1; static PyObject *__pyx_n_u_acons_mean2; static PyObject *__pyx_n_u_acons_mean3; static PyObject *__pyx_n_u_acons_mean4; static PyObject *__pyx_n_u_acons_min1; static PyObject *__pyx_n_u_acons_min2; static PyObject *__pyx_n_u_acons_min3; static PyObject *__pyx_n_u_acons_min4; static PyObject *__pyx_n_u_acons_nb1; static PyObject *__pyx_n_u_acons_nb2; static PyObject *__pyx_n_u_acons_nb3; static PyObject *__pyx_n_u_acons_nb4; static PyObject *__pyx_n_u_acons_sum1; static PyObject *__pyx_n_u_acons_sum2; static PyObject *__pyx_n_u_acons_sum3; static PyObject *__pyx_n_u_acons_sum4; static PyObject *__pyx_n_u_acons_var1; static PyObject *__pyx_n_u_acons_var2; static PyObject *__pyx_n_u_acons_var3; static PyObject *__pyx_n_u_acons_var4; static PyObject *__pyx_n_u_activities; static PyObject *__pyx_n_s_add; static PyObject *__pyx_n_s_addCols_locals_genexpr; static PyObject *__pyx_n_s_addGenNonlinearCons; static PyObject *__pyx_n_s_addLinCons; static PyObject *__pyx_n_s_addNonlinearCons; static PyObject *__pyx_n_s_addObjoffset; static PyObject *__pyx_n_s_addQuadCons; static PyObject *__pyx_n_s_addRows_locals_genexpr; static PyObject *__pyx_n_s_add_2; static PyObject *__pyx_n_u_ages; static PyObject *__pyx_n_s_allowaddcons; static PyObject *__pyx_n_u_and; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_u_avgconfliclengthscore; static PyObject *__pyx_n_u_avgconfliclengthscorecurrentrun; static PyObject *__pyx_n_u_avgconflictscore; static PyObject *__pyx_n_u_avgconflictscorecurrentrun; static PyObject *__pyx_n_u_avgcuroffscorecurrentrun; static PyObject *__pyx_n_u_avgcutoffscore; static PyObject *__pyx_n_u_avgdualbound; static PyObject *__pyx_n_u_avgincvals; static PyObject *__pyx_n_u_avginferencescore; static PyObject *__pyx_n_u_avginferencescorecurrentrun; static PyObject *__pyx_n_u_avglowerbound; static PyObject *__pyx_n_u_avgpseudocostscore; static PyObject *__pyx_n_u_avgpseudocostscorecurrentrun; static PyObject *__pyx_n_u_basestats; static PyObject *__pyx_n_u_basic; static PyObject *__pyx_n_s_bdtype; static PyObject *__pyx_n_s_benders; static PyObject *__pyx_n_s_benderscreatesub; static PyObject *__pyx_n_s_benderscut; static PyObject *__pyx_n_s_benderscutexec; static PyObject *__pyx_n_s_benderscutexit; static PyObject *__pyx_n_s_benderscutexitsol; static PyObject *__pyx_n_s_benderscutfree; static PyObject *__pyx_n_s_benderscutinit; static PyObject *__pyx_n_s_benderscutinitsol; static PyObject *__pyx_n_s_bendersexit; static PyObject *__pyx_n_s_bendersexitpre; static PyObject *__pyx_n_s_bendersexitsol; static PyObject *__pyx_n_s_bendersfree; static PyObject *__pyx_n_s_bendersfreesub; static PyObject *__pyx_n_s_bendersgetvar; static PyObject *__pyx_n_s_bendersinit; static PyObject *__pyx_n_s_bendersinitpre; static PyObject *__pyx_n_s_bendersinitsol; static PyObject *__pyx_n_s_benderspostsolve; static PyObject *__pyx_n_s_benderspresubsolve; static PyObject *__pyx_n_s_benderssolvesub; static PyObject *__pyx_n_s_benderssolvesubconvex; static PyObject *__pyx_n_s_binvar; static PyObject *__pyx_n_s_both; static PyObject *__pyx_n_s_branchdir; static PyObject *__pyx_n_s_branchexecext; static PyObject *__pyx_n_s_branchexeclp; static PyObject *__pyx_n_s_branchexecps; static PyObject *__pyx_n_s_branchexit; static PyObject *__pyx_n_s_branchexitsol; static PyObject *__pyx_n_s_branchfree; static PyObject *__pyx_n_s_branchinit; static PyObject *__pyx_n_s_branchinitsol; static PyObject *__pyx_n_s_branchrule; static PyObject *__pyx_n_s_buildGenExprObj; static PyObject *__pyx_n_u_c; static PyObject *__pyx_n_s_candidates; static PyObject *__pyx_kp_u_cannot_create_Constraint_with_SC; static PyObject *__pyx_kp_u_cannot_divide_by_0; static PyObject *__pyx_n_u_cardinality; static PyObject *__pyx_n_s_cardval; static PyObject *__pyx_n_u_cdeg_max; static PyObject *__pyx_n_u_cdeg_max_ratio; static PyObject *__pyx_n_u_cdeg_mean; static PyObject *__pyx_n_u_cdeg_mean_ratio; static PyObject *__pyx_n_u_cdeg_min; static PyObject *__pyx_n_u_cdeg_min_ratio; static PyObject *__pyx_n_u_cdeg_var; static PyObject *__pyx_n_s_ceil; static PyObject *__pyx_n_s_chckpriority; static PyObject *__pyx_n_s_check; static PyObject *__pyx_n_u_check; static PyObject *__pyx_n_s_checkbounds; static PyObject *__pyx_n_s_checkint; static PyObject *__pyx_n_s_checkintegrality; static PyObject *__pyx_n_s_checklprows; static PyObject *__pyx_n_s_child; static PyObject *__pyx_n_s_children; static PyObject *__pyx_n_s_chr; static PyObject *__pyx_kp_u_cip; static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_clear; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_coef; static PyObject *__pyx_n_s_coeff; static PyObject *__pyx_kp_u_coefficients_not_available_for_c; static PyObject *__pyx_n_s_coeffs; static PyObject *__pyx_n_s_coefs; static PyObject *__pyx_n_u_coefs; static PyObject *__pyx_n_u_coefs_neg; static PyObject *__pyx_n_u_coefs_pos; static PyObject *__pyx_n_s_col; static PyObject *__pyx_n_u_col; static PyObject *__pyx_n_u_col_cdeg_max; static PyObject *__pyx_n_u_col_cdeg_mean; static PyObject *__pyx_n_u_col_cdeg_min; static PyObject *__pyx_n_u_col_cdeg_std; static PyObject *__pyx_n_u_col_coef_max1_unit_weight; static PyObject *__pyx_n_u_col_coef_max2_inverse_sum; static PyObject *__pyx_n_u_col_coef_max3_dual_cost; static PyObject *__pyx_n_u_col_coef_mean1_unit_weight; static PyObject *__pyx_n_u_col_coef_mean2_inverse_sum; static PyObject *__pyx_n_u_col_coef_mean3_dual_cost; static PyObject *__pyx_n_u_col_coef_min1_unit_weight; static PyObject *__pyx_n_u_col_coef_min2_inverse_sum; static PyObject *__pyx_n_u_col_coef_min3_dual_cost; static PyObject *__pyx_n_u_col_coef_std1_unit_weight; static PyObject *__pyx_n_u_col_coef_std2_inverse_sum; static PyObject *__pyx_n_u_col_coef_std3_dual_cost; static PyObject *__pyx_n_u_col_coef_sum1_unit_weight; static PyObject *__pyx_n_u_col_coef_sum2_inverse_sum; static PyObject *__pyx_n_u_col_coef_sum3_dual_cost; static PyObject *__pyx_n_u_col_coefs; static PyObject *__pyx_n_u_col_coefs_neg; static PyObject *__pyx_n_u_col_coefs_pos; static PyObject *__pyx_n_u_col_lbs; static PyObject *__pyx_n_u_col_ncoefs_max; static PyObject *__pyx_n_u_col_ncoefs_mean; static PyObject *__pyx_n_u_col_ncoefs_min; static PyObject *__pyx_n_u_col_ncoefs_std; static PyObject *__pyx_n_u_col_ncoefs_sum; static PyObject *__pyx_n_u_col_ndown_locks; static PyObject *__pyx_n_u_col_nlhs_ratio_max; static PyObject *__pyx_n_u_col_nlhs_ratio_min; static PyObject *__pyx_n_u_col_nnzrs; static PyObject *__pyx_n_u_col_nrhs_ratio_max; static PyObject *__pyx_n_u_col_nrhs_ratio_min; static PyObject *__pyx_n_u_col_nup_locks; static PyObject *__pyx_n_u_col_pcoefs_max; static PyObject *__pyx_n_u_col_pcoefs_mean; static PyObject *__pyx_n_u_col_pcoefs_min; static PyObject *__pyx_n_u_col_pcoefs_std; static PyObject *__pyx_n_u_col_pcoefs_sum; static PyObject *__pyx_n_u_col_plhs_ratio_max; static PyObject *__pyx_n_u_col_plhs_ratio_min; static PyObject *__pyx_n_u_col_prhs_ratio_max; static PyObject *__pyx_n_u_col_prhs_ratio_min; static PyObject *__pyx_n_u_col_ps_down; static PyObject *__pyx_n_u_col_ps_product; static PyObject *__pyx_n_u_col_ps_ratio; static PyObject *__pyx_n_u_col_ps_sum; static PyObject *__pyx_n_u_col_ps_up; static PyObject *__pyx_n_u_col_red_costs; static PyObject *__pyx_n_u_col_sol_frac_down; static PyObject *__pyx_n_u_col_sol_frac_up; static PyObject *__pyx_n_u_col_sol_isfrac; static PyObject *__pyx_n_u_col_solvals; static PyObject *__pyx_n_u_col_type_binary; static PyObject *__pyx_n_u_col_type_int; static PyObject *__pyx_n_u_col_ubs; static PyObject *__pyx_n_u_colidxs; static PyObject *__pyx_n_s_comments; static PyObject *__pyx_n_s_completely; static PyObject *__pyx_n_s_confvar; static PyObject *__pyx_n_s_cons; static PyObject *__pyx_n_u_cons_basis_status; static PyObject *__pyx_n_u_cons_coef_max; static PyObject *__pyx_n_u_cons_coef_mean; static PyObject *__pyx_n_u_cons_coef_min; static PyObject *__pyx_n_u_cons_coef_stdev; static PyObject *__pyx_n_u_cons_dual_sol; static PyObject *__pyx_n_u_cons_is_AND; static PyObject *__pyx_n_u_cons_is_OR; static PyObject *__pyx_n_u_cons_is_XOR; static PyObject *__pyx_n_u_cons_is_aggregation; static PyObject *__pyx_n_u_cons_is_cardinality; static PyObject *__pyx_n_u_cons_is_general_linear; static PyObject *__pyx_n_u_cons_is_knapsack; static PyObject *__pyx_n_u_cons_is_linking; static PyObject *__pyx_n_u_cons_is_logicor; static PyObject *__pyx_n_u_cons_is_precedence; static PyObject *__pyx_n_u_cons_is_singleton; static PyObject *__pyx_n_u_cons_is_variable_bound; static PyObject *__pyx_n_u_cons_lhs; static PyObject *__pyx_n_u_cons_matrix; static PyObject *__pyx_n_u_cons_nneg; static PyObject *__pyx_n_u_cons_nnzrs; static PyObject *__pyx_n_u_cons_npos; static PyObject *__pyx_n_u_cons_rhs; static PyObject *__pyx_n_u_cons_sum_abs; static PyObject *__pyx_n_u_cons_sum_neg; static PyObject *__pyx_n_u_cons_sum_pos; static PyObject *__pyx_n_s_consactive; static PyObject *__pyx_n_s_conscheck; static PyObject *__pyx_n_s_conscopy; static PyObject *__pyx_n_s_consdeactive; static PyObject *__pyx_n_s_consdelete; static PyObject *__pyx_n_s_consdelvars; static PyObject *__pyx_n_s_consdisable; static PyObject *__pyx_n_s_consenable; static PyObject *__pyx_n_s_consenfolp; static PyObject *__pyx_n_s_consenfops; static PyObject *__pyx_n_s_consenforelax; static PyObject *__pyx_n_s_consexit; static PyObject *__pyx_n_s_consexitpre; static PyObject *__pyx_n_s_consexitsol; static PyObject *__pyx_n_s_consfree; static PyObject *__pyx_n_s_consgetdivebdchgs; static PyObject *__pyx_n_s_consgetnvars; static PyObject *__pyx_n_s_consgetvars; static PyObject *__pyx_n_s_conshdlr; static PyObject *__pyx_n_s_consinit; static PyObject *__pyx_n_s_consinitlp; static PyObject *__pyx_n_s_consinitpre; static PyObject *__pyx_n_s_consinitsol; static PyObject *__pyx_n_s_conslock; static PyObject *__pyx_n_s_consparse; static PyObject *__pyx_n_s_conspresol; static PyObject *__pyx_n_s_consprint; static PyObject *__pyx_n_s_consprop; static PyObject *__pyx_n_s_consresprop; static PyObject *__pyx_n_s_conssepalp; static PyObject *__pyx_n_s_conssepasol; static PyObject *__pyx_n_s_const; static PyObject *__pyx_n_u_const; static PyObject *__pyx_n_s_constant; static PyObject *__pyx_n_s_constraint; static PyObject *__pyx_kp_u_constraint_is_not_quadratic; static PyObject *__pyx_n_s_constraints; static PyObject *__pyx_kp_u_constraints_benders_active; static PyObject *__pyx_kp_u_constraints_benderslp_active; static PyObject *__pyx_n_s_constrans; static PyObject *__pyx_n_s_consvars; static PyObject *__pyx_n_s_copy; static PyObject *__pyx_kp_u_could_not_change_variable_type_o; static PyObject *__pyx_n_s_create; static PyObject *__pyx_n_s_createProbBasic; static PyObject *__pyx_n_s_createSol; static PyObject *__pyx_n_u_cumulative; static PyObject *__pyx_n_s_cut; static PyObject *__pyx_n_s_cutlp; static PyObject *__pyx_n_u_cutoffbound; static PyObject *__pyx_n_u_cutoffdepth; static PyObject *__pyx_n_s_cutpseudo; static PyObject *__pyx_n_s_cutrelax; static PyObject *__pyx_n_s_defaultPlugins; static PyObject *__pyx_n_s_degree; static PyObject *__pyx_n_s_degree_locals_genexpr; static PyObject *__pyx_n_s_delay; static PyObject *__pyx_n_s_delayprop; static PyObject *__pyx_n_s_delaysepa; static PyObject *__pyx_n_u_depth; static PyObject *__pyx_n_s_desc; static PyObject *__pyx_n_u_deterministictime; static PyObject *__pyx_n_s_dict; static PyObject *__pyx_n_s_dispchar; static PyObject *__pyx_n_s_div; static PyObject *__pyx_n_s_div_2; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_dual; static PyObject *__pyx_kp_u_dual_solution_values_not_availab; static PyObject *__pyx_n_u_dualbound; static PyObject *__pyx_n_u_dualboundroot; static PyObject *__pyx_n_u_dualsols; static PyObject *__pyx_n_s_dynamic; static PyObject *__pyx_n_u_dynamic; static PyObject *__pyx_n_s_e; static PyObject *__pyx_n_s_eagerfreq; static PyObject *__pyx_n_u_effectiverootdepth; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_enablepricing; static PyObject *__pyx_n_s_enfopriority; static PyObject *__pyx_n_s_enforce; static PyObject *__pyx_n_u_enforce; static PyObject *__pyx_n_s_enfotype; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_entries; static PyObject *__pyx_n_s_entrieslist; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_eq; static PyObject *__pyx_n_s_estimate; static PyObject *__pyx_kp_u_event_handler_not_found; static PyObject *__pyx_n_s_eventcopy; static PyObject *__pyx_n_s_eventdelete; static PyObject *__pyx_n_s_eventexec; static PyObject *__pyx_n_s_eventexit; static PyObject *__pyx_n_s_eventexitsol; static PyObject *__pyx_n_s_eventfree; static PyObject *__pyx_n_s_eventhdlr; static PyObject *__pyx_n_s_eventinit; static PyObject *__pyx_n_s_eventinitsol; static PyObject *__pyx_n_s_eventtype; static PyObject *__pyx_n_s_exact; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_exp; static PyObject *__pyx_n_u_exp; static PyObject *__pyx_kp_u_expected_inequality_that_has_eit; static PyObject *__pyx_kp_u_expected_linear_inequality_expre; static PyObject *__pyx_n_s_expo; static PyObject *__pyx_kp_u_exponents_must_be_numbers; static PyObject *__pyx_n_s_expr; static PyObject *__pyx_n_s_expr_richcmp; static PyObject *__pyx_n_s_expr_to_array; static PyObject *__pyx_n_s_expr_to_nodes; static PyObject *__pyx_n_s_extend; static PyObject *__pyx_n_s_extension; static PyObject *__pyx_n_s_f; static PyObject *__pyx_n_s_fabs; static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_filename; static PyObject *__pyx_n_s_fileno; static PyObject *__pyx_n_s_firstcol; static PyObject *__pyx_n_u_firstlpdualboundroot; static PyObject *__pyx_n_u_firstlplowerboundroot; static PyObject *__pyx_n_u_firstprimalbound; static PyObject *__pyx_n_s_firstrow; static PyObject *__pyx_n_s_fixedval; static PyObject *__pyx_n_s_flag; static PyObject *__pyx_n_s_float; static PyObject *__pyx_n_s_float32; static PyObject *__pyx_n_s_floor; static PyObject *__pyx_n_u_focusdepth; static PyObject *__pyx_n_s_force; static PyObject *__pyx_n_s_forcecut; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_u_frac_down_infeas; static PyObject *__pyx_n_u_frac_up_infeas; static PyObject *__pyx_n_s_free; static PyObject *__pyx_n_s_freq; static PyObject *__pyx_n_s_freqofs; static PyObject *__pyx_n_u_gap; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_getNNonz; static PyObject *__pyx_n_s_getObj; static PyObject *__pyx_n_s_getObjectiveSense; static PyObject *__pyx_n_s_getOp; static PyObject *__pyx_n_s_getOpIndex; static PyObject *__pyx_n_s_getSolObjVal; static PyObject *__pyx_n_s_getSolVal; static PyObject *__pyx_n_s_getStage; static PyObject *__pyx_n_s_getTransformedCons; static PyObject *__pyx_n_s_getType; static PyObject *__pyx_n_s_getVars; static PyObject *__pyx_n_s_getitem; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_kp_u_given_coefficients_are_neither_E; static PyObject *__pyx_kp_u_given_coefficients_are_not_Expr; static PyObject *__pyx_kp_u_given_constraint_is_not_ExprCons; static PyObject *__pyx_kp_u_given_constraint_is_not_linear_d; static PyObject *__pyx_kp_u_given_constraint_is_not_quadrati; static PyObject *__pyx_n_s_globalcopy; static PyObject *__pyx_n_s_hash; static PyObject *__pyx_n_s_hashval; static PyObject *__pyx_n_u_hashval; static PyObject *__pyx_n_s_heur; static PyObject *__pyx_n_s_heurexec; static PyObject *__pyx_n_s_heurexit; static PyObject *__pyx_n_s_heurexitsol; static PyObject *__pyx_n_s_heurfree; static PyObject *__pyx_n_s_heurinit; static PyObject *__pyx_n_s_heurinitsol; static PyObject *__pyx_n_s_heurtiming; static PyObject *__pyx_n_s_idx; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_includeDefaultPlugins; static PyObject *__pyx_n_u_incvals; static PyObject *__pyx_n_s_indicator_arr; static PyObject *__pyx_n_s_indices; static PyObject *__pyx_n_s_indvars; static PyObject *__pyx_n_u_inf; static PyObject *__pyx_n_s_infeasible; static PyObject *__pyx_n_u_infeasible; static PyObject *__pyx_n_s_inferinfo; static PyObject *__pyx_n_s_infinity; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_initial; static PyObject *__pyx_n_u_initial; static PyObject *__pyx_n_u_inrepropagation; static PyObject *__pyx_n_s_int32; static PyObject *__pyx_n_s_interpolation; static PyObject *__pyx_n_s_isChecked; static PyObject *__pyx_n_s_isDynamic; static PyObject *__pyx_n_s_isEnforced; static PyObject *__pyx_n_s_isInitial; static PyObject *__pyx_n_s_isLocal; static PyObject *__pyx_n_s_isModifiable; static PyObject *__pyx_n_s_isOriginal; static PyObject *__pyx_n_s_isPropagated; static PyObject *__pyx_n_s_isQuadratic; static PyObject *__pyx_n_s_isRemovable; static PyObject *__pyx_n_s_isSeparated; static PyObject *__pyx_n_s_isStickingAtNode; static PyObject *__pyx_n_u_is_at_lhs; static PyObject *__pyx_n_u_is_at_rhs; static PyObject *__pyx_n_s_is_integer; static PyObject *__pyx_n_u_is_local; static PyObject *__pyx_n_s_is_memory_freed; static PyObject *__pyx_n_u_is_modifiable; static PyObject *__pyx_n_s_is_number; static PyObject *__pyx_n_u_is_removable; static PyObject *__pyx_n_s_islpcut; static PyObject *__pyx_n_u_isprimalboundsol; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_itlim; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_u_knapsack; static PyObject *__pyx_n_s_lambda; static PyObject *__pyx_n_s_lastcol; static PyObject *__pyx_n_s_lastrow; static PyObject *__pyx_n_s_lb; static PyObject *__pyx_n_s_lbs; static PyObject *__pyx_n_u_lbs; static PyObject *__pyx_n_s_len; static PyObject *__pyx_n_s_lhs; static PyObject *__pyx_n_u_lhs; static PyObject *__pyx_n_s_lhs_2; static PyObject *__pyx_n_u_lhs_vec; static PyObject *__pyx_n_s_lhss; static PyObject *__pyx_n_u_lhss; static PyObject *__pyx_n_s_lincons; static PyObject *__pyx_n_u_linear; static PyObject *__pyx_kp_u_linked_SCIP_is_not_compatible_to; static PyObject *__pyx_kp_u_linked_SCIP_is_not_recommended_f; static PyObject *__pyx_n_u_linking; static PyObject *__pyx_n_s_local; static PyObject *__pyx_n_u_local; static PyObject *__pyx_n_s_locktype; static PyObject *__pyx_n_s_log; static PyObject *__pyx_n_u_log; static PyObject *__pyx_n_u_logicor; static PyObject *__pyx_n_u_lower; static PyObject *__pyx_n_u_lowerbound; static PyObject *__pyx_n_u_lowerboundroot; static PyObject *__pyx_n_s_lowerbounds; static PyObject *__pyx_n_u_lp_obj; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_map; static PyObject *__pyx_n_u_mappedvar; static PyObject *__pyx_n_s_math; static PyObject *__pyx_n_s_max; static PyObject *__pyx_n_s_maxbounddist; static PyObject *__pyx_n_s_maxdepth; static PyObject *__pyx_n_u_maxdepth; static PyObject *__pyx_n_u_maximize; static PyObject *__pyx_n_s_maxprerounds; static PyObject *__pyx_n_s_maxrounds; static PyObject *__pyx_n_u_maxtotaldepth; static PyObject *__pyx_n_s_memsavepriority; static PyObject *__pyx_n_s_mergecandidates; static PyObject *__pyx_n_u_merged; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_kp_u_method_cannot_be_called_before_p; static PyObject *__pyx_kp_u_method_cannot_be_called_for_cons; static PyObject *__pyx_n_u_minimize; static PyObject *__pyx_n_s_minus; static PyObject *__pyx_n_u_model; static PyObject *__pyx_kp_u_model_cip; static PyObject *__pyx_n_s_modifiable; static PyObject *__pyx_n_u_modifiable; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_mul; static PyObject *__pyx_n_s_mul_2; static PyObject *__pyx_n_u_nactivatednodes; static PyObject *__pyx_n_u_nactivesonss; static PyObject *__pyx_n_u_naddconss; static PyObject *__pyx_n_u_naddholes; static PyObject *__pyx_n_u_naggrvars; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_u_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_u_nb_down_infeas; static PyObject *__pyx_n_u_nb_up_infeas; static PyObject *__pyx_n_u_nbacktracks; static PyObject *__pyx_n_u_nbarrierlpiterations; static PyObject *__pyx_n_u_nbarrierlps; static PyObject *__pyx_n_u_nbestsolsfound; static PyObject *__pyx_n_u_nchgbds; static PyObject *__pyx_n_u_nchgcoefs; static PyObject *__pyx_n_u_nchgsides; static PyObject *__pyx_n_u_nchgvartypes; static PyObject *__pyx_n_s_nchildren; static PyObject *__pyx_n_s_ncols; static PyObject *__pyx_n_u_nconflictconssapplied; static PyObject *__pyx_n_u_nconflictconssfound; static PyObject *__pyx_n_u_nconflictconssfoundnode; static PyObject *__pyx_n_u_ncreatednodes; static PyObject *__pyx_n_u_ncreatednodesrun; static PyObject *__pyx_n_u_ncutsapplied; static PyObject *__pyx_n_u_ncutsfound; static PyObject *__pyx_n_u_ncutsfoundround; static PyObject *__pyx_n_u_ndeactivatednodes; static PyObject *__pyx_n_u_ndelayedcutoffs; static PyObject *__pyx_n_u_ndelconss; static PyObject *__pyx_n_u_ndivinglpiterations; static PyObject *__pyx_n_u_ndivinglps; static PyObject *__pyx_n_u_nduallpiterations; static PyObject *__pyx_n_u_nduallps; static PyObject *__pyx_n_u_ndualresolvelpiterations; static PyObject *__pyx_n_u_ndualresolvelps; static PyObject *__pyx_n_s_needscons; static PyObject *__pyx_n_u_nenabledconss; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_newCheck; static PyObject *__pyx_n_s_newEnf; static PyObject *__pyx_n_s_newInit; static PyObject *__pyx_n_s_newRem; static PyObject *__pyx_n_s_newbound; static PyObject *__pyx_n_s_newlhs; static PyObject *__pyx_n_s_newobj; static PyObject *__pyx_n_s_newrhs; static PyObject *__pyx_n_s_newval; static PyObject *__pyx_n_u_nfeasibleleaves; static PyObject *__pyx_n_u_nfixedvars; static PyObject *__pyx_n_u_ninfeasibleleaves; static PyObject *__pyx_n_u_ninternalnodes; static PyObject *__pyx_n_u_nleaves; static PyObject *__pyx_n_u_nlimsolsfound; static PyObject *__pyx_n_s_nlocksdown; static PyObject *__pyx_n_s_nlocksneg; static PyObject *__pyx_n_s_nlockspos; static PyObject *__pyx_n_s_nlocksup; static PyObject *__pyx_n_u_nlpiterations; static PyObject *__pyx_n_u_nlps; static PyObject *__pyx_n_s_nmarkedconss; static PyObject *__pyx_n_s_nnewaddconss; static PyObject *__pyx_n_u_nnewaddconss; static PyObject *__pyx_n_u_nnewaddholes; static PyObject *__pyx_n_s_nnewaggrvars; static PyObject *__pyx_n_u_nnewaggrvars; static PyObject *__pyx_n_s_nnewchgbds; static PyObject *__pyx_n_u_nnewchgbds; static PyObject *__pyx_n_s_nnewchgcoefs; static PyObject *__pyx_n_u_nnewchgcoefs; static PyObject *__pyx_n_s_nnewchgsides; static PyObject *__pyx_n_u_nnewchgsides; static PyObject *__pyx_n_s_nnewchgvartypes; static PyObject *__pyx_n_u_nnewchgvartypes; static PyObject *__pyx_n_s_nnewdelconss; static PyObject *__pyx_n_u_nnewdelconss; static PyObject *__pyx_n_s_nnewfixedvars; static PyObject *__pyx_n_u_nnewfixedvars; static PyObject *__pyx_n_s_nnewholes; static PyObject *__pyx_n_s_nnewupgdconss; static PyObject *__pyx_n_u_nnewupgdconss; static PyObject *__pyx_n_u_nnodeinitlpiterations; static PyObject *__pyx_n_u_nnodeinitlps; static PyObject *__pyx_n_u_nnodelpiterations; static PyObject *__pyx_n_u_nnodelps; static PyObject *__pyx_n_u_nnodes; static PyObject *__pyx_n_u_nnodesleft; static PyObject *__pyx_n_u_nnzrs; static PyObject *__pyx_n_u_nnzs; static PyObject *__pyx_kp_u_no_dual_solution_available_for_c; static PyObject *__pyx_kp_u_no_reduced_cost_available_for_va; static PyObject *__pyx_n_u_nobjlimleaves; static PyObject *__pyx_n_s_node; static PyObject *__pyx_n_s_node1; static PyObject *__pyx_n_s_node2; static PyObject *__pyx_n_s_nodecomp; static PyObject *__pyx_n_s_nodeexit; static PyObject *__pyx_n_s_nodeexitsol; static PyObject *__pyx_n_s_nodefree; static PyObject *__pyx_n_s_nodeinfeasible; static PyObject *__pyx_n_s_nodeinit; static PyObject *__pyx_n_s_nodeinitsol; static PyObject *__pyx_n_s_nodes; static PyObject *__pyx_n_s_nodesel; static PyObject *__pyx_n_s_nodeselect; static PyObject *__pyx_n_s_nodeselprio; static PyObject *__pyx_n_s_normalize; static PyObject *__pyx_n_u_norms; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_u_npricerounds; static PyObject *__pyx_n_u_npricevars; static PyObject *__pyx_n_u_npricevarsapplied; static PyObject *__pyx_n_u_npricevarsfound; static PyObject *__pyx_n_u_nprimallpiterations; static PyObject *__pyx_n_u_nprimallps; static PyObject *__pyx_n_u_nprimalresolvelpiterations; static PyObject *__pyx_n_u_nprimalresolvelps; static PyObject *__pyx_n_s_npriomergecands; static PyObject *__pyx_n_u_nreoptruns; static PyObject *__pyx_n_u_nresolvelpiterations; static PyObject *__pyx_n_u_nresolvelps; static PyObject *__pyx_n_u_nrhs_ratio_max; static PyObject *__pyx_n_u_nrhs_ratio_min; static PyObject *__pyx_n_u_nrootfirstlpiterations; static PyObject *__pyx_n_u_nrootlpiterations; static PyObject *__pyx_n_u_nrootstrongbranchlpiterations; static PyObject *__pyx_n_u_nrootstrongbranchs; static PyObject *__pyx_n_s_nrounds; static PyObject *__pyx_n_s_nrows; static PyObject *__pyx_n_u_nruns; static PyObject *__pyx_n_u_nseparounds; static PyObject *__pyx_n_u_nsolsfound; static PyObject *__pyx_n_u_nstrongbranchlpiterations; static PyObject *__pyx_n_u_nstrongbranchs; static PyObject *__pyx_n_s_nsubproblems; static PyObject *__pyx_n_u_ntotalnodes; static PyObject *__pyx_n_s_number; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to; static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor; static PyObject *__pyx_n_u_nupgdconss; static PyObject *__pyx_n_s_nusefulconss; static PyObject *__pyx_n_u_nvars; static PyObject *__pyx_n_u_nzrcoef; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_u_objcossims; static PyObject *__pyx_n_u_objective; static PyObject *__pyx_n_s_objinfeasible; static PyObject *__pyx_n_s_objs; static PyObject *__pyx_n_s_offset; static PyObject *__pyx_n_s_onlychanged; static PyObject *__pyx_n_s_onlyconvex; static PyObject *__pyx_n_s_onlyroot; static PyObject *__pyx_n_s_op; static PyObject *__pyx_n_s_op_2; static PyObject *__pyx_n_s_open; static PyObject *__pyx_n_u_opennodes_10quant; static PyObject *__pyx_n_u_opennodes_25quant; static PyObject *__pyx_n_u_opennodes_50quant; static PyObject *__pyx_n_u_opennodes_75quant; static PyObject *__pyx_n_u_opennodes_90quant; static PyObject *__pyx_n_s_operatorIndexDic; static PyObject *__pyx_n_u_optimal; static PyObject *__pyx_n_u_or; static PyObject *__pyx_n_s_origcopy; static PyObject *__pyx_n_s_original; static PyObject *__pyx_kp_u_origprob_sol; static PyObject *__pyx_kp_u_origprob_stats; static PyObject *__pyx_n_s_os_path; static PyObject *__pyx_n_u_ota_nn_max; static PyObject *__pyx_n_u_ota_nn_min; static PyObject *__pyx_n_u_ota_np_max; static PyObject *__pyx_n_u_ota_np_min; static PyObject *__pyx_n_u_ota_pn_max; static PyObject *__pyx_n_u_ota_pn_min; static PyObject *__pyx_n_u_ota_pp_max; static PyObject *__pyx_n_u_ota_pp_min; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_overwrite_input; static PyObject *__pyx_n_s_paraemphasis; static PyObject *__pyx_kp_u_param_set; static PyObject *__pyx_n_s_percentile; static PyObject *__pyx_n_s_pickle; static PyObject *__pyx_n_u_plungedepth; static PyObject *__pyx_n_s_plus; static PyObject *__pyx_n_s_pos; static PyObject *__pyx_n_s_power; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_presol; static PyObject *__pyx_n_s_presolexec; static PyObject *__pyx_n_s_presolexit; static PyObject *__pyx_n_s_presolexitpre; static PyObject *__pyx_n_s_presolfree; static PyObject *__pyx_n_s_presolinit; static PyObject *__pyx_n_s_presolinitpre; static PyObject *__pyx_n_s_presolmaxrounds; static PyObject *__pyx_n_s_presolpriority; static PyObject *__pyx_n_s_presoltiming; static PyObject *__pyx_n_s_prev_state; static PyObject *__pyx_n_u_prhs_ratio_max; static PyObject *__pyx_n_u_prhs_ratio_min; static PyObject *__pyx_n_s_pricedVar; static PyObject *__pyx_n_s_pricer; static PyObject *__pyx_n_s_pricerexit; static PyObject *__pyx_n_s_pricerexitsol; static PyObject *__pyx_n_s_pricerfarkas; static PyObject *__pyx_n_s_pricerfree; static PyObject *__pyx_n_s_pricerinit; static PyObject *__pyx_n_s_pricerinitsol; static PyObject *__pyx_n_s_pricerredcost; static PyObject *__pyx_n_u_primalbound; static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_print_memory_in_use; static PyObject *__pyx_n_s_printreason; static PyObject *__pyx_n_s_priority; static PyObject *__pyx_n_s_problemName; static PyObject *__pyx_n_s_probnumber; static PyObject *__pyx_n_s_prod; static PyObject *__pyx_n_u_prod; static PyObject *__pyx_n_s_prodexpr; static PyObject *__pyx_n_s_prop; static PyObject *__pyx_n_s_propagate; static PyObject *__pyx_n_u_propagate; static PyObject *__pyx_kp_u_propagating_maxrounds; static PyObject *__pyx_kp_u_propagating_maxroundsroot; static PyObject *__pyx_n_s_propexec; static PyObject *__pyx_n_s_propexit; static PyObject *__pyx_n_s_propexitpre; static PyObject *__pyx_n_s_propexitsol; static PyObject *__pyx_n_s_propfree; static PyObject *__pyx_n_s_propfreq; static PyObject *__pyx_n_s_propinit; static PyObject *__pyx_n_s_propinitpre; static PyObject *__pyx_n_s_propinitsol; static PyObject *__pyx_n_s_proppresol; static PyObject *__pyx_n_s_propresprop; static PyObject *__pyx_n_s_proptiming; static PyObject *__pyx_n_s_proxy; static PyObject *__pyx_n_u_ps_down; static PyObject *__pyx_n_u_ps_product; static PyObject *__pyx_n_u_ps_ratio; static PyObject *__pyx_n_u_ps_sum; static PyObject *__pyx_n_u_ps_up; static PyObject *__pyx_n_s_ptr; static PyObject *__pyx_n_s_ptrtuple; static PyObject *__pyx_n_u_ptrtuple; static PyObject *__pyx_n_s_pyscipopt_scip; static PyObject *__pyx_kp_u_python_error_in_benderscreatesub; static PyObject *__pyx_kp_u_python_error_in_benderscutexec_t; static PyObject *__pyx_kp_u_python_error_in_bendersgetvar_th; static PyObject *__pyx_kp_u_python_error_in_conscheck_this_m; static PyObject *__pyx_kp_u_python_error_in_consenfolp_this; static PyObject *__pyx_kp_u_python_error_in_consenfops_this; static PyObject *__pyx_kp_u_python_error_in_consenforelax_th; static PyObject *__pyx_kp_u_python_error_in_conslock_this_me; static PyObject *__pyx_kp_u_python_error_in_eventexec_this_m; static PyObject *__pyx_kp_u_python_error_in_heurexec_this_me; static PyObject *__pyx_kp_u_python_error_in_presolexec_this; static PyObject *__pyx_kp_u_python_error_in_pricerredcost_th; static PyObject *__pyx_kp_u_python_error_in_propexec_this_me; static PyObject *__pyx_kp_u_python_error_in_propresprop_this; static PyObject *__pyx_kp_u_python_error_in_relaxexec_this_m; static PyObject *__pyx_n_s_pyx_PickleError; static PyObject *__pyx_n_s_pyx_checksum; static PyObject *__pyx_n_s_pyx_result; static PyObject *__pyx_n_s_pyx_state; static PyObject *__pyx_n_s_pyx_type; static PyObject *__pyx_n_s_pyx_unpickle_Benders; static PyObject *__pyx_n_s_pyx_unpickle_Benderscut; static PyObject *__pyx_n_s_pyx_unpickle_Branchrule; static PyObject *__pyx_n_s_pyx_unpickle_Conshdlr; static PyObject *__pyx_n_s_pyx_unpickle_Constant; static PyObject *__pyx_n_s_pyx_unpickle_Eventhdlr; static PyObject *__pyx_n_s_pyx_unpickle_Expr; static PyObject *__pyx_n_s_pyx_unpickle_ExprCons; static PyObject *__pyx_n_s_pyx_unpickle_GenExpr; static PyObject *__pyx_n_s_pyx_unpickle_Heur; static PyObject *__pyx_n_s_pyx_unpickle_Nodesel; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_BENDERSEN; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_BRANCHDIR; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_EVENTTYPE; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_HEURTIMIN; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_LPSOLSTAT; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_NODETYPE; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_PARAMEMPH; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_PARAMSETT; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_PRESOLTIM; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_PROPTIMIN; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_RESULT; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_STAGE; static PyObject *__pyx_n_s_pyx_unpickle_PY_SCIP_STATUS; static PyObject *__pyx_n_s_pyx_unpickle_PowExpr; static PyObject *__pyx_n_s_pyx_unpickle_Presol; static PyObject *__pyx_n_s_pyx_unpickle_Pricer; static PyObject *__pyx_n_s_pyx_unpickle_ProdExpr; static PyObject *__pyx_n_s_pyx_unpickle_Prop; static PyObject *__pyx_n_s_pyx_unpickle_Relax; static PyObject *__pyx_n_s_pyx_unpickle_Sepa; static PyObject *__pyx_n_s_pyx_unpickle_SumExpr; static PyObject *__pyx_n_s_pyx_unpickle_UnaryExpr; static PyObject *__pyx_n_s_pyx_unpickle_VarExpr; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_quadcons; static PyObject *__pyx_n_u_quadratic; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_quickprod; static PyObject *__pyx_n_s_quicksum; static PyObject *__pyx_n_s_quiet; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_rc; static PyObject *__pyx_n_u_redcosts; static PyObject *__pyx_n_s_reduce; static PyObject *__pyx_n_s_reduce_cython; static PyObject *__pyx_n_s_reduce_ex; static PyObject *__pyx_n_s_relax; static PyObject *__pyx_n_s_relaxedbd; static PyObject *__pyx_n_s_relaxexec; static PyObject *__pyx_n_s_relaxexit; static PyObject *__pyx_n_s_relaxexitsol; static PyObject *__pyx_n_s_relaxfree; static PyObject *__pyx_n_s_relaxinit; static PyObject *__pyx_n_s_relaxinitsol; static PyObject *__pyx_n_s_removable; static PyObject *__pyx_n_u_removable; static PyObject *__pyx_n_s_repr; static PyObject *__pyx_n_s_repr___locals_lambda; static PyObject *__pyx_n_u_repropdepth; static PyObject *__pyx_n_s_restart; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_u_result; static PyObject *__pyx_n_s_result_dict; static PyObject *__pyx_n_s_resvar; static PyObject *__pyx_n_s_rhs; static PyObject *__pyx_n_u_rhs; static PyObject *__pyx_n_s_rhs_2; static PyObject *__pyx_n_u_rhs_vec; static PyObject *__pyx_n_s_rhss; static PyObject *__pyx_n_u_rhss; static PyObject *__pyx_n_s_rhsvar; static PyObject *__pyx_n_u_root_cdeg_max; static PyObject *__pyx_n_u_root_cdeg_mean; static PyObject *__pyx_n_u_root_cdeg_min; static PyObject *__pyx_n_u_root_cdeg_var; static PyObject *__pyx_n_s_root_info; static PyObject *__pyx_n_u_root_ncoefs_count; static PyObject *__pyx_n_u_root_ncoefs_max; static PyObject *__pyx_n_u_root_ncoefs_mean; static PyObject *__pyx_n_u_root_ncoefs_min; static PyObject *__pyx_n_u_root_ncoefs_var; static PyObject *__pyx_n_u_root_pcoefs_count; static PyObject *__pyx_n_u_root_pcoefs_max; static PyObject *__pyx_n_u_root_pcoefs_mean; static PyObject *__pyx_n_u_root_pcoefs_min; static PyObject *__pyx_n_u_root_pcoefs_var; static PyObject *__pyx_n_s_row; static PyObject *__pyx_n_u_row; static PyObject *__pyx_n_u_rowidxs; static PyObject *__pyx_n_s_self; static PyObject *__pyx_kp_s_self__scip_self__valid_cannot_be; static PyObject *__pyx_kp_s_self_event_cannot_be_converted_t; static PyObject *__pyx_kp_s_self_lpi_cannot_be_converted_to; static PyObject *__pyx_kp_s_self_scip_col_cannot_be_converte; static PyObject *__pyx_kp_s_self_scip_cons_cannot_be_convert; static PyObject *__pyx_kp_s_self_scip_node_cannot_be_convert; static PyObject *__pyx_kp_s_self_scip_row_cannot_be_converte; static PyObject *__pyx_kp_s_self_scip_var_cannot_be_converte; static PyObject *__pyx_kp_s_self_sol_cannot_be_converted_to; static PyObject *__pyx_n_u_selnode; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_sense; static PyObject *__pyx_n_s_sepa; static PyObject *__pyx_n_s_sepaexeclp; static PyObject *__pyx_n_s_sepaexecsol; static PyObject *__pyx_n_s_sepaexit; static PyObject *__pyx_n_s_sepaexitsol; static PyObject *__pyx_n_s_sepafree; static PyObject *__pyx_n_s_sepafreq; static PyObject *__pyx_n_s_sepainit; static PyObject *__pyx_n_s_sepainitsol; static PyObject *__pyx_n_s_sepapriority; static PyObject *__pyx_n_s_separate; static PyObject *__pyx_n_u_separate; static PyObject *__pyx_n_s_setBoolParam; static PyObject *__pyx_n_s_setIntParam; static PyObject *__pyx_n_s_setMaximize; static PyObject *__pyx_n_s_setMinimize; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_setstate_cython; static PyObject *__pyx_n_s_shape; static PyObject *__pyx_n_s_shareaux; static PyObject *__pyx_n_s_side; static PyObject *__pyx_n_u_skipsolve; static PyObject *__pyx_n_u_slack; static PyObject *__pyx_n_s_slots; static PyObject *__pyx_n_s_sol; static PyObject *__pyx_n_u_sol_is_at_lb; static PyObject *__pyx_n_u_sol_is_at_ub; static PyObject *__pyx_n_u_solfracs; static PyObject *__pyx_n_s_solinfeasible; static PyObject *__pyx_n_s_solution; static PyObject *__pyx_n_s_solutions; static PyObject *__pyx_n_u_solvals; static PyObject *__pyx_n_s_solvecip; static PyObject *__pyx_n_u_solvingtime; static PyObject *__pyx_n_s_sorted; static PyObject *__pyx_n_s_sourceModel; static PyObject *__pyx_n_s_splitext; static PyObject *__pyx_n_s_sqrt; static PyObject *__pyx_n_u_sqrt; static PyObject *__pyx_kp_s_src_pyscipopt_expr_pxi; static PyObject *__pyx_kp_s_src_pyscipopt_scip_pyx; static PyObject *__pyx_n_u_stats; static PyObject *__pyx_n_s_stderr; static PyObject *__pyx_n_s_stdout; static PyObject *__pyx_n_s_stdpriority; static PyObject *__pyx_n_s_stickingatnode; static PyObject *__pyx_n_u_stickingatnode; static PyObject *__pyx_n_u_stopearly; static PyObject *__pyx_n_s_str_conversion; static PyObject *__pyx_kp_s_stringsource; static PyObject *__pyx_n_s_subproblem; static PyObject *__pyx_n_u_success; static PyObject *__pyx_n_s_sum; static PyObject *__pyx_n_u_sum; static PyObject *__pyx_n_s_sumexpr; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_u_targetcons; static PyObject *__pyx_n_s_targetvalue; static PyObject *__pyx_n_s_term; static PyObject *__pyx_kp_u_term_length_must_be_1_or_2_but_i; static PyObject *__pyx_n_s_termlist; static PyObject *__pyx_n_s_terms; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_u_timelimit; static PyObject *__pyx_n_s_timing; static PyObject *__pyx_n_s_timingmask; static PyObject *__pyx_kp_u_total_number_of_solutions_found; static PyObject *__pyx_n_s_trans; static PyObject *__pyx_n_s_transformed; static PyObject *__pyx_n_u_transgap; static PyObject *__pyx_n_u_true; static PyObject *__pyx_n_s_truediv; static PyObject *__pyx_n_u_types; static PyObject *__pyx_n_s_ub; static PyObject *__pyx_n_s_ubs; static PyObject *__pyx_n_u_ubs; static PyObject *__pyx_n_u_unbounded; static PyObject *__pyx_n_u_unknown; static PyObject *__pyx_kp_u_unrecognized_objective_sense; static PyObject *__pyx_kp_u_unrecognized_optimization_sense; static PyObject *__pyx_kp_u_unrecognized_variable_type; static PyObject *__pyx_n_s_update; static PyObject *__pyx_n_s_upper; static PyObject *__pyx_n_u_upper; static PyObject *__pyx_n_u_upperbound; static PyObject *__pyx_n_u_userinterrupt; static PyObject *__pyx_n_s_usessubscip; static PyObject *__pyx_kp_u_utf_8; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_val; static PyObject *__pyx_n_s_val1; static PyObject *__pyx_n_s_val2; static PyObject *__pyx_n_s_validnode; static PyObject *__pyx_n_u_vals; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_value_to_array; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_var; static PyObject *__pyx_n_u_var; static PyObject *__pyx_n_u_varbound; static PyObject *__pyx_n_s_varexpr; static PyObject *__pyx_n_s_variable; static PyObject *__pyx_n_s_varidx; static PyObject *__pyx_n_s_vars; static PyObject *__pyx_n_s_vartuple; static PyObject *__pyx_n_u_vartuple; static PyObject *__pyx_n_s_version; static PyObject *__pyx_n_s_version_info; static PyObject *__pyx_n_s_vtype; static PyObject *__pyx_n_u_w; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_n_s_warnings; static PyObject *__pyx_n_s_weakref; static PyObject *__pyx_n_s_weight; static PyObject *__pyx_n_s_weights; static PyObject *__pyx_n_s_write; static PyObject *__pyx_n_s_write_zeros; static PyObject *__pyx_kp_u_wrote_parameter_settings_to_file; static PyObject *__pyx_kp_u_wrote_problem_to_file; static PyObject *__pyx_n_u_x; static PyObject *__pyx_n_u_xor; static PyObject *__pyx_n_u_zero; static PyObject *__pyx_n_s_zeros; static PyObject *__pyx_lambda_funcdef_9pyscipopt_4scip_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_lambda_funcdef_9pyscipopt_4scip_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip__is_number(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_e); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2_expr_richcmp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_8__init___1genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vartuple); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_8__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_10__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_12__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4buildGenExprObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Expr___init__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_terms); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_2__getitem__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_4__iter__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_6__next__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_8__abs__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_12__iadd__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_14__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_16__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ #endif static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_18__rdiv__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_20__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_22__rtruediv__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_24__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, CYTHON_UNUSED PyObject *__pyx_v_modulo); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_26__neg__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_28__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_30__radd__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_32__rmul__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_34__rsub__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_36__richcmp__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_38normalize(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_40__repr__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_6degree_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_42degree(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_5terms___get__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Expr_5terms_2__set__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Expr_5terms_4__del__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_44__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_46__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons___init__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_2normalize(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4__richcmp__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_6__repr__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_8__nonzero__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4expr___get__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr_2__set__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr_4__del__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs___get__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs_2__set__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs_4__del__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs___get__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs_2__set__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs_4__del__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_10__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_12__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6quicksum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_termlist); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8quickprod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_termlist); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2Op_getOpIndex(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_op); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr___init__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_2__abs__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_4__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_6__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_8__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, CYTHON_UNUSED PyObject *__pyx_v_modulo); /* proto */ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_10__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ #endif static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_12__rdiv__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_14__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_16__rtruediv__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_18__neg__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_20__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_22__radd__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_24__rmul__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_26__rsub__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_28__richcmp__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_30degree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_32getOp(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex___get__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex_2__set__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex_4__del__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_3_op___get__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op_2__set__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op_4__del__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_8children___get__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr_8children_2__set__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7GenExpr_8children_4__del__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_34__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_36__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7SumExpr___init__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_8constant___get__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant_2__set__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant_4__del__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs___get__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs_2__set__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs_4__del__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ProdExpr___init__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant___get__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant_2__set__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant_4__del__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7VarExpr___init__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self, PyObject *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_3var___get__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7VarExpr_3var_2__set__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7VarExpr_3var_4__del__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7PowExpr___init__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_4expo___get__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo_2__set__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo_4__del__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_9UnaryExpr___init__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self, PyObject *__pyx_v_op, PyObject *__pyx_v_expr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9UnaryExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9UnaryExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9UnaryExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Constant___init__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self, PyObject *__pyx_v_number); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_2__repr__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_6number___get__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Constant_6number_2__set__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Constant_6number_4__del__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_12log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_14sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_16expr_to_nodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_18value_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_nodes); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_20expr_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_nodes); /* proto */ static int __pyx_pf_9pyscipopt_4scip_2LP___init__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_sense); /* proto */ static void __pyx_pf_9pyscipopt_4scip_2LP_2__dealloc__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_4__repr__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_6writeLP(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_8readLP(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_10infinity(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_12isInfinity(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_14addCol(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entries, PyObject *__pyx_v_obj, PyObject *__pyx_v_lb, PyObject *__pyx_v_ub); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_7addCols_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_16addCols(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entrieslist, PyObject *__pyx_v_objs, PyObject *__pyx_v_lbs, PyObject *__pyx_v_ubs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_18delCols(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstcol, PyObject *__pyx_v_lastcol); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_20addRow(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entries, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_7addRows_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_22addRows(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entrieslist, PyObject *__pyx_v_lhss, PyObject *__pyx_v_rhss); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_24delRows(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstrow, PyObject *__pyx_v_lastrow); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_26getBounds(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstcol, PyObject *__pyx_v_lastcol); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_28getSides(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstrow, PyObject *__pyx_v_lastrow); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_30chgObj(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_col, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_32chgCoef(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_col, PyObject *__pyx_v_newval); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_34chgBound(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_col, PyObject *__pyx_v_lb, PyObject *__pyx_v_ub); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_36chgSide(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_38clear(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_40nrows(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_42ncols(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_44solve(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_dual); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_46getPrimal(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_48isPrimalFeasible(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_50getDual(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_52isDualFeasible(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_54getPrimalRay(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_56getDualRay(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_58getNIterations(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_60getRedcost(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_62getBasisInds(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_4name___get__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_64__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_66__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_bendersfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_2bendersinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_4bendersexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_6bendersinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_8bendersexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_10bendersinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_12bendersexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_14benderscreatesub(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_probnumber); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_16benderspresubsolve(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_enfotype, CYTHON_UNUSED PyObject *__pyx_v_checkint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_18benderssolvesubconvex(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_probnumber, CYTHON_UNUSED PyObject *__pyx_v_onlyconvex); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_20benderssolvesub(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_probnumber); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_22benderspostsolve(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_enfotype, CYTHON_UNUSED PyObject *__pyx_v_mergecandidates, CYTHON_UNUSED PyObject *__pyx_v_npriomergecands, CYTHON_UNUSED PyObject *__pyx_v_checkint, CYTHON_UNUSED PyObject *__pyx_v_infeasible); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_24bendersfreesub(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_probnumber); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_26bendersgetvar(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_variable, CYTHON_UNUSED PyObject *__pyx_v_probnumber); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7Benders_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7Benders_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7Benders_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7Benders_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_28__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_30__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_benderscutfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_2benderscutinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_4benderscutexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_6benderscutinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_8benderscutexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_10benderscutexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_probnumber, CYTHON_UNUSED PyObject *__pyx_v_enfotype); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Benderscut_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Benderscut_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_7benders___get__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Benderscut_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Benderscut_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_branchfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_2branchinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_4branchexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_6branchinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_8branchexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_10branchexeclp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_allowaddcons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_12branchexecext(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_allowaddcons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_14branchexecps(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_allowaddcons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Branchrule_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Branchrule_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_16__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_18__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_consfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_2consinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_4consexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_6consinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_8consexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_10consinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_12consexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_restart); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_14consdelete(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_16constrans(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_sourceconstraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_18consinitlp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_20conssepalp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_22conssepasol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solution); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_24consenfolp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solinfeasible); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_26consenforelax(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solinfeasible); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_28consenfops(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solinfeasible, CYTHON_UNUSED PyObject *__pyx_v_objinfeasible); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_30conscheck(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_checkintegrality, CYTHON_UNUSED PyObject *__pyx_v_checklprows, CYTHON_UNUSED PyObject *__pyx_v_printreason, CYTHON_UNUSED PyObject *__pyx_v_completely); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_32consprop(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_nmarkedconss, CYTHON_UNUSED PyObject *__pyx_v_proptiming); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_34conspresol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nrounds, CYTHON_UNUSED PyObject *__pyx_v_presoltiming, CYTHON_UNUSED PyObject *__pyx_v_nnewfixedvars, CYTHON_UNUSED PyObject *__pyx_v_nnewaggrvars, CYTHON_UNUSED PyObject *__pyx_v_nnewchgvartypes, CYTHON_UNUSED PyObject *__pyx_v_nnewchgbds, CYTHON_UNUSED PyObject *__pyx_v_nnewholes, CYTHON_UNUSED PyObject *__pyx_v_nnewdelconss, CYTHON_UNUSED PyObject *__pyx_v_nnewaddconss, CYTHON_UNUSED PyObject *__pyx_v_nnewupgdconss, CYTHON_UNUSED PyObject *__pyx_v_nnewchgcoefs, CYTHON_UNUSED PyObject *__pyx_v_nnewchgsides, PyObject *__pyx_v_result_dict); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_36consresprop(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_38conslock(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint, CYTHON_UNUSED PyObject *__pyx_v_locktype, CYTHON_UNUSED PyObject *__pyx_v_nlockspos, CYTHON_UNUSED PyObject *__pyx_v_nlocksneg); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_40consactive(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_42consdeactive(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_44consenable(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_46consdisable(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_48consdelvars(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_50consprint(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_52conscopy(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_54consparse(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_56consgetvars(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_58consgetnvars(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_60consgetdivebdchgs(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_62__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_64__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_eventcopy(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_2eventfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_4eventinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_6eventexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_8eventinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_10eventexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_12eventdelete(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_14eventexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_event); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_16__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_18__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_heurfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_2heurinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_4heurexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_6heurinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_8heurexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_10heurexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_heurtiming, CYTHON_UNUSED PyObject *__pyx_v_nodeinfeasible); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Heur_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Heur_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Heur_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Heur_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_presolfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_2presolinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_4presolexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_6presolinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_8presolexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_10presolexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_nrounds, CYTHON_UNUSED PyObject *__pyx_v_presoltiming); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_6Presol_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_6Presol_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_pricerfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_2pricerinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_4pricerexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_6pricerinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_8pricerexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_10pricerredcost(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_12pricerfarkas(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_6Pricer_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_6Pricer_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_14__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_16__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_propfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_2propinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_4propexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_6propinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_8propexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_restart); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_10propinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_12propexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_14proppresol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_nrounds, CYTHON_UNUSED PyObject *__pyx_v_presoltiming, CYTHON_UNUSED PyObject *__pyx_v_result_dict); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_16propexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_proptiming); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_18propresprop(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_confvar, CYTHON_UNUSED PyObject *__pyx_v_inferinfo, CYTHON_UNUSED PyObject *__pyx_v_bdtype, CYTHON_UNUSED PyObject *__pyx_v_relaxedbd); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Prop_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Prop_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_20__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_22__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_sepafree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_2sepainit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_4sepaexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_6sepainitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_8sepaexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_10sepaexeclp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_12sepaexecsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Sepa_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Sepa_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Sepa_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Sepa_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_14__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_16__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_relaxfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_2relaxinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_4relaxexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_6relaxinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_8relaxexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_10relaxexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Relax_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Relax_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Relax_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Relax_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_nodefree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_2nodeinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_4nodeexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_6nodeinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_8nodeexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_10nodeselect(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_12nodecomp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node1, CYTHON_UNUSED PyObject *__pyx_v_node2); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7Nodesel_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_7Nodesel_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_14__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_16__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_RESULT___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_RESULT_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_STATUS___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_STATUS_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_13PY_SCIP_STAGE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_13PY_SCIP_STAGE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_16PY_SCIP_NODETYPE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_16PY_SCIP_NODETYPE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_PROPTIMING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_HEURTIMING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_22PY_SCIP_CALL(CYTHON_UNUSED PyObject *__pyx_self, SCIP_RETCODE __pyx_v_rc); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_getType(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_2__repr__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_4getNewBound(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_6getOldBound(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_8getVar(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_10getNode(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Event_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Event_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_getLPPos(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_2getBasisStatus(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_4isIntegral(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_6getVar(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_8getPrimsol(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_10getLb(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_12getUb(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_6Column_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_6Column_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_getLhs(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_2getRhs(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_4getConstant(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_6getLPPos(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_8getBasisStatus(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_10isIntegral(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_12isModifiable(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_14getNNonz(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_16getNLPNonz(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_18getCols(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_20getVals(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_3Row_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_3Row_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Solution_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Solution_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Solution_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Solution___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Solution_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_getParent(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_2getNumber(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_4getDepth(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_6getType(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_8getLowerbound(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_10getEstimate(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_12getNAddedConss(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_14isActive(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_16isPropagatedAgain(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_18getBranchInfos(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Node_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_4Node_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_ptr(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_2__repr__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_4vtype(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_6isOriginal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_8isInLP(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_10getIndex(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_12getCol(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_14getLbOriginal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_16getUbOriginal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_18getLbGlobal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_20getUbGlobal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_22getLbLocal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_24getUbLocal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_26getObj(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_28getLPSol(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Variable_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_8Variable_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint___repr__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_2isOriginal(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_4isInitial(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_6isSeparated(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_8isEnforced(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_10isChecked(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_12isPropagated(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_14isLocal(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_16isModifiable(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_18isDynamic(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_20isRemovable(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_22isStickingAtNode(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_24isLinear(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_26isQuadratic(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Constraint_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_10Constraint_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Model___init__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_problemName, PyObject *__pyx_v_defaultPlugins, struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_sourceModel, PyObject *__pyx_v_origcopy, PyObject *__pyx_v_globalcopy, PyObject *__pyx_v_enablepricing); /* proto */ static void __pyx_pf_9pyscipopt_4scip_5Model_2__dealloc__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_4create(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_6includeDefaultPlugins(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_8createProbBasic(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_problemName); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_10freeProb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_12freeTransform(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_14version(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_16printVersion(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_18getProbName(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_20getTotalTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_22getSolvingTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_24getReadingTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_26getPresolvingTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_28getNNodes(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_30getUpperbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_32getLowerbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_34getCurrentNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_36getNLPIterations(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_38getGap(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_40getDepth(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_42infinity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_44epsilon(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_46feastol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_48feasFrac(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_50frac(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_52isZero(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_54isFeasZero(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_56isInfinity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_58isFeasNegative(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_60isFeasIntegral(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_62isLE(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_64isLT(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_66isGE(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_68isGT(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_70getCondition(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_exact); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_72setMinimize(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_74setMaximize(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_76setObjlimit(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_objlimit); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_78getObjlimit(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_80setObjective(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_coeffs, PyObject *__pyx_v_sense, PyObject *__pyx_v_clear); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_82getObjective(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_84addObjoffset(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_solutions); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_86getObjoffset(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_original); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_88setPresolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_setting); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_90setProbName(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_92setSeparating(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_setting); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_94setHeuristics(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_setting); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_96disablePropagation(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_onlyroot); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_98writeProblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_trans); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_100addVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_vtype, PyObject *__pyx_v_lb, PyObject *__pyx_v_ub, PyObject *__pyx_v_obj, PyObject *__pyx_v_pricedVar); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_102releaseVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_104getTransformedVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_106addVarLocks(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_nlocksdown, PyObject *__pyx_v_nlocksup); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_108fixVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_110delVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_112tightenVarLb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb, PyObject *__pyx_v_force); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_114tightenVarUb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub, PyObject *__pyx_v_force); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_116tightenVarUbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub, PyObject *__pyx_v_force); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_118tightenVarLbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb, PyObject *__pyx_v_force); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_120chgVarLb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_122chgVarUb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_124chgVarLbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_126chgVarUbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_128chgVarLbNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_130chgVarUbNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_132chgVarType(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_vtype); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_134getVars(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_transformed); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_136getNVars(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_138getNConss(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_140updateNodeLowerbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, PyObject *__pyx_v_lb); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_142getLPSolstat(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_144constructLP(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_146getLPObjVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_148getLPColsData(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_150getLPRowsData(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_152getNLPRows(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_154getNLPCols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_156getLPBasisInd(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_158getLPBInvRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_160getLPBInvARow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_162isLPSolBasic(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_164createEmptyRowSepa(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_sepa, PyObject *__pyx_v_name, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_removable); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_166createEmptyRowUnspec(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_removable); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_168getRowActivity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_170getRowLPActivity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_172releaseRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_174cacheRowExtensions(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_176flushRowExtensions(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_178addVarToRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_180printRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_182addPoolCut(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_184getCutEfficacy(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_186isCutEfficacious(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_188addCut(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut, PyObject *__pyx_v_forcecut); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_190getNCuts(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_192getNCutsApplied(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_194addCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_cons, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_196_addLinCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_lincons, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_198_addQuadCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_quadcons, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_200_addNonlinearCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_cons, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_202_addGenNonlinearCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_cons, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_204addConsCoeff(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_coeff); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_206addConsNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_validnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_208addConsLocal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_validnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_210addConsSOS1(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_weights, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_212addConsSOS2(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_weights, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_214addConsAnd(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_resvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_216addConsOr(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_resvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_218addConsXor(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_rhsvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_220addConsCardinality(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_consvars, PyObject *__pyx_v_cardval, PyObject *__pyx_v_indvars, PyObject *__pyx_v_weights, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_222addConsIndicator(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_cons, PyObject *__pyx_v_binvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_224addPyCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_226addVarSOS1(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_weight); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_228appendVarSOS1(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_230addVarSOS2(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_weight); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_232appendVarSOS2(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_234setInitial(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newInit); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_236setRemovable(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newRem); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_238setEnforced(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newEnf); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_240setCheck(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newCheck); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_242chgRhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_rhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_244chgLhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_lhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_246getRhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_248getLhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_250getActivity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_252getSlack(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol, PyObject *__pyx_v_side); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_254getTransformedCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_256getTermsQuadratic(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_258setRelaxSolVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_260getConss(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_262getNConss(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_264delCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_266delConsLocal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_268getValsLinear(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_270getDualMultiplier(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_272getDualsolLinear(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_274getDualfarkasLinear(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_276getVarRedcost(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_278optimize(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_280presolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_282initBendersDefault(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_subproblems); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_284computeBestSolSubproblems(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_286freeBendersSubproblems(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_288updateBendersLowerbounds(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_lowerbounds, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_290activateBenders(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, int __pyx_v_nsubproblems); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_292addBendersSubproblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_subproblem); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_294setupBendersSubproblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_probnumber, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_296solveBendersSubproblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_probnumber, PyObject *__pyx_v_enfotype, PyObject *__pyx_v_solvecip, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_298getBendersVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, PyObject *__pyx_v_probnumber); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_300includeEventhdlr(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr, PyObject *__pyx_v_name, PyObject *__pyx_v_desc); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_302includePricer(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_pricer, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_delay); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_304includeConshdlr(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_conshdlr, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_sepapriority, PyObject *__pyx_v_enfopriority, PyObject *__pyx_v_chckpriority, PyObject *__pyx_v_sepafreq, PyObject *__pyx_v_propfreq, PyObject *__pyx_v_eagerfreq, PyObject *__pyx_v_maxprerounds, PyObject *__pyx_v_delaysepa, PyObject *__pyx_v_delayprop, PyObject *__pyx_v_needscons, PyObject *__pyx_v_proptiming, PyObject *__pyx_v_presoltiming); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_306createCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_conshdlr, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_308includePresol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_presol, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_maxrounds, PyObject *__pyx_v_timing); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_310includeSepa(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_sepa, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq, PyObject *__pyx_v_maxbounddist, PyObject *__pyx_v_usessubscip, PyObject *__pyx_v_delay); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_312includeProp(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_prop, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_presolpriority, PyObject *__pyx_v_presolmaxrounds, PyObject *__pyx_v_proptiming, PyObject *__pyx_v_presoltiming, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq, PyObject *__pyx_v_delay); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_314includeHeur(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_heur, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_dispchar, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq, PyObject *__pyx_v_freqofs, PyObject *__pyx_v_maxdepth, PyObject *__pyx_v_timingmask, PyObject *__pyx_v_usessubscip); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_316includeRelax(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_relax, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_318includeBranchrule(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_branchrule, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_maxdepth, PyObject *__pyx_v_maxbounddist); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_320getChildren(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_322includeBenders(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_cutlp, PyObject *__pyx_v_cutpseudo, PyObject *__pyx_v_cutrelax, PyObject *__pyx_v_shareaux); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_324includeBenderscut(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_benderscut, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_islpcut); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_326getLPBranchCands(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_328getPseudoBranchCands(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_330branchVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_variable); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_332branchVarVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_variable, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_334calcNodeselPriority(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_variable, PyObject *__pyx_v_branchdir, PyObject *__pyx_v_targetvalue); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_336calcChildEstimate(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_variable, PyObject *__pyx_v_targetvalue); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_338createChild(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_nodeselprio, PyObject *__pyx_v_estimate); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_340startDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_342endDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_344chgVarObjDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newobj); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_346chgVarLbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newbound); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_348chgVarUbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newbound); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_350getVarLbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_352getVarUbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_354chgRowLhsDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_newlhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_356chgRowRhsDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_newrhs); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_358addRowDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_360solveDiveLP(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_itlim); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_362inRepropagation(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_364startProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_366endProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_368chgVarObjProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newobj); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_370fixVarProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_fixedval); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_372isObjChangedProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_374inProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_376solveProbingLP(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_itlim); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_378interruptSolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_380createSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_heur); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_382printBestSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_write_zeros); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_384printSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_write_zeros); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_386writeBestSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_write_zeros); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_388writeSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_filename, PyObject *__pyx_v_write_zeros); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_390readSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_392readSolFile(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_394setSolVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_396trySol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_printreason, PyObject *__pyx_v_completely, PyObject *__pyx_v_checkbounds, PyObject *__pyx_v_checkintegrality, PyObject *__pyx_v_checklprows, PyObject *__pyx_v_free); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_398checkSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_printreason, PyObject *__pyx_v_completely, PyObject *__pyx_v_checkbounds, PyObject *__pyx_v_checkintegrality, PyObject *__pyx_v_checklprows, PyObject *__pyx_v_original); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_400addSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_free); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_402freeSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_404getSols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_406getBestSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_408getSolObjVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol, PyObject *__pyx_v_original); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_410getObjVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_original); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_412getSolVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_414getVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_416getPrimalbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_418getDualbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_420getDualboundRoot(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_422writeName(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_424getStage(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_426getStatus(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_428getObjectiveSense(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_430catchEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_432dropEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_434catchVarEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_436dropVarEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_438catchRowEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_440dropRowEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_442printStatistics(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_444writeStatistics(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_446getNLPs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_448hideOutput(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_quiet); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_450redirectOutput(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_452setBoolParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_454setIntParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_456setLongintParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_458setRealParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_460setCharParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_462setStringParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_464setParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_466getParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_468readParams(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_file); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_470writeParams(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_comments, PyObject *__pyx_v_onlychanged); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_472resetParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_474resetParams(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_476setEmphasis(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_paraemphasis, PyObject *__pyx_v_quiet); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_478readProblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_extension); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_480count(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_482getNCountedSols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_484setParamsCountsols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_486freeReoptSolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_488chgReoptObjective(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_coeffs, PyObject *__pyx_v_sense); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_490getVariablePseudocost(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_variable); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_492includeNodesel(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_nodesel, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_stdpriority, PyObject *__pyx_v_memsavepriority); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_494getMapping(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_496getTimeSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_498getNPrimalSols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_500setup_ml_nodelsel(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_flag, CYTHON_UNUSED PyObject *__pyx_v_indicator_arr); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_502getState(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_prev_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_504getDingStateRows(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_506getDingStateLPgraph(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_508getDingStateCols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_510getKhalilState(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_root_info, PyObject *__pyx_v_candidates); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_512getSolvingStats(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_514executeBranchRule(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_allowaddcons); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_516getConsVals(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Model_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_9pyscipopt_4scip_5Model_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_518__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_520__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_24is_memory_freed(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_26print_memory_in_use(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_28__pyx_unpickle_Expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_30__pyx_unpickle_ExprCons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_32__pyx_unpickle_GenExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_34__pyx_unpickle_SumExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_36__pyx_unpickle_ProdExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_38__pyx_unpickle_VarExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_40__pyx_unpickle_PowExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_42__pyx_unpickle_UnaryExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_44__pyx_unpickle_Constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_46__pyx_unpickle_Benders(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_48__pyx_unpickle_Benderscut(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_50__pyx_unpickle_Branchrule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_52__pyx_unpickle_Conshdlr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_54__pyx_unpickle_Eventhdlr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_56__pyx_unpickle_Heur(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_58__pyx_unpickle_Presol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_60__pyx_unpickle_Pricer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_62__pyx_unpickle_Prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_64__pyx_unpickle_Sepa(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_66__pyx_unpickle_Relax(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_68__pyx_unpickle_Nodesel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_72__pyx_unpickle_PY_SCIP_RESULT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_74__pyx_unpickle_PY_SCIP_PARAMSETTING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_76__pyx_unpickle_PY_SCIP_PARAMEMPHASIS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_78__pyx_unpickle_PY_SCIP_STATUS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_80__pyx_unpickle_PY_SCIP_STAGE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_82__pyx_unpickle_PY_SCIP_NODETYPE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_84__pyx_unpickle_PY_SCIP_PROPTIMING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_86__pyx_unpickle_PY_SCIP_PRESOLTIMING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_88__pyx_unpickle_PY_SCIP_HEURTIMING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_90__pyx_unpickle_PY_SCIP_EVENTTYPE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_92__pyx_unpickle_PY_SCIP_LPSOLSTAT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_94__pyx_unpickle_PY_SCIP_BRANCHDIR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_9pyscipopt_4scip_96__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Expr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_ExprCons(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_GenExpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_SumExpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_ProdExpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_VarExpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PowExpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_UnaryExpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Constant(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_LP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Benders(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Benderscut(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Branchrule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Conshdlr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Eventhdlr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Heur(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Presol(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Pricer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Prop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Sepa(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Relax(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Nodesel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_RESULT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PARAMSETTING(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_STATUS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_STAGE(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_NODETYPE(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PROPTIMING(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_HEURTIMING(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_EVENTTYPE(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_BRANCHDIR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Event(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Column(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Row(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Solution(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Node(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Variable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Constraint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip_Model(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct____init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_2_degree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_4_addCols(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_6_addRows(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0}; static PyObject *__pyx_float_0_0; static PyObject *__pyx_float_1_0; static PyObject *__pyx_float_6_0; static PyObject *__pyx_float_10_0; static PyObject *__pyx_float_100_0; static PyObject *__pyx_float_1e_20; static PyObject *__pyx_float_neg_1_0; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_5; static PyObject *__pyx_int_6; static PyObject *__pyx_int_10; static PyObject *__pyx_int_25; static PyObject *__pyx_int_50; static PyObject *__pyx_int_75; static PyObject *__pyx_int_90; static PyObject *__pyx_int_100; static PyObject *__pyx_int_10000; static PyObject *__pyx_int_34551270; static PyObject *__pyx_int_116691903; static PyObject *__pyx_int_142711914; static PyObject *__pyx_int_150239579; static PyObject *__pyx_int_162847362; static PyObject *__pyx_int_168618862; static PyObject *__pyx_int_188463554; static PyObject *__pyx_int_195726446; static PyObject *__pyx_int_222419149; static PyObject *__pyx_int_248330301; static PyObject *__pyx_int_267070241; static PyObject *__pyx_int_267356384; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_k__90; static PyObject *__pyx_k__91; static PyObject *__pyx_k__92; static PyObject *__pyx_k__93; static PyObject *__pyx_k__94; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_slice__83; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__50; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; static PyObject *__pyx_tuple__57; static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__59; static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__61; static PyObject *__pyx_tuple__62; static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__64; static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__67; static PyObject *__pyx_tuple__68; static PyObject *__pyx_tuple__69; static PyObject *__pyx_tuple__70; static PyObject *__pyx_tuple__71; static PyObject *__pyx_tuple__72; static PyObject *__pyx_tuple__73; static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__76; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__78; static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__80; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__82; static PyObject *__pyx_tuple__85; static PyObject *__pyx_tuple__86; static PyObject *__pyx_tuple__87; static PyObject *__pyx_tuple__88; static PyObject *__pyx_tuple__89; static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__97; static PyObject *__pyx_tuple__98; static PyObject *__pyx_tuple__99; static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__101; static PyObject *__pyx_tuple__102; static PyObject *__pyx_tuple__103; static PyObject *__pyx_tuple__104; static PyObject *__pyx_tuple__105; static PyObject *__pyx_tuple__106; static PyObject *__pyx_tuple__107; static PyObject *__pyx_tuple__109; static PyObject *__pyx_tuple__111; static PyObject *__pyx_tuple__112; static PyObject *__pyx_tuple__114; static PyObject *__pyx_tuple__116; static PyObject *__pyx_tuple__118; static PyObject *__pyx_tuple__120; static PyObject *__pyx_tuple__122; static PyObject *__pyx_tuple__124; static PyObject *__pyx_tuple__126; static PyObject *__pyx_tuple__128; static PyObject *__pyx_tuple__130; static PyObject *__pyx_tuple__137; static PyObject *__pyx_tuple__139; static PyObject *__pyx_tuple__141; static PyObject *__pyx_tuple__143; static PyObject *__pyx_tuple__145; static PyObject *__pyx_tuple__147; static PyObject *__pyx_tuple__149; static PyObject *__pyx_tuple__151; static PyObject *__pyx_tuple__152; static PyObject *__pyx_tuple__156; static PyObject *__pyx_tuple__158; static PyObject *__pyx_tuple__160; static PyObject *__pyx_tuple__162; static PyObject *__pyx_tuple__164; static PyObject *__pyx_tuple__166; static PyObject *__pyx_tuple__168; static PyObject *__pyx_tuple__170; static PyObject *__pyx_tuple__172; static PyObject *__pyx_tuple__174; static PyObject *__pyx_tuple__176; static PyObject *__pyx_tuple__178; static PyObject *__pyx_tuple__180; static PyObject *__pyx_tuple__182; static PyObject *__pyx_tuple__184; static PyObject *__pyx_tuple__186; static PyObject *__pyx_tuple__188; static PyObject *__pyx_tuple__190; static PyObject *__pyx_tuple__192; static PyObject *__pyx_tuple__194; static PyObject *__pyx_tuple__196; static PyObject *__pyx_tuple__198; static PyObject *__pyx_tuple__200; static PyObject *__pyx_tuple__202; static PyObject *__pyx_tuple__204; static PyObject *__pyx_tuple__206; static PyObject *__pyx_tuple__208; static PyObject *__pyx_tuple__210; static PyObject *__pyx_tuple__212; static PyObject *__pyx_tuple__214; static PyObject *__pyx_tuple__216; static PyObject *__pyx_tuple__218; static PyObject *__pyx_tuple__220; static PyObject *__pyx_tuple__222; static PyObject *__pyx_codeobj__108; static PyObject *__pyx_codeobj__110; static PyObject *__pyx_codeobj__113; static PyObject *__pyx_codeobj__115; static PyObject *__pyx_codeobj__117; static PyObject *__pyx_codeobj__119; static PyObject *__pyx_codeobj__121; static PyObject *__pyx_codeobj__123; static PyObject *__pyx_codeobj__125; static PyObject *__pyx_codeobj__127; static PyObject *__pyx_codeobj__129; static PyObject *__pyx_codeobj__131; static PyObject *__pyx_codeobj__138; static PyObject *__pyx_codeobj__140; static PyObject *__pyx_codeobj__142; static PyObject *__pyx_codeobj__144; static PyObject *__pyx_codeobj__146; static PyObject *__pyx_codeobj__148; static PyObject *__pyx_codeobj__150; static PyObject *__pyx_codeobj__153; static PyObject *__pyx_codeobj__154; static PyObject *__pyx_codeobj__155; static PyObject *__pyx_codeobj__157; static PyObject *__pyx_codeobj__159; static PyObject *__pyx_codeobj__161; static PyObject *__pyx_codeobj__163; static PyObject *__pyx_codeobj__165; static PyObject *__pyx_codeobj__167; static PyObject *__pyx_codeobj__169; static PyObject *__pyx_codeobj__171; static PyObject *__pyx_codeobj__173; static PyObject *__pyx_codeobj__175; static PyObject *__pyx_codeobj__177; static PyObject *__pyx_codeobj__179; static PyObject *__pyx_codeobj__181; static PyObject *__pyx_codeobj__183; static PyObject *__pyx_codeobj__185; static PyObject *__pyx_codeobj__187; static PyObject *__pyx_codeobj__189; static PyObject *__pyx_codeobj__191; static PyObject *__pyx_codeobj__193; static PyObject *__pyx_codeobj__195; static PyObject *__pyx_codeobj__197; static PyObject *__pyx_codeobj__199; static PyObject *__pyx_codeobj__201; static PyObject *__pyx_codeobj__203; static PyObject *__pyx_codeobj__205; static PyObject *__pyx_codeobj__207; static PyObject *__pyx_codeobj__209; static PyObject *__pyx_codeobj__211; static PyObject *__pyx_codeobj__213; static PyObject *__pyx_codeobj__215; static PyObject *__pyx_codeobj__217; static PyObject *__pyx_codeobj__219; static PyObject *__pyx_codeobj__221; static PyObject *__pyx_codeobj__223; /* Late includes */ /* "pyscipopt/scip.pyx":42 * * if sys.version_info >= (3, 0): * str_conversion = lambda x:bytes(x,'utf-8') # <<<<<<<<<<<<<< * else: * str_conversion = lambda x:x */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_70lambda7(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_70lambda7 = {"lambda7", (PyCFunction)__pyx_pw_9pyscipopt_4scip_70lambda7, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_70lambda7(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda7 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_9pyscipopt_4scip_lambda7(__pyx_self, ((PyObject *)__pyx_v_x)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_9pyscipopt_4scip_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda7", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_INCREF(__pyx_kp_u_utf_8); __Pyx_GIVEREF(__pyx_kp_u_utf_8); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":44 * str_conversion = lambda x:bytes(x,'utf-8') * else: * str_conversion = lambda x:x # <<<<<<<<<<<<<< * * # Mapping the SCIP_RESULT enum to a python class */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_71lambda8(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_71lambda8 = {"lambda8", (PyCFunction)__pyx_pw_9pyscipopt_4scip_71lambda8, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_71lambda8(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda8 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_9pyscipopt_4scip_lambda8(__pyx_self, ((PyObject *)__pyx_v_x)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_9pyscipopt_4scip_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda8", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_x); __pyx_r = __pyx_v_x; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":47 * * * def _is_number(e): # <<<<<<<<<<<<<< * try: * f = float(e) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_1_is_number(PyObject *__pyx_self, PyObject *__pyx_v_e); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_1_is_number = {"_is_number", (PyCFunction)__pyx_pw_9pyscipopt_4scip_1_is_number, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_1_is_number(PyObject *__pyx_self, PyObject *__pyx_v_e) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_number (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip__is_number(__pyx_self, ((PyObject *)__pyx_v_e)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip__is_number(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_e) { CYTHON_UNUSED double __pyx_v_f; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_number", 0); /* "src/pyscipopt/expr.pxi":48 * * def _is_number(e): * try: # <<<<<<<<<<<<<< * f = float(e) * return True */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "src/pyscipopt/expr.pxi":49 * def _is_number(e): * try: * f = float(e) # <<<<<<<<<<<<<< * return True * except ValueError: # for malformed strings */ __pyx_t_4 = __Pyx_PyObject_AsDouble(__pyx_v_e); if (unlikely(__pyx_t_4 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) __pyx_v_f = __pyx_t_4; /* "src/pyscipopt/expr.pxi":50 * try: * f = float(e) * return True # <<<<<<<<<<<<<< * except ValueError: # for malformed strings * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L7_try_return; /* "src/pyscipopt/expr.pxi":48 * * def _is_number(e): * try: # <<<<<<<<<<<<<< * f = float(e) * return True */ } __pyx_L3_error:; /* "src/pyscipopt/expr.pxi":51 * f = float(e) * return True * except ValueError: # for malformed strings # <<<<<<<<<<<<<< * return False * except TypeError: # for other types (Variable, Expr) */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_5) { __Pyx_AddTraceback("pyscipopt.scip._is_number", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 51, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "src/pyscipopt/expr.pxi":52 * return True * except ValueError: # for malformed strings * return False # <<<<<<<<<<<<<< * except TypeError: # for other types (Variable, Expr) * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; } /* "src/pyscipopt/expr.pxi":53 * except ValueError: # for malformed strings * return False * except TypeError: # for other types (Variable, Expr) # <<<<<<<<<<<<<< * return False * */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("pyscipopt.scip._is_number", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 53, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); /* "src/pyscipopt/expr.pxi":54 * return False * except TypeError: # for other types (Variable, Expr) * return False # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "src/pyscipopt/expr.pxi":48 * * def _is_number(e): * try: # <<<<<<<<<<<<<< * f = float(e) * return True */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; } /* "src/pyscipopt/expr.pxi":47 * * * def _is_number(e): # <<<<<<<<<<<<<< * try: * f = float(e) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip._is_number", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":57 * * * def _expr_richcmp(self, other, op): # <<<<<<<<<<<<<< * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3_expr_richcmp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_3_expr_richcmp = {"_expr_richcmp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_3_expr_richcmp, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_3_expr_richcmp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_other = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_expr_richcmp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_expr_richcmp", 1, 3, 3, 1); __PYX_ERR(0, 57, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_expr_richcmp", 1, 3, 3, 2); __PYX_ERR(0, 57, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_expr_richcmp") < 0)) __PYX_ERR(0, 57, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_expr_richcmp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 57, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip._expr_richcmp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2_expr_richcmp(__pyx_self, __pyx_v_self, __pyx_v_other, __pyx_v_op); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2_expr_richcmp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_expr_richcmp", 0); /* "src/pyscipopt/expr.pxi":58 * * def _expr_richcmp(self, other, op): * if op == 1: # <= # <<<<<<<<<<<<<< * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) <= 0.0 */ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":59 * def _expr_richcmp(self, other, op): * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return (self - other) <= 0.0 * elif _is_number(other): */ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_GenExpr); __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":60 * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) <= 0.0 # <<<<<<<<<<<<<< * elif _is_number(other): * return ExprCons(self, rhs=float(other)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Subtract(__pyx_v_self, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_float_0_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":59 * def _expr_richcmp(self, other, op): * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return (self - other) <= 0.0 * elif _is_number(other): */ } /* "src/pyscipopt/expr.pxi":61 * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) <= 0.0 * elif _is_number(other): # <<<<<<<<<<<<<< * return ExprCons(self, rhs=float(other)) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":62 * return (self - other) <= 0.0 * elif _is_number(other): * return ExprCons(self, rhs=float(other)) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self); __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_rhs, __pyx_t_6) < 0) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ExprCons), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":61 * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) <= 0.0 * elif _is_number(other): # <<<<<<<<<<<<<< * return ExprCons(self, rhs=float(other)) * else: */ } /* "src/pyscipopt/expr.pxi":64 * return ExprCons(self, rhs=float(other)) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * elif op == 5: # >= * if isinstance(other, Expr) or isinstance(other, GenExpr): */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 64, __pyx_L1_error) } /* "src/pyscipopt/expr.pxi":58 * * def _expr_richcmp(self, other, op): * if op == 1: # <= # <<<<<<<<<<<<<< * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) <= 0.0 */ } /* "src/pyscipopt/expr.pxi":65 * else: * raise NotImplementedError * elif op == 5: # >= # <<<<<<<<<<<<<< * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) >= 0.0 */ __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":66 * raise NotImplementedError * elif op == 5: # >= * if isinstance(other, Expr) or isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return (self - other) >= 0.0 * elif _is_number(other): */ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L8_bool_binop_done; } __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_GenExpr); __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":67 * elif op == 5: # >= * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) >= 0.0 # <<<<<<<<<<<<<< * elif _is_number(other): * return ExprCons(self, lhs=float(other)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyNumber_Subtract(__pyx_v_self, __pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_float_0_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":66 * raise NotImplementedError * elif op == 5: # >= * if isinstance(other, Expr) or isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return (self - other) >= 0.0 * elif _is_number(other): */ } /* "src/pyscipopt/expr.pxi":68 * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) >= 0.0 * elif _is_number(other): # <<<<<<<<<<<<<< * return ExprCons(self, lhs=float(other)) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_number); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_other); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":69 * return (self - other) >= 0.0 * elif _is_number(other): * return ExprCons(self, lhs=float(other)) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_lhs, __pyx_t_5) < 0) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ExprCons), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":68 * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) >= 0.0 * elif _is_number(other): # <<<<<<<<<<<<<< * return ExprCons(self, lhs=float(other)) * else: */ } /* "src/pyscipopt/expr.pxi":71 * return ExprCons(self, lhs=float(other)) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * elif op == 2: # == * if isinstance(other, Expr) or isinstance(other, GenExpr): */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 71, __pyx_L1_error) } /* "src/pyscipopt/expr.pxi":65 * else: * raise NotImplementedError * elif op == 5: # >= # <<<<<<<<<<<<<< * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) >= 0.0 */ } /* "src/pyscipopt/expr.pxi":72 * else: * raise NotImplementedError * elif op == 2: # == # <<<<<<<<<<<<<< * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) == 0.0 */ __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":73 * raise NotImplementedError * elif op == 2: # == * if isinstance(other, Expr) or isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return (self - other) == 0.0 * elif _is_number(other): */ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L11_bool_binop_done; } __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_GenExpr); __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L11_bool_binop_done:; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":74 * elif op == 2: # == * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) == 0.0 # <<<<<<<<<<<<<< * elif _is_number(other): * return ExprCons(self, lhs=float(other), rhs=float(other)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyNumber_Subtract(__pyx_v_self, __pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyFloat_EqObjC(__pyx_t_5, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":73 * raise NotImplementedError * elif op == 2: # == * if isinstance(other, Expr) or isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return (self - other) == 0.0 * elif _is_number(other): */ } /* "src/pyscipopt/expr.pxi":75 * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) == 0.0 * elif _is_number(other): # <<<<<<<<<<<<<< * return ExprCons(self, lhs=float(other), rhs=float(other)) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_is_number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_other); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":76 * return (self - other) == 0.0 * elif _is_number(other): * return ExprCons(self, lhs=float(other), rhs=float(other)) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self); __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_lhs, __pyx_t_1) < 0) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_rhs, __pyx_t_1) < 0) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ExprCons), __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":75 * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) == 0.0 * elif _is_number(other): # <<<<<<<<<<<<<< * return ExprCons(self, lhs=float(other), rhs=float(other)) * else: */ } /* "src/pyscipopt/expr.pxi":78 * return ExprCons(self, lhs=float(other), rhs=float(other)) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 78, __pyx_L1_error) } /* "src/pyscipopt/expr.pxi":72 * else: * raise NotImplementedError * elif op == 2: # == # <<<<<<<<<<<<<< * if isinstance(other, Expr) or isinstance(other, GenExpr): * return (self - other) == 0.0 */ } /* "src/pyscipopt/expr.pxi":80 * raise NotImplementedError * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 80, __pyx_L1_error) } /* "src/pyscipopt/expr.pxi":57 * * * def _expr_richcmp(self, other, op): # <<<<<<<<<<<<<< * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip._expr_richcmp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":88 * __slots__ = ('vartuple', 'ptrtuple', 'hashval') * * def __init__(self, *vartuple): # <<<<<<<<<<<<<< * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Term_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_vartuple = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 1) { __pyx_v_vartuple = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_vartuple)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_vartuple); } else { __pyx_v_vartuple = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 88, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 88, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_vartuple); __pyx_v_vartuple = 0; __Pyx_AddTraceback("pyscipopt.scip.Term.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term___init__(__pyx_self, __pyx_v_self, __pyx_v_vartuple); /* function exit code */ __Pyx_XDECREF(__pyx_v_vartuple); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":89 * * def __init__(self, *vartuple): * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) # <<<<<<<<<<<<<< * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) * self.hashval = sum(self.ptrtuple) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_8__init___lambda(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_8__init___lambda = {"lambda", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Term_8__init___lambda, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_8__init___lambda(PyObject *__pyx_self, PyObject *__pyx_v_v) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_v)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Term.__init__.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_4Term_8__init___3generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/pyscipopt/expr.pxi":90 * def __init__(self, *vartuple): * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) # <<<<<<<<<<<<<< * self.hashval = sum(self.ptrtuple) * */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_8__init___1genexpr(PyObject *__pyx_self) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_1_genexpr(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 90, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pyscipopt_4scip_4Term_8__init___3generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_Term___init___locals_genexpr, __pyx_n_s_pyscipopt_scip); if (unlikely(!gen)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pyscipopt.scip.Term.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_4Term_8__init___3generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 90, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 90, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_vartuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 90, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 90, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 90, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_v, __pyx_n_s_ptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 90, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":88 * __slots__ = ('vartuple', 'ptrtuple', 'hashval') * * def __init__(self, *vartuple): # <<<<<<<<<<<<<< * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Term___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vartuple) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *__pyx_cur_scope; PyObject *__pyx_gb_9pyscipopt_4scip_4Term_8__init___3generator = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct____init__(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct____init__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 88, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); /* "src/pyscipopt/expr.pxi":89 * * def __init__(self, *vartuple): * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) # <<<<<<<<<<<<<< * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) * self.hashval = sum(self.ptrtuple) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_vartuple); __Pyx_GIVEREF(__pyx_v_vartuple); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_vartuple); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_8__init___lambda, 0, __pyx_n_s_Term___init___locals_lambda, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_3) < 0) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_vartuple, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":90 * def __init__(self, *vartuple): * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) # <<<<<<<<<<<<<< * self.hashval = sum(self.ptrtuple) * */ __pyx_t_2 = __pyx_pf_9pyscipopt_4scip_4Term_8__init___1genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_ptrtuple, __pyx_t_3) < 0) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":91 * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) * self.hashval = sum(self.ptrtuple) # <<<<<<<<<<<<<< * * def __getitem__(self, idx): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_ptrtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_hashval, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":88 * __slots__ = ('vartuple', 'ptrtuple', 'hashval') * * def __init__(self, *vartuple): # <<<<<<<<<<<<<< * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Term.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_gb_9pyscipopt_4scip_4Term_8__init___3generator); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":93 * self.hashval = sum(self.ptrtuple) * * def __getitem__(self, idx): # <<<<<<<<<<<<<< * return self.vartuple[idx] * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_3__getitem__ = {"__getitem__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Term_3__getitem__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_idx = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_idx,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_idx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 93, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 93, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_idx = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 93, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Term.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_idx); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_idx) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "src/pyscipopt/expr.pxi":94 * * def __getitem__(self, idx): * return self.vartuple[idx] # <<<<<<<<<<<<<< * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vartuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_idx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":93 * self.hashval = sum(self.ptrtuple) * * def __getitem__(self, idx): # <<<<<<<<<<<<<< * return self.vartuple[idx] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Term.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":96 * return self.vartuple[idx] * * def __hash__(self): # <<<<<<<<<<<<<< * return self.hashval * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_5__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_5__hash__ = {"__hash__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Term_5__hash__, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_5__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term_4__hash__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "src/pyscipopt/expr.pxi":97 * * def __hash__(self): * return self.hashval # <<<<<<<<<<<<<< * * def __eq__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hashval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":96 * return self.vartuple[idx] * * def __hash__(self): # <<<<<<<<<<<<<< * return self.hashval * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Term.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":99 * return self.hashval * * def __eq__(self, other): # <<<<<<<<<<<<<< * return self.ptrtuple == other.ptrtuple * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_7__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_7__eq__ = {"__eq__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Term_7__eq__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_7__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_other = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); __PYX_ERR(0, 99, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) __PYX_ERR(0, 99, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 99, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Term.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term_6__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); /* "src/pyscipopt/expr.pxi":100 * * def __eq__(self, other): * return self.ptrtuple == other.ptrtuple # <<<<<<<<<<<<<< * * def __len__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ptrtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_ptrtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":99 * return self.hashval * * def __eq__(self, other): # <<<<<<<<<<<<<< * return self.ptrtuple == other.ptrtuple * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Term.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":102 * return self.ptrtuple == other.ptrtuple * * def __len__(self): # <<<<<<<<<<<<<< * return len(self.vartuple) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_9__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_9__len__ = {"__len__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Term_9__len__, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_9__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term_8__len__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_8__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 0); /* "src/pyscipopt/expr.pxi":103 * * def __len__(self): * return len(self.vartuple) # <<<<<<<<<<<<<< * * def __add__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vartuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":102 * return self.ptrtuple == other.ptrtuple * * def __len__(self): # <<<<<<<<<<<<<< * return len(self.vartuple) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Term.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":105 * return len(self.vartuple) * * def __add__(self, other): # <<<<<<<<<<<<<< * both = self.vartuple + other.vartuple * return Term(*both) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_11__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_11__add__ = {"__add__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Term_11__add__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_11__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_other = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__add__", 1, 2, 2, 1); __PYX_ERR(0, 105, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__add__") < 0)) __PYX_ERR(0, 105, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__add__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Term.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term_10__add__(__pyx_self, __pyx_v_self, __pyx_v_other); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_10__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_both = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); /* "src/pyscipopt/expr.pxi":106 * * def __add__(self, other): * both = self.vartuple + other.vartuple # <<<<<<<<<<<<<< * return Term(*both) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vartuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_vartuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_both = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":107 * def __add__(self, other): * both = self.vartuple + other.vartuple * return Term(*both) # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Term); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_both); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":105 * return len(self.vartuple) * * def __add__(self, other): # <<<<<<<<<<<<<< * both = self.vartuple + other.vartuple * return Term(*both) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Term.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_both); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":109 * return Term(*both) * * def __repr__(self): # <<<<<<<<<<<<<< * return 'Term(%s)' % ', '.join([str(v) for v in self.vartuple]) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_13__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_4Term_13__repr__ = {"__repr__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Term_13__repr__, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_4Term_13__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Term_12__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Term_12__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_8genexpr1__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":110 * * def __repr__(self): * return 'Term(%s)' % ', '.join([str(v) for v in self.vartuple]) # <<<<<<<<<<<<<< * * CONST = Term() */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vartuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 110, __pyx_L5_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 110, __pyx_L5_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 110, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_8genexpr1__pyx_v_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 110, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0; goto __pyx_L8_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */ __pyx_t_3 = PyUnicode_Join(__pyx_kp_u_, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_Term_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":109 * return Term(*both) * * def __repr__(self): # <<<<<<<<<<<<<< * return 'Term(%s)' % ', '.join([str(v) for v in self.vartuple]) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Term.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":115 * * # helper function * def buildGenExprObj(expr): # <<<<<<<<<<<<<< * """helper function to generate an object of type GenExpr""" * if _is_number(expr): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5buildGenExprObj(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4buildGenExprObj[] = "helper function to generate an object of type GenExpr"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_5buildGenExprObj = {"buildGenExprObj", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5buildGenExprObj, METH_O, __pyx_doc_9pyscipopt_4scip_4buildGenExprObj}; static PyObject *__pyx_pw_9pyscipopt_4scip_5buildGenExprObj(PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("buildGenExprObj (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4buildGenExprObj(__pyx_self, ((PyObject *)__pyx_v_expr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4buildGenExprObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_v_sumexpr = NULL; PyObject *__pyx_v_vars = NULL; PyObject *__pyx_v_coef = NULL; struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_varexpr = NULL; PyObject *__pyx_v_prodexpr = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("buildGenExprObj", 0); /* "src/pyscipopt/expr.pxi":117 * def buildGenExprObj(expr): * """helper function to generate an object of type GenExpr""" * if _is_number(expr): # <<<<<<<<<<<<<< * return Constant(expr) * elif isinstance(expr, Expr): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_expr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_expr); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":118 * """helper function to generate an object of type GenExpr""" * if _is_number(expr): * return Constant(expr) # <<<<<<<<<<<<<< * elif isinstance(expr, Expr): * # loop over terms and create a sumexpr with the sum of each term */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Constant), __pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":117 * def buildGenExprObj(expr): * """helper function to generate an object of type GenExpr""" * if _is_number(expr): # <<<<<<<<<<<<<< * return Constant(expr) * elif isinstance(expr, Expr): */ } /* "src/pyscipopt/expr.pxi":119 * if _is_number(expr): * return Constant(expr) * elif isinstance(expr, Expr): # <<<<<<<<<<<<<< * # loop over terms and create a sumexpr with the sum of each term * # each term is either a variable (which gets transformed into varexpr) */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_expr, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "src/pyscipopt/expr.pxi":123 * # each term is either a variable (which gets transformed into varexpr) * # or a product of variables (which gets tranformed into a prod) * sumexpr = SumExpr() # <<<<<<<<<<<<<< * for vars, coef in expr.terms.items(): * if len(vars) == 0: */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_SumExpr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sumexpr = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":124 * # or a product of variables (which gets tranformed into a prod) * sumexpr = SumExpr() * for vars, coef in expr.terms.items(): # <<<<<<<<<<<<<< * if len(vars) == 0: * sumexpr += coef */ __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_terms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 124, __pyx_L1_error) } __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_3, &__pyx_t_2, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_vars, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":125 * sumexpr = SumExpr() * for vars, coef in expr.terms.items(): * if len(vars) == 0: # <<<<<<<<<<<<<< * sumexpr += coef * elif len(vars) == 1: */ __pyx_t_10 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 125, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_10 == 0) != 0); if (__pyx_t_5) { /* "src/pyscipopt/expr.pxi":126 * for vars, coef in expr.terms.items(): * if len(vars) == 0: * sumexpr += coef # <<<<<<<<<<<<<< * elif len(vars) == 1: * varexpr = VarExpr(vars[0]) */ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_sumexpr, __pyx_v_coef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_sumexpr, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":125 * sumexpr = SumExpr() * for vars, coef in expr.terms.items(): * if len(vars) == 0: # <<<<<<<<<<<<<< * sumexpr += coef * elif len(vars) == 1: */ goto __pyx_L6; } /* "src/pyscipopt/expr.pxi":127 * if len(vars) == 0: * sumexpr += coef * elif len(vars) == 1: # <<<<<<<<<<<<<< * varexpr = VarExpr(vars[0]) * sumexpr += coef * varexpr */ __pyx_t_10 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 127, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_10 == 1) != 0); if (__pyx_t_5) { /* "src/pyscipopt/expr.pxi":128 * sumexpr += coef * elif len(vars) == 1: * varexpr = VarExpr(vars[0]) # <<<<<<<<<<<<<< * sumexpr += coef * varexpr * else: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_vars, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_VarExpr), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_varexpr, ((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_t_3)); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":129 * elif len(vars) == 1: * varexpr = VarExpr(vars[0]) * sumexpr += coef * varexpr # <<<<<<<<<<<<<< * else: * prodexpr = ProdExpr() */ __pyx_t_3 = PyNumber_Multiply(__pyx_v_coef, ((PyObject *)__pyx_v_varexpr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_sumexpr, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_sumexpr, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":127 * if len(vars) == 0: * sumexpr += coef * elif len(vars) == 1: # <<<<<<<<<<<<<< * varexpr = VarExpr(vars[0]) * sumexpr += coef * varexpr */ goto __pyx_L6; } /* "src/pyscipopt/expr.pxi":131 * sumexpr += coef * varexpr * else: * prodexpr = ProdExpr() # <<<<<<<<<<<<<< * for v in vars: * varexpr = VarExpr(v) */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ProdExpr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_prodexpr, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":132 * else: * prodexpr = ProdExpr() * for v in vars: # <<<<<<<<<<<<<< * varexpr = VarExpr(v) * prodexpr *= varexpr */ if (likely(PyList_CheckExact(__pyx_v_vars)) || PyTuple_CheckExact(__pyx_v_vars)) { __pyx_t_2 = __pyx_v_vars; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 132, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 132, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 132, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":133 * prodexpr = ProdExpr() * for v in vars: * varexpr = VarExpr(v) # <<<<<<<<<<<<<< * prodexpr *= varexpr * sumexpr += coef * prodexpr */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_VarExpr), __pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_varexpr, ((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_t_3)); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":134 * for v in vars: * varexpr = VarExpr(v) * prodexpr *= varexpr # <<<<<<<<<<<<<< * sumexpr += coef * prodexpr * return sumexpr */ __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_v_prodexpr, ((PyObject *)__pyx_v_varexpr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_prodexpr, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":132 * else: * prodexpr = ProdExpr() * for v in vars: # <<<<<<<<<<<<<< * varexpr = VarExpr(v) * prodexpr *= varexpr */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":135 * varexpr = VarExpr(v) * prodexpr *= varexpr * sumexpr += coef * prodexpr # <<<<<<<<<<<<<< * return sumexpr * else: */ __pyx_t_2 = PyNumber_Multiply(__pyx_v_coef, __pyx_v_prodexpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sumexpr, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_sumexpr, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L6:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":136 * prodexpr *= varexpr * sumexpr += coef * prodexpr * return sumexpr # <<<<<<<<<<<<<< * else: * assert isinstance(expr, GenExpr) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_sumexpr); __pyx_r = __pyx_v_sumexpr; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":119 * if _is_number(expr): * return Constant(expr) * elif isinstance(expr, Expr): # <<<<<<<<<<<<<< * # loop over terms and create a sumexpr with the sum of each term * # each term is either a variable (which gets transformed into varexpr) */ } /* "src/pyscipopt/expr.pxi":138 * return sumexpr * else: * assert isinstance(expr, GenExpr) # <<<<<<<<<<<<<< * return expr * */ /*else*/ { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_expr, __pyx_ptype_9pyscipopt_4scip_GenExpr); if (unlikely(!(__pyx_t_5 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 138, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":139 * else: * assert isinstance(expr, GenExpr) * return expr # <<<<<<<<<<<<<< * * ##@details Polynomial expressions of variables with operator overloading. \n */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_expr); __pyx_r = __pyx_v_expr; goto __pyx_L0; } /* "src/pyscipopt/expr.pxi":115 * * # helper function * def buildGenExprObj(expr): # <<<<<<<<<<<<<< * """helper function to generate an object of type GenExpr""" * if _is_number(expr): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.buildGenExprObj", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sumexpr); __Pyx_XDECREF(__pyx_v_vars); __Pyx_XDECREF(__pyx_v_coef); __Pyx_XDECREF((PyObject *)__pyx_v_varexpr); __Pyx_XDECREF(__pyx_v_prodexpr); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":146 * cdef public terms * * def __init__(self, terms=None): # <<<<<<<<<<<<<< * '''terms is a dict of variables to coefficients. * */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Expr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Expr___init__[] = "terms is a dict of variables to coefficients.\n\n CONST is used as key for the constant term."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_9pyscipopt_4scip_4Expr___init__; #endif static int __pyx_pw_9pyscipopt_4scip_4Expr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_terms = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_terms,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_terms); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 146, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_terms = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Expr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr___init__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), __pyx_v_terms); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Expr___init__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_terms) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":150 * * CONST is used as key for the constant term.''' * self.terms = {} if terms is None else terms # <<<<<<<<<<<<<< * * if len(self.terms) == 0: */ __pyx_t_2 = (__pyx_v_terms == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_v_terms); __pyx_t_1 = __pyx_v_terms; } __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->terms); __Pyx_DECREF(__pyx_v_self->terms); __pyx_v_self->terms = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":152 * self.terms = {} if terms is None else terms * * if len(self.terms) == 0: # <<<<<<<<<<<<<< * self.terms[CONST] = 0.0 * */ __pyx_t_1 = __pyx_v_self->terms; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((__pyx_t_4 == 0) != 0); if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":153 * * if len(self.terms) == 0: * self.terms[CONST] = 0.0 # <<<<<<<<<<<<<< * * def __getitem__(self, key): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONST); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_v_self->terms, __pyx_t_1, __pyx_float_0_0) < 0)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":152 * self.terms = {} if terms is None else terms * * if len(self.terms) == 0: # <<<<<<<<<<<<<< * self.terms[CONST] = 0.0 * */ } /* "src/pyscipopt/expr.pxi":146 * cdef public terms * * def __init__(self, terms=None): # <<<<<<<<<<<<<< * '''terms is a dict of variables to coefficients. * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":155 * self.terms[CONST] = 0.0 * * def __getitem__(self, key): # <<<<<<<<<<<<<< * if not isinstance(key, Term): * key = Term(key) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_2__getitem__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_2__getitem__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); __Pyx_INCREF(__pyx_v_key); /* "src/pyscipopt/expr.pxi":156 * * def __getitem__(self, key): * if not isinstance(key, Term): # <<<<<<<<<<<<<< * key = Term(key) * return self.terms.get(key, 0.0) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_key, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":157 * def __getitem__(self, key): * if not isinstance(key, Term): * key = Term(key) # <<<<<<<<<<<<<< * return self.terms.get(key, 0.0) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Term); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":156 * * def __getitem__(self, key): * if not isinstance(key, Term): # <<<<<<<<<<<<<< * key = Term(key) * return self.terms.get(key, 0.0) */ } /* "src/pyscipopt/expr.pxi":158 * if not isinstance(key, Term): * key = Term(key) * return self.terms.get(key, 0.0) # <<<<<<<<<<<<<< * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->terms, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_key, __pyx_float_0_0}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_key, __pyx_float_0_0}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_key); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_float_0_0); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":155 * self.terms[CONST] = 0.0 * * def __getitem__(self, key): # <<<<<<<<<<<<<< * if not isinstance(key, Term): * key = Term(key) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Expr.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":160 * return self.terms.get(key, 0.0) * * def __iter__(self): # <<<<<<<<<<<<<< * return iter(self.terms) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_5__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_5__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_4__iter__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_4__iter__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); /* "src/pyscipopt/expr.pxi":161 * * def __iter__(self): * return iter(self.terms) # <<<<<<<<<<<<<< * * def __next__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->terms; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":160 * return self.terms.get(key, 0.0) * * def __iter__(self): # <<<<<<<<<<<<<< * return iter(self.terms) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Expr.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":163 * return iter(self.terms) * * def __next__(self): # <<<<<<<<<<<<<< * try: return next(self.terms) * except: raise StopIteration */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_7__next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_7__next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_6__next__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_6__next__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); /* "src/pyscipopt/expr.pxi":164 * * def __next__(self): * try: return next(self.terms) # <<<<<<<<<<<<<< * except: raise StopIteration * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self->terms; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7_try_return; } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":165 * def __next__(self): * try: return next(self.terms) * except: raise StopIteration # <<<<<<<<<<<<<< * * def __abs__(self): */ /*except:*/ { __Pyx_AddTraceback("pyscipopt.scip.Expr.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 165, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); __PYX_ERR(0, 165, __pyx_L5_except_error) } __pyx_L5_except_error:; /* "src/pyscipopt/expr.pxi":164 * * def __next__(self): * try: return next(self.terms) # <<<<<<<<<<<<<< * except: raise StopIteration * */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; } /* "src/pyscipopt/expr.pxi":163 * return iter(self.terms) * * def __next__(self): # <<<<<<<<<<<<<< * try: return next(self.terms) * except: raise StopIteration */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Expr.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":167 * except: raise StopIteration * * def __abs__(self): # <<<<<<<<<<<<<< * return abs(buildGenExprObj(self)) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_9__abs__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_9__abs__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_8__abs__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_8__abs__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__abs__", 0); /* "src/pyscipopt/expr.pxi":168 * * def __abs__(self): * return abs(buildGenExprObj(self)) # <<<<<<<<<<<<<< * * def __add__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":167 * except: raise StopIteration * * def __abs__(self): # <<<<<<<<<<<<<< * return abs(buildGenExprObj(self)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":170 * return abs(buildGenExprObj(self)) * * def __add__(self, other): # <<<<<<<<<<<<<< * left = self * right = other */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_10__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_left = NULL; PyObject *__pyx_v_right = NULL; PyObject *__pyx_v_terms = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); /* "src/pyscipopt/expr.pxi":171 * * def __add__(self, other): * left = self # <<<<<<<<<<<<<< * right = other * */ __Pyx_INCREF(__pyx_v_self); __pyx_v_left = __pyx_v_self; /* "src/pyscipopt/expr.pxi":172 * def __add__(self, other): * left = self * right = other # <<<<<<<<<<<<<< * * if _is_number(self): */ __Pyx_INCREF(__pyx_v_other); __pyx_v_right = __pyx_v_other; /* "src/pyscipopt/expr.pxi":174 * right = other * * if _is_number(self): # <<<<<<<<<<<<<< * assert isinstance(other, Expr) * left,right = right,left */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":175 * * if _is_number(self): * assert isinstance(other, Expr) # <<<<<<<<<<<<<< * left,right = right,left * terms = left.terms.copy() */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_Expr); if (unlikely(!(__pyx_t_4 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 175, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":176 * if _is_number(self): * assert isinstance(other, Expr) * left,right = right,left # <<<<<<<<<<<<<< * terms = left.terms.copy() * */ __pyx_t_5 = __pyx_v_right; __pyx_t_6 = __pyx_v_left; __pyx_v_left = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_right = __pyx_t_6; __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":174 * right = other * * if _is_number(self): # <<<<<<<<<<<<<< * assert isinstance(other, Expr) * left,right = right,left */ } /* "src/pyscipopt/expr.pxi":177 * assert isinstance(other, Expr) * left,right = right,left * terms = left.terms.copy() # <<<<<<<<<<<<<< * * if isinstance(right, Expr): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_terms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_terms = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":179 * terms = left.terms.copy() * * if isinstance(right, Expr): # <<<<<<<<<<<<<< * # merge the terms by component-wise addition * for v,c in right.terms.items(): */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_right, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_7 = (__pyx_t_4 != 0); if (__pyx_t_7) { /* "src/pyscipopt/expr.pxi":181 * if isinstance(right, Expr): * # merge the terms by component-wise addition * for v,c in right.terms.items(): # <<<<<<<<<<<<<< * terms[v] = terms.get(v, 0.0) + c * elif _is_number(right): */ __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 181, __pyx_L1_error) } __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_10); if (unlikely(__pyx_t_11 == 0)) break; if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":182 * # merge the terms by component-wise addition * for v,c in right.terms.items(): * terms[v] = terms.get(v, 0.0) + c # <<<<<<<<<<<<<< * elif _is_number(right): * c = float(right) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_terms, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = NULL; __pyx_t_11 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_v, __pyx_float_0_0}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_v, __pyx_float_0_0}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_13 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_11, __pyx_v_v); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_11, __pyx_float_0_0); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(PyObject_SetItem(__pyx_v_terms, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":179 * terms = left.terms.copy() * * if isinstance(right, Expr): # <<<<<<<<<<<<<< * # merge the terms by component-wise addition * for v,c in right.terms.items(): */ goto __pyx_L4; } /* "src/pyscipopt/expr.pxi":183 * for v,c in right.terms.items(): * terms[v] = terms.get(v, 0.0) + c * elif _is_number(right): # <<<<<<<<<<<<<< * c = float(right) * terms[CONST] = terms.get(CONST, 0.0) + c */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_right) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_right); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "src/pyscipopt/expr.pxi":184 * terms[v] = terms.get(v, 0.0) + c * elif _is_number(right): * c = float(right) # <<<<<<<<<<<<<< * terms[CONST] = terms.get(CONST, 0.0) + c * elif isinstance(right, GenExpr): */ __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":185 * elif _is_number(right): * c = float(right) * terms[CONST] = terms.get(CONST, 0.0) + c # <<<<<<<<<<<<<< * elif isinstance(right, GenExpr): * return buildGenExprObj(left) + right */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_terms, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CONST); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_3, __pyx_float_0_0}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_3, __pyx_float_0_0}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_12 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_10, __pyx_t_3); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_10, __pyx_float_0_0); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONST); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_v_terms, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":183 * for v,c in right.terms.items(): * terms[v] = terms.get(v, 0.0) + c * elif _is_number(right): # <<<<<<<<<<<<<< * c = float(right) * terms[CONST] = terms.get(CONST, 0.0) + c */ goto __pyx_L4; } /* "src/pyscipopt/expr.pxi":186 * c = float(right) * terms[CONST] = terms.get(CONST, 0.0) + c * elif isinstance(right, GenExpr): # <<<<<<<<<<<<<< * return buildGenExprObj(left) + right * else: */ __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_right, __pyx_ptype_9pyscipopt_4scip_GenExpr); __pyx_t_4 = (__pyx_t_7 != 0); if (likely(__pyx_t_4)) { /* "src/pyscipopt/expr.pxi":187 * terms[CONST] = terms.get(CONST, 0.0) + c * elif isinstance(right, GenExpr): * return buildGenExprObj(left) + right # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_12, __pyx_v_left) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_left); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":186 * c = float(right) * terms[CONST] = terms.get(CONST, 0.0) + c * elif isinstance(right, GenExpr): # <<<<<<<<<<<<<< * return buildGenExprObj(left) + right * else: */ } /* "src/pyscipopt/expr.pxi":189 * return buildGenExprObj(left) + right * else: * raise NotImplementedError # <<<<<<<<<<<<<< * return Expr(terms) * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 189, __pyx_L1_error) } __pyx_L4:; /* "src/pyscipopt/expr.pxi":190 * else: * raise NotImplementedError * return Expr(terms) # <<<<<<<<<<<<<< * * def __iadd__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_v_terms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":170 * return abs(buildGenExprObj(self)) * * def __add__(self, other): # <<<<<<<<<<<<<< * left = self * right = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pyscipopt.scip.Expr.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_left); __Pyx_XDECREF(__pyx_v_right); __Pyx_XDECREF(__pyx_v_terms); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":192 * return Expr(terms) * * def __iadd__(self, other): # <<<<<<<<<<<<<< * if isinstance(other, Expr): * for v,c in other.terms.items(): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_13__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_13__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_12__iadd__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_12__iadd__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iadd__", 0); /* "src/pyscipopt/expr.pxi":193 * * def __iadd__(self, other): * if isinstance(other, Expr): # <<<<<<<<<<<<<< * for v,c in other.terms.items(): * self.terms[v] = self.terms.get(v, 0.0) + c */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":194 * def __iadd__(self, other): * if isinstance(other, Expr): * for v,c in other.terms.items(): # <<<<<<<<<<<<<< * self.terms[v] = self.terms.get(v, 0.0) + c * elif _is_number(other): */ __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_terms); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 194, __pyx_L1_error) } __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_8; __pyx_t_8 = 0; while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_8, &__pyx_t_7, NULL, __pyx_t_6); if (unlikely(__pyx_t_9 == 0)) break; if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_7); __pyx_t_7 = 0; /* "src/pyscipopt/expr.pxi":195 * if isinstance(other, Expr): * for v,c in other.terms.items(): * self.terms[v] = self.terms.get(v, 0.0) + c # <<<<<<<<<<<<<< * elif _is_number(other): * c = float(other) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->terms, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_v, __pyx_float_0_0}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_v, __pyx_float_0_0}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_v_v); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_float_0_0); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(PyObject_SetItem(__pyx_v_self->terms, __pyx_v_v, __pyx_t_8) < 0)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":193 * * def __iadd__(self, other): * if isinstance(other, Expr): # <<<<<<<<<<<<<< * for v,c in other.terms.items(): * self.terms[v] = self.terms.get(v, 0.0) + c */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":196 * for v,c in other.terms.items(): * self.terms[v] = self.terms.get(v, 0.0) + c * elif _is_number(other): # <<<<<<<<<<<<<< * c = float(other) * self.terms[CONST] = self.terms.get(CONST, 0.0) + c */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_is_number); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_other); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":197 * self.terms[v] = self.terms.get(v, 0.0) + c * elif _is_number(other): * c = float(other) # <<<<<<<<<<<<<< * self.terms[CONST] = self.terms.get(CONST, 0.0) + c * elif isinstance(other, GenExpr): */ __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_c = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":198 * elif _is_number(other): * c = float(other) * self.terms[CONST] = self.terms.get(CONST, 0.0) + c # <<<<<<<<<<<<<< * elif isinstance(other, GenExpr): * # is no longer in place, might affect performance? */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->terms, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CONST); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_float_0_0}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_float_0_0}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_float_0_0); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CONST); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyObject_SetItem(__pyx_v_self->terms, __pyx_t_3, __pyx_t_8) < 0)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "src/pyscipopt/expr.pxi":196 * for v,c in other.terms.items(): * self.terms[v] = self.terms.get(v, 0.0) + c * elif _is_number(other): # <<<<<<<<<<<<<< * c = float(other) * self.terms[CONST] = self.terms.get(CONST, 0.0) + c */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":199 * c = float(other) * self.terms[CONST] = self.terms.get(CONST, 0.0) + c * elif isinstance(other, GenExpr): # <<<<<<<<<<<<<< * # is no longer in place, might affect performance? * # can't do `self = buildGenExprObj(self) + other` since I get */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_GenExpr); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "src/pyscipopt/expr.pxi":203 * # can't do `self = buildGenExprObj(self) + other` since I get * # TypeError: Cannot convert pyscipopt.scip.SumExpr to pyscipopt.scip.Expr * return buildGenExprObj(self) + other # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_v_other); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":199 * c = float(other) * self.terms[CONST] = self.terms.get(CONST, 0.0) + c * elif isinstance(other, GenExpr): # <<<<<<<<<<<<<< * # is no longer in place, might affect performance? * # can't do `self = buildGenExprObj(self) + other` since I get */ } /* "src/pyscipopt/expr.pxi":205 * return buildGenExprObj(self) + other * else: * raise NotImplementedError # <<<<<<<<<<<<<< * return self * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 205, __pyx_L1_error) } __pyx_L3:; /* "src/pyscipopt/expr.pxi":206 * else: * raise NotImplementedError * return self # <<<<<<<<<<<<<< * * def __mul__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "src/pyscipopt/expr.pxi":192 * return Expr(terms) * * def __iadd__(self, other): # <<<<<<<<<<<<<< * if isinstance(other, Expr): * for v,c in other.terms.items(): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pyscipopt.scip.Expr.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":208 * return self * * def __mul__(self, other): # <<<<<<<<<<<<<< * if _is_number(other): * f = float(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_15__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_15__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_14__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_14__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { double __pyx_v_f; PyObject *__pyx_v_terms = NULL; PyObject *__pyx_v_v1 = NULL; PyObject *__pyx_v_c1 = NULL; PyObject *__pyx_v_v2 = NULL; PyObject *__pyx_v_c2 = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_8genexpr2__pyx_v_v = NULL; PyObject *__pyx_8genexpr2__pyx_v_c = NULL; PyObject *__pyx_8genexpr3__pyx_v_v = NULL; PyObject *__pyx_8genexpr3__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; double __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__mul__", 0); /* "src/pyscipopt/expr.pxi":209 * * def __mul__(self, other): * if _is_number(other): # <<<<<<<<<<<<<< * f = float(other) * return Expr({v:f*c for v,c in self.terms.items()}) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":210 * def __mul__(self, other): * if _is_number(other): * f = float(other) # <<<<<<<<<<<<<< * return Expr({v:f*c for v,c in self.terms.items()}) * elif _is_number(self): */ __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_other); if (unlikely(__pyx_t_5 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L1_error) __pyx_v_f = __pyx_t_5; /* "src/pyscipopt/expr.pxi":211 * if _is_number(other): * f = float(other) * return Expr({v:f*c for v,c in self.terms.items()}) # <<<<<<<<<<<<<< * elif _is_number(self): * f = float(self) */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 211, __pyx_L6_error) } __pyx_t_9 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_9; __pyx_t_9 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_7, &__pyx_t_6, &__pyx_t_9, &__pyx_t_3, NULL, __pyx_t_8); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_c, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyNumber_Multiply(__pyx_t_3, __pyx_8genexpr2__pyx_v_c); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr2__pyx_v_v, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_c); __pyx_8genexpr2__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0; goto __pyx_L9_exit_scope; __pyx_L6_error:; __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_c); __pyx_8genexpr2__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L9_exit_scope:; } /* exit inner scope */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":209 * * def __mul__(self, other): * if _is_number(other): # <<<<<<<<<<<<<< * f = float(other) * return Expr({v:f*c for v,c in self.terms.items()}) */ } /* "src/pyscipopt/expr.pxi":212 * f = float(other) * return Expr({v:f*c for v,c in self.terms.items()}) * elif _is_number(self): # <<<<<<<<<<<<<< * f = float(self) * return Expr({v:f*c for v,c in other.terms.items()}) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":213 * return Expr({v:f*c for v,c in self.terms.items()}) * elif _is_number(self): * f = float(self) # <<<<<<<<<<<<<< * return Expr({v:f*c for v,c in other.terms.items()}) * elif isinstance(other, Expr): */ __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_self); if (unlikely(__pyx_t_5 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_v_f = __pyx_t_5; /* "src/pyscipopt/expr.pxi":214 * elif _is_number(self): * f = float(self) * return Expr({v:f*c for v,c in other.terms.items()}) # <<<<<<<<<<<<<< * elif isinstance(other, Expr): * terms = {} */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_terms); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_t_9 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 214, __pyx_L12_error) } __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_9, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_7, &__pyx_t_3, &__pyx_t_9, NULL, __pyx_t_8); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_c, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyNumber_Multiply(__pyx_t_9, __pyx_8genexpr3__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr3__pyx_v_v, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 214, __pyx_L12_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_c); __pyx_8genexpr3__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_v); __pyx_8genexpr3__pyx_v_v = 0; goto __pyx_L15_exit_scope; __pyx_L12_error:; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_c); __pyx_8genexpr3__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_v); __pyx_8genexpr3__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L15_exit_scope:; } /* exit inner scope */ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":212 * f = float(other) * return Expr({v:f*c for v,c in self.terms.items()}) * elif _is_number(self): # <<<<<<<<<<<<<< * f = float(self) * return Expr({v:f*c for v,c in other.terms.items()}) */ } /* "src/pyscipopt/expr.pxi":215 * f = float(self) * return Expr({v:f*c for v,c in other.terms.items()}) * elif isinstance(other, Expr): # <<<<<<<<<<<<<< * terms = {} * for v1, c1 in self.terms.items(): */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_11 = (__pyx_t_4 != 0); if (__pyx_t_11) { /* "src/pyscipopt/expr.pxi":216 * return Expr({v:f*c for v,c in other.terms.items()}) * elif isinstance(other, Expr): * terms = {} # <<<<<<<<<<<<<< * for v1, c1 in self.terms.items(): * for v2, c2 in other.terms.items(): */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_terms = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":217 * elif isinstance(other, Expr): * terms = {} * for v1, c1 in self.terms.items(): # <<<<<<<<<<<<<< * for v2, c2 in other.terms.items(): * v = v1 + v2 */ __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_terms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 217, __pyx_L1_error) } __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_3, &__pyx_t_2, NULL, __pyx_t_8); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_v1, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_c1, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":218 * terms = {} * for v1, c1 in self.terms.items(): * for v2, c2 in other.terms.items(): # <<<<<<<<<<<<<< * v = v1 + v2 * terms[v] = terms.get(v, 0.0) + c1 * c2 */ __pyx_t_12 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 218, __pyx_L1_error) } __pyx_t_9 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_13), (&__pyx_t_10)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_9; __pyx_t_9 = 0; while (1) { __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_13, &__pyx_t_12, &__pyx_t_9, &__pyx_t_3, NULL, __pyx_t_10); if (unlikely(__pyx_t_14 == 0)) break; if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v2, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_c2, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":219 * for v1, c1 in self.terms.items(): * for v2, c2 in other.terms.items(): * v = v1 + v2 # <<<<<<<<<<<<<< * terms[v] = terms.get(v, 0.0) + c1 * c2 * return Expr(terms) */ __pyx_t_3 = PyNumber_Add(__pyx_v_v1, __pyx_v_v2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":220 * for v2, c2 in other.terms.items(): * v = v1 + v2 * terms[v] = terms.get(v, 0.0) + c1 * c2 # <<<<<<<<<<<<<< * return Expr(terms) * elif isinstance(other, GenExpr): */ __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_terms, __pyx_v_v, __pyx_float_0_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyNumber_Multiply(__pyx_v_c1, __pyx_v_c2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_15 = PyNumber_Add(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(PyDict_SetItem(__pyx_v_terms, __pyx_v_v, __pyx_t_15) < 0)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":221 * v = v1 + v2 * terms[v] = terms.get(v, 0.0) + c1 * c2 * return Expr(terms) # <<<<<<<<<<<<<< * elif isinstance(other, GenExpr): * return buildGenExprObj(self) * other */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_v_terms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":215 * f = float(self) * return Expr({v:f*c for v,c in other.terms.items()}) * elif isinstance(other, Expr): # <<<<<<<<<<<<<< * terms = {} * for v1, c1 in self.terms.items(): */ } /* "src/pyscipopt/expr.pxi":222 * terms[v] = terms.get(v, 0.0) + c1 * c2 * return Expr(terms) * elif isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return buildGenExprObj(self) * other * else: */ __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_9pyscipopt_4scip_GenExpr); __pyx_t_4 = (__pyx_t_11 != 0); if (likely(__pyx_t_4)) { /* "src/pyscipopt/expr.pxi":223 * return Expr(terms) * elif isinstance(other, GenExpr): * return buildGenExprObj(self) * other # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_15, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":222 * terms[v] = terms.get(v, 0.0) + c1 * c2 * return Expr(terms) * elif isinstance(other, GenExpr): # <<<<<<<<<<<<<< * return buildGenExprObj(self) * other * else: */ } /* "src/pyscipopt/expr.pxi":225 * return buildGenExprObj(self) * other * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * def __div__(self, other): */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 225, __pyx_L1_error) } /* "src/pyscipopt/expr.pxi":208 * return self * * def __mul__(self, other): # <<<<<<<<<<<<<< * if _is_number(other): * f = float(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pyscipopt.scip.Expr.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_terms); __Pyx_XDECREF(__pyx_v_v1); __Pyx_XDECREF(__pyx_v_c1); __Pyx_XDECREF(__pyx_v_v2); __Pyx_XDECREF(__pyx_v_c2); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_c); __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_v); __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":227 * raise NotImplementedError * * def __div__(self, other): # <<<<<<<<<<<<<< * ''' transforms Expr into GenExpr''' * if _is_number(other): */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_17__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Expr_16__div__[] = " transforms Expr into GenExpr"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_9pyscipopt_4scip_4Expr_16__div__; #endif static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_17__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__div__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_16__div__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_16__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { double __pyx_v_f; PyObject *__pyx_v_selfexpr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; double __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div__", 0); /* "src/pyscipopt/expr.pxi":229 * def __div__(self, other): * ''' transforms Expr into GenExpr''' * if _is_number(other): # <<<<<<<<<<<<<< * f = 1.0/float(other) * return f * self */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":230 * ''' transforms Expr into GenExpr''' * if _is_number(other): * f = 1.0/float(other) # <<<<<<<<<<<<<< * return f * self * selfexpr = buildGenExprObj(self) */ __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_other); if (unlikely(__pyx_t_5 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 230, __pyx_L1_error) if (unlikely(__pyx_t_5 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(0, 230, __pyx_L1_error) } __pyx_v_f = (1.0 / __pyx_t_5); /* "src/pyscipopt/expr.pxi":231 * if _is_number(other): * f = 1.0/float(other) * return f * self # <<<<<<<<<<<<<< * selfexpr = buildGenExprObj(self) * return selfexpr.__div__(other) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":229 * def __div__(self, other): * ''' transforms Expr into GenExpr''' * if _is_number(other): # <<<<<<<<<<<<<< * f = 1.0/float(other) * return f * self */ } /* "src/pyscipopt/expr.pxi":232 * f = 1.0/float(other) * return f * self * selfexpr = buildGenExprObj(self) # <<<<<<<<<<<<<< * return selfexpr.__div__(other) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_selfexpr = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":233 * return f * self * selfexpr = buildGenExprObj(self) * return selfexpr.__div__(other) # <<<<<<<<<<<<<< * * def __rdiv__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_selfexpr, __pyx_n_s_div); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":227 * raise NotImplementedError * * def __div__(self, other): # <<<<<<<<<<<<<< * ''' transforms Expr into GenExpr''' * if _is_number(other): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_selfexpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/ /* "src/pyscipopt/expr.pxi":235 * return selfexpr.__div__(other) * * def __rdiv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * if _is_number(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_19__rdiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Expr_18__rdiv__[] = " other / self "; static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_19__rdiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rdiv__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_18__rdiv__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_18__rdiv__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other) { double __pyx_v_f; PyObject *__pyx_v_otherexpr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; double __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rdiv__", 0); /* "src/pyscipopt/expr.pxi":237 * def __rdiv__(self, other): * ''' other / self ''' * if _is_number(self): # <<<<<<<<<<<<<< * f = 1.0/float(self) * return f * other */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":238 * ''' other / self ''' * if _is_number(self): * f = 1.0/float(self) # <<<<<<<<<<<<<< * return f * other * otherexpr = buildGenExprObj(other) */ __pyx_t_5 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L1_error) if (unlikely(__pyx_t_5 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(0, 238, __pyx_L1_error) } __pyx_v_f = (1.0 / __pyx_t_5); /* "src/pyscipopt/expr.pxi":239 * if _is_number(self): * f = 1.0/float(self) * return f * other # <<<<<<<<<<<<<< * otherexpr = buildGenExprObj(other) * return otherexpr.__div__(self) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":237 * def __rdiv__(self, other): * ''' other / self ''' * if _is_number(self): # <<<<<<<<<<<<<< * f = 1.0/float(self) * return f * other */ } /* "src/pyscipopt/expr.pxi":240 * f = 1.0/float(self) * return f * other * otherexpr = buildGenExprObj(other) # <<<<<<<<<<<<<< * return otherexpr.__div__(self) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_otherexpr = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":241 * return f * other * otherexpr = buildGenExprObj(other) * return otherexpr.__div__(self) # <<<<<<<<<<<<<< * * def __truediv__(self,other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_otherexpr, __pyx_n_s_div); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":235 * return selfexpr.__div__(other) * * def __rdiv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * if _is_number(self): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__rdiv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_otherexpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":243 * return otherexpr.__div__(self) * * def __truediv__(self,other): # <<<<<<<<<<<<<< * if _is_number(other): * f = 1.0/float(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_21__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_21__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_20__truediv__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_20__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { double __pyx_v_f; PyObject *__pyx_v_selfexpr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; double __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__truediv__", 0); /* "src/pyscipopt/expr.pxi":244 * * def __truediv__(self,other): * if _is_number(other): # <<<<<<<<<<<<<< * f = 1.0/float(other) * return f * self */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":245 * def __truediv__(self,other): * if _is_number(other): * f = 1.0/float(other) # <<<<<<<<<<<<<< * return f * self * selfexpr = buildGenExprObj(self) */ __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_other); if (unlikely(__pyx_t_5 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L1_error) if (unlikely(__pyx_t_5 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(0, 245, __pyx_L1_error) } __pyx_v_f = (1.0 / __pyx_t_5); /* "src/pyscipopt/expr.pxi":246 * if _is_number(other): * f = 1.0/float(other) * return f * self # <<<<<<<<<<<<<< * selfexpr = buildGenExprObj(self) * return selfexpr.__truediv__(other) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":244 * * def __truediv__(self,other): * if _is_number(other): # <<<<<<<<<<<<<< * f = 1.0/float(other) * return f * self */ } /* "src/pyscipopt/expr.pxi":247 * f = 1.0/float(other) * return f * self * selfexpr = buildGenExprObj(self) # <<<<<<<<<<<<<< * return selfexpr.__truediv__(other) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_selfexpr = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":248 * return f * self * selfexpr = buildGenExprObj(self) * return selfexpr.__truediv__(other) # <<<<<<<<<<<<<< * * def __rtruediv__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_selfexpr, __pyx_n_s_truediv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":243 * return otherexpr.__div__(self) * * def __truediv__(self,other): # <<<<<<<<<<<<<< * if _is_number(other): * f = 1.0/float(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_selfexpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":250 * return selfexpr.__truediv__(other) * * def __rtruediv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * if _is_number(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_23__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Expr_22__rtruediv__[] = " other / self "; static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_23__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rtruediv__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_22__rtruediv__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_22__rtruediv__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other) { double __pyx_v_f; PyObject *__pyx_v_otherexpr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; double __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rtruediv__", 0); /* "src/pyscipopt/expr.pxi":252 * def __rtruediv__(self, other): * ''' other / self ''' * if _is_number(self): # <<<<<<<<<<<<<< * f = 1.0/float(self) * return f * other */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":253 * ''' other / self ''' * if _is_number(self): * f = 1.0/float(self) # <<<<<<<<<<<<<< * return f * other * otherexpr = buildGenExprObj(other) */ __pyx_t_5 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 253, __pyx_L1_error) if (unlikely(__pyx_t_5 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(0, 253, __pyx_L1_error) } __pyx_v_f = (1.0 / __pyx_t_5); /* "src/pyscipopt/expr.pxi":254 * if _is_number(self): * f = 1.0/float(self) * return f * other # <<<<<<<<<<<<<< * otherexpr = buildGenExprObj(other) * return otherexpr.__truediv__(self) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":252 * def __rtruediv__(self, other): * ''' other / self ''' * if _is_number(self): # <<<<<<<<<<<<<< * f = 1.0/float(self) * return f * other */ } /* "src/pyscipopt/expr.pxi":255 * f = 1.0/float(self) * return f * other * otherexpr = buildGenExprObj(other) # <<<<<<<<<<<<<< * return otherexpr.__truediv__(self) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_otherexpr = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":256 * return f * other * otherexpr = buildGenExprObj(other) * return otherexpr.__truediv__(self) # <<<<<<<<<<<<<< * * def __pow__(self, other, modulo): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_otherexpr, __pyx_n_s_truediv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":250 * return selfexpr.__truediv__(other) * * def __rtruediv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * if _is_number(self): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_otherexpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":258 * return otherexpr.__truediv__(self) * * def __pow__(self, other, modulo): # <<<<<<<<<<<<<< * if float(other).is_integer() and other >= 0: * exp = int(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_25__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_25__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_24__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_24__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, CYTHON_UNUSED PyObject *__pyx_v_modulo) { PyObject *__pyx_v_exp = NULL; PyObject *__pyx_v_res = NULL; CYTHON_UNUSED PyObject *__pyx_v__ = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pow__", 0); /* "src/pyscipopt/expr.pxi":259 * * def __pow__(self, other, modulo): * if float(other).is_integer() and other >= 0: # <<<<<<<<<<<<<< * exp = int(other) * else: # need to transform to GenExpr */ __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_v_other, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "src/pyscipopt/expr.pxi":260 * def __pow__(self, other, modulo): * if float(other).is_integer() and other >= 0: * exp = int(other) # <<<<<<<<<<<<<< * else: # need to transform to GenExpr * return buildGenExprObj(self)**other */ __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exp = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":259 * * def __pow__(self, other, modulo): * if float(other).is_integer() and other >= 0: # <<<<<<<<<<<<<< * exp = int(other) * else: # need to transform to GenExpr */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":262 * exp = int(other) * else: # need to transform to GenExpr * return buildGenExprObj(self)**other # <<<<<<<<<<<<<< * * res = 1 */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Power(__pyx_t_2, __pyx_v_other, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L3:; /* "src/pyscipopt/expr.pxi":264 * return buildGenExprObj(self)**other * * res = 1 # <<<<<<<<<<<<<< * for _ in range(exp): * res *= self */ __Pyx_INCREF(__pyx_int_1); __pyx_v_res = __pyx_int_1; /* "src/pyscipopt/expr.pxi":265 * * res = 1 * for _ in range(exp): # <<<<<<<<<<<<<< * res *= self * return res */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_exp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 265, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":266 * res = 1 * for _ in range(exp): * res *= self # <<<<<<<<<<<<<< * return res * */ __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_res, __pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":265 * * res = 1 * for _ in range(exp): # <<<<<<<<<<<<<< * res *= self * return res */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":267 * for _ in range(exp): * res *= self * return res # <<<<<<<<<<<<<< * * def __neg__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":258 * return otherexpr.__truediv__(self) * * def __pow__(self, other, modulo): # <<<<<<<<<<<<<< * if float(other).is_integer() and other >= 0: * exp = int(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Expr.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exp); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF(__pyx_v__); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":269 * return res * * def __neg__(self): # <<<<<<<<<<<<<< * return Expr({v:-c for v,c in self.terms.items()}) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_27__neg__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_27__neg__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_26__neg__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_26__neg__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_8genexpr4__pyx_v_v = NULL; PyObject *__pyx_8genexpr4__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__neg__", 0); /* "src/pyscipopt/expr.pxi":270 * * def __neg__(self): * return Expr({v:-c for v,c in self.terms.items()}) # <<<<<<<<<<<<<< * * def __sub__(self, other): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; if (unlikely(__pyx_v_self->terms == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 270, __pyx_L5_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->terms, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 270, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_c, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Negative(__pyx_8genexpr4__pyx_v_c); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 270, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr4__pyx_v_v, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 270, __pyx_L5_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_c); __pyx_8genexpr4__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __pyx_8genexpr4__pyx_v_v = 0; goto __pyx_L8_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_c); __pyx_8genexpr4__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __pyx_8genexpr4__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":269 * return res * * def __neg__(self): # <<<<<<<<<<<<<< * return Expr({v:-c for v,c in self.terms.items()}) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Expr.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":272 * return Expr({v:-c for v,c in self.terms.items()}) * * def __sub__(self, other): # <<<<<<<<<<<<<< * return self + (-other) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_29__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_29__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_28__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_28__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); /* "src/pyscipopt/expr.pxi":273 * * def __sub__(self, other): * return self + (-other) # <<<<<<<<<<<<<< * * def __radd__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":272 * return Expr({v:-c for v,c in self.terms.items()}) * * def __sub__(self, other): # <<<<<<<<<<<<<< * return self + (-other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Expr.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":275 * return self + (-other) * * def __radd__(self, other): # <<<<<<<<<<<<<< * return self.__add__(other) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_31__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_31__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_30__radd__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_30__radd__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__radd__", 0); /* "src/pyscipopt/expr.pxi":276 * * def __radd__(self, other): * return self.__add__(other) # <<<<<<<<<<<<<< * * def __rmul__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":275 * return self + (-other) * * def __radd__(self, other): # <<<<<<<<<<<<<< * return self.__add__(other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":278 * return self.__add__(other) * * def __rmul__(self, other): # <<<<<<<<<<<<<< * return self.__mul__(other) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_33__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_33__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_32__rmul__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_32__rmul__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rmul__", 0); /* "src/pyscipopt/expr.pxi":279 * * def __rmul__(self, other): * return self.__mul__(other) # <<<<<<<<<<<<<< * * def __rsub__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":278 * return self.__add__(other) * * def __rmul__(self, other): # <<<<<<<<<<<<<< * return self.__mul__(other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Expr.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":281 * return self.__mul__(other) * * def __rsub__(self, other): # <<<<<<<<<<<<<< * return -1.0 * self + other * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_35__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_35__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_34__rsub__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_34__rsub__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rsub__", 0); /* "src/pyscipopt/expr.pxi":282 * * def __rsub__(self, other): * return -1.0 * self + other # <<<<<<<<<<<<<< * * def __richcmp__(self, other, op): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Multiply(__pyx_float_neg_1_0, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":281 * return self.__mul__(other) * * def __rsub__(self, other): # <<<<<<<<<<<<<< * return -1.0 * self + other * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Expr.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":284 * return -1.0 * self + other * * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< * '''turn it into a constraint''' * return _expr_richcmp(self, other, op) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_37__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_37__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) { PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) __PYX_ERR(0, 284, __pyx_L3_error) __Pyx_GOTREF(__pyx_v_op); goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Expr.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_36__richcmp__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_op)); /* function exit code */ __Pyx_XDECREF(__pyx_v_op); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_36__richcmp__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "src/pyscipopt/expr.pxi":286 * def __richcmp__(self, other, op): * '''turn it into a constraint''' * return _expr_richcmp(self, other, op) # <<<<<<<<<<<<<< * * def normalize(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_expr_richcmp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_other); __Pyx_INCREF(__pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_op); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":284 * return -1.0 * self + other * * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< * '''turn it into a constraint''' * return _expr_richcmp(self, other, op) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Expr.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":288 * return _expr_richcmp(self, other, op) * * def normalize(self): # <<<<<<<<<<<<<< * '''remove terms with coefficient of 0''' * self.terms = {t:c for (t,c) in self.terms.items() if c != 0.0} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_39normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Expr_38normalize[] = "remove terms with coefficient of 0"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_39normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("normalize (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_38normalize(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_38normalize(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_8genexpr5__pyx_v_t = NULL; PyObject *__pyx_8genexpr5__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normalize", 0); /* "src/pyscipopt/expr.pxi":290 * def normalize(self): * '''remove terms with coefficient of 0''' * self.terms = {t:c for (t,c) in self.terms.items() if c != 0.0} # <<<<<<<<<<<<<< * * def __repr__(self): */ { /* enter inner scope */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; if (unlikely(__pyx_v_self->terms == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 290, __pyx_L5_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->terms, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 290, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_t, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_c, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyFloat_NeObjC(__pyx_8genexpr5__pyx_v_c, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 290, __pyx_L5_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_t, (PyObject*)__pyx_8genexpr5__pyx_v_c))) __PYX_ERR(0, 290, __pyx_L5_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_c); __pyx_8genexpr5__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_t); __pyx_8genexpr5__pyx_v_t = 0; goto __pyx_L9_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_c); __pyx_8genexpr5__pyx_v_c = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_t); __pyx_8genexpr5__pyx_v_t = 0; goto __pyx_L1_error; __pyx_L9_exit_scope:; } /* exit inner scope */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->terms); __Pyx_DECREF(__pyx_v_self->terms); __pyx_v_self->terms = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":288 * return _expr_richcmp(self, other, op) * * def normalize(self): # <<<<<<<<<<<<<< * '''remove terms with coefficient of 0''' * self.terms = {t:c for (t,c) in self.terms.items() if c != 0.0} */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Expr.normalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_t); __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":292 * self.terms = {t:c for (t,c) in self.terms.items() if c != 0.0} * * def __repr__(self): # <<<<<<<<<<<<<< * return 'Expr(%s)' % repr(self.terms) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_41__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_41__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_40__repr__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_40__repr__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":293 * * def __repr__(self): * return 'Expr(%s)' % repr(self.terms) # <<<<<<<<<<<<<< * * def degree(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->terms; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expr_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":292 * self.terms = {t:c for (t,c) in self.terms.items() if c != 0.0} * * def __repr__(self): # <<<<<<<<<<<<<< * return 'Expr(%s)' % repr(self.terms) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Expr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":295 * return 'Expr(%s)' % repr(self.terms) * * def degree(self): # <<<<<<<<<<<<<< * '''computes highest degree of terms''' * if len(self.terms) == 0: */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_43degree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Expr_42degree[] = "computes highest degree of terms"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_43degree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("degree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_42degree(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_4Expr_6degree_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/pyscipopt/expr.pxi":300 * return 0 * else: * return max(len(v) for v in self.terms) # <<<<<<<<<<<<<< * * */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_6degree_genexpr(PyObject *__pyx_self) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_3_genexpr(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 300, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pyscipopt_4scip_4Expr_6degree_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_degree_locals_genexpr, __pyx_n_s_pyscipopt_scip); if (unlikely(!gen)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pyscipopt.scip.Expr.degree.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_4Expr_6degree_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 300, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 300, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->terms)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->terms)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->terms; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->terms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 300, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 300, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 300, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_v); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 300, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 300, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":295 * return 'Expr(%s)' % repr(self.terms) * * def degree(self): # <<<<<<<<<<<<<< * '''computes highest degree of terms''' * if len(self.terms) == 0: */ static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_42degree(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *__pyx_cur_scope; PyObject *__pyx_gb_9pyscipopt_4scip_4Expr_6degree_2generator1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("degree", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_2_degree(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_2_degree, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 295, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); /* "src/pyscipopt/expr.pxi":297 * def degree(self): * '''computes highest degree of terms''' * if len(self.terms) == 0: # <<<<<<<<<<<<<< * return 0 * else: */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->terms; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":298 * '''computes highest degree of terms''' * if len(self.terms) == 0: * return 0 # <<<<<<<<<<<<<< * else: * return max(len(v) for v in self.terms) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":297 * def degree(self): * '''computes highest degree of terms''' * if len(self.terms) == 0: # <<<<<<<<<<<<<< * return 0 * else: */ } /* "src/pyscipopt/expr.pxi":300 * return 0 * else: * return max(len(v) for v in self.terms) # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_pf_9pyscipopt_4scip_4Expr_6degree_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "src/pyscipopt/expr.pxi":295 * return 'Expr(%s)' % repr(self.terms) * * def degree(self): # <<<<<<<<<<<<<< * '''computes highest degree of terms''' * if len(self.terms) == 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Expr.degree", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_gb_9pyscipopt_4scip_4Expr_6degree_2generator1); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":144 * #See also the @ref ExprDetails "description" in the expr.pxi. * cdef class Expr: * cdef public terms # <<<<<<<<<<<<<< * * def __init__(self, terms=None): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_5terms_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_5terms_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_5terms___get__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_5terms___get__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->terms); __pyx_r = __pyx_v_self->terms; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Expr_5terms_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Expr_5terms_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_5terms_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Expr_5terms_2__set__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->terms); __Pyx_DECREF(__pyx_v_self->terms); __pyx_v_self->terms = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Expr_5terms_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Expr_5terms_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_5terms_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Expr_5terms_4__del__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->terms); __Pyx_DECREF(__pyx_v_self->terms); __pyx_v_self->terms = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_44__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_44__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.terms,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->terms); __Pyx_GIVEREF(__pyx_v_self->terms); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->terms); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.terms,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.terms,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.terms is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.terms,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.terms is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, None), state */ /*else*/ { __pyx_t_3 = (__pyx_v_self->terms != Py_None); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.terms is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.terms is not None * if use_setstate: * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Expr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_116691903); __Pyx_GIVEREF(__pyx_int_116691903); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116691903); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.terms is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, None), state * else: * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Expr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Expr); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_116691903); __Pyx_GIVEREF(__pyx_int_116691903); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116691903); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Expr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Expr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Expr_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Expr_46__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Expr_46__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Expr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Expr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Expr, (type(self), 0x6f493bf, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Expr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Expr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":309 * cdef public _rhs * * def __init__(self, expr, lhs=None, rhs=None): # <<<<<<<<<<<<<< * self.expr = expr * self._lhs = lhs */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_expr = 0; PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_rhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_lhs,&__pyx_n_s_rhs,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 309, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_expr = values[0]; __pyx_v_lhs = values[1]; __pyx_v_rhs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 309, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons___init__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self), __pyx_v_expr, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons___init__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":310 * * def __init__(self, expr, lhs=None, rhs=None): * self.expr = expr # <<<<<<<<<<<<<< * self._lhs = lhs * self._rhs = rhs */ __Pyx_INCREF(__pyx_v_expr); __Pyx_GIVEREF(__pyx_v_expr); __Pyx_GOTREF(__pyx_v_self->expr); __Pyx_DECREF(__pyx_v_self->expr); __pyx_v_self->expr = __pyx_v_expr; /* "src/pyscipopt/expr.pxi":311 * def __init__(self, expr, lhs=None, rhs=None): * self.expr = expr * self._lhs = lhs # <<<<<<<<<<<<<< * self._rhs = rhs * assert not (lhs is None and rhs is None) */ __Pyx_INCREF(__pyx_v_lhs); __Pyx_GIVEREF(__pyx_v_lhs); __Pyx_GOTREF(__pyx_v_self->_lhs); __Pyx_DECREF(__pyx_v_self->_lhs); __pyx_v_self->_lhs = __pyx_v_lhs; /* "src/pyscipopt/expr.pxi":312 * self.expr = expr * self._lhs = lhs * self._rhs = rhs # <<<<<<<<<<<<<< * assert not (lhs is None and rhs is None) * self.normalize() */ __Pyx_INCREF(__pyx_v_rhs); __Pyx_GIVEREF(__pyx_v_rhs); __Pyx_GOTREF(__pyx_v_self->_rhs); __Pyx_DECREF(__pyx_v_self->_rhs); __pyx_v_self->_rhs = __pyx_v_rhs; /* "src/pyscipopt/expr.pxi":313 * self._lhs = lhs * self._rhs = rhs * assert not (lhs is None and rhs is None) # <<<<<<<<<<<<<< * self.normalize() * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (__pyx_v_lhs == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = (__pyx_v_rhs == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; if (unlikely(!((!__pyx_t_1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 313, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":314 * self._rhs = rhs * assert not (lhs is None and rhs is None) * self.normalize() # <<<<<<<<<<<<<< * * def normalize(self): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_normalize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":309 * cdef public _rhs * * def __init__(self, expr, lhs=None, rhs=None): # <<<<<<<<<<<<<< * self.expr = expr * self._lhs = lhs */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":316 * self.normalize() * * def normalize(self): # <<<<<<<<<<<<<< * '''move constant terms in expression to bounds''' * if isinstance(self.expr, Expr): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_3normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8ExprCons_2normalize[] = "move constant terms in expression to bounds"; static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_3normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("normalize (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_2normalize(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_2normalize(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normalize", 0); /* "src/pyscipopt/expr.pxi":318 * def normalize(self): * '''move constant terms in expression to bounds''' * if isinstance(self.expr, Expr): # <<<<<<<<<<<<<< * c = self.expr[CONST] * self.expr -= c */ __pyx_t_1 = __pyx_v_self->expr; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __Pyx_TypeCheck(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Expr); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":319 * '''move constant terms in expression to bounds''' * if isinstance(self.expr, Expr): * c = self.expr[CONST] # <<<<<<<<<<<<<< * self.expr -= c * assert self.expr[CONST] == 0.0 */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONST); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->expr, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c = __pyx_t_4; __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":320 * if isinstance(self.expr, Expr): * c = self.expr[CONST] * self.expr -= c # <<<<<<<<<<<<<< * assert self.expr[CONST] == 0.0 * self.expr.normalize() */ __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_self->expr, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->expr); __Pyx_DECREF(__pyx_v_self->expr); __pyx_v_self->expr = __pyx_t_4; __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":321 * c = self.expr[CONST] * self.expr -= c * assert self.expr[CONST] == 0.0 # <<<<<<<<<<<<<< * self.expr.normalize() * else: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CONST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->expr, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyFloat_EqObjC(__pyx_t_1, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 321, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":322 * self.expr -= c * assert self.expr[CONST] == 0.0 * self.expr.normalize() # <<<<<<<<<<<<<< * else: * assert isinstance(self.expr, GenExpr) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->expr, __pyx_n_s_normalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":318 * def normalize(self): * '''move constant terms in expression to bounds''' * if isinstance(self.expr, Expr): # <<<<<<<<<<<<<< * c = self.expr[CONST] * self.expr -= c */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":324 * self.expr.normalize() * else: * assert isinstance(self.expr, GenExpr) # <<<<<<<<<<<<<< * return * */ /*else*/ { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = __pyx_v_self->expr; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_4, __pyx_ptype_9pyscipopt_4scip_GenExpr); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!(__pyx_t_3 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 324, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":325 * else: * assert isinstance(self.expr, GenExpr) * return # <<<<<<<<<<<<<< * * if not self._lhs is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } __pyx_L3:; /* "src/pyscipopt/expr.pxi":327 * return * * if not self._lhs is None: # <<<<<<<<<<<<<< * self._lhs -= c * if not self._rhs is None: */ __pyx_t_3 = (__pyx_v_self->_lhs != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":328 * * if not self._lhs is None: * self._lhs -= c # <<<<<<<<<<<<<< * if not self._rhs is None: * self._rhs -= c */ __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_self->_lhs, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_lhs); __Pyx_DECREF(__pyx_v_self->_lhs); __pyx_v_self->_lhs = __pyx_t_4; __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":327 * return * * if not self._lhs is None: # <<<<<<<<<<<<<< * self._lhs -= c * if not self._rhs is None: */ } /* "src/pyscipopt/expr.pxi":329 * if not self._lhs is None: * self._lhs -= c * if not self._rhs is None: # <<<<<<<<<<<<<< * self._rhs -= c * */ __pyx_t_2 = (__pyx_v_self->_rhs != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":330 * self._lhs -= c * if not self._rhs is None: * self._rhs -= c # <<<<<<<<<<<<<< * * */ __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_self->_rhs, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_rhs); __Pyx_DECREF(__pyx_v_self->_rhs); __pyx_v_self->_rhs = __pyx_t_4; __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":329 * if not self._lhs is None: * self._lhs -= c * if not self._rhs is None: # <<<<<<<<<<<<<< * self._rhs -= c * */ } /* "src/pyscipopt/expr.pxi":316 * self.normalize() * * def normalize(self): # <<<<<<<<<<<<<< * '''move constant terms in expression to bounds''' * if isinstance(self.expr, Expr): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.normalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":333 * * * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< * '''turn it into a constraint''' * if op == 1: # <= */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) { PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) __PYX_ERR(0, 333, __pyx_L3_error) __Pyx_GOTREF(__pyx_v_op); goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4__richcmp__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_op)); /* function exit code */ __Pyx_XDECREF(__pyx_v_op); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4__richcmp__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "src/pyscipopt/expr.pxi":335 * def __richcmp__(self, other, op): * '''turn it into a constraint''' * if op == 1: # <= # <<<<<<<<<<<<<< * if not self._rhs is None: * raise TypeError('ExprCons already has upper bound') */ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "src/pyscipopt/expr.pxi":336 * '''turn it into a constraint''' * if op == 1: # <= * if not self._rhs is None: # <<<<<<<<<<<<<< * raise TypeError('ExprCons already has upper bound') * assert self._rhs is None */ __pyx_t_2 = (__pyx_v_self->_rhs != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { /* "src/pyscipopt/expr.pxi":337 * if op == 1: # <= * if not self._rhs is None: * raise TypeError('ExprCons already has upper bound') # <<<<<<<<<<<<<< * assert self._rhs is None * assert not self._lhs is None */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 337, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":336 * '''turn it into a constraint''' * if op == 1: # <= * if not self._rhs is None: # <<<<<<<<<<<<<< * raise TypeError('ExprCons already has upper bound') * assert self._rhs is None */ } /* "src/pyscipopt/expr.pxi":338 * if not self._rhs is None: * raise TypeError('ExprCons already has upper bound') * assert self._rhs is None # <<<<<<<<<<<<<< * assert not self._lhs is None * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = (__pyx_v_self->_rhs == Py_None); if (unlikely(!(__pyx_t_3 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 338, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":339 * raise TypeError('ExprCons already has upper bound') * assert self._rhs is None * assert not self._lhs is None # <<<<<<<<<<<<<< * * if not _is_number(other): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = (__pyx_v_self->_lhs != Py_None); if (unlikely(!(__pyx_t_3 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 339, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":341 * assert not self._lhs is None * * if not _is_number(other): # <<<<<<<<<<<<<< * raise TypeError('Ranged ExprCons is not well defined!') * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_other); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":342 * * if not _is_number(other): * raise TypeError('Ranged ExprCons is not well defined!') # <<<<<<<<<<<<<< * * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 342, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":341 * assert not self._lhs is None * * if not _is_number(other): # <<<<<<<<<<<<<< * raise TypeError('Ranged ExprCons is not well defined!') * */ } /* "src/pyscipopt/expr.pxi":344 * raise TypeError('Ranged ExprCons is not well defined!') * * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) # <<<<<<<<<<<<<< * elif op == 5: # >= * if not self._lhs is None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->expr); __Pyx_GIVEREF(__pyx_v_self->expr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->expr); __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_lhs, __pyx_v_self->_lhs) < 0) __PYX_ERR(0, 344, __pyx_L1_error) __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_rhs, __pyx_t_5) < 0) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ExprCons), __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":335 * def __richcmp__(self, other, op): * '''turn it into a constraint''' * if op == 1: # <= # <<<<<<<<<<<<<< * if not self._rhs is None: * raise TypeError('ExprCons already has upper bound') */ } /* "src/pyscipopt/expr.pxi":345 * * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) * elif op == 5: # >= # <<<<<<<<<<<<<< * if not self._lhs is None: * raise TypeError('ExprCons already has lower bound') */ __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":346 * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) * elif op == 5: # >= * if not self._lhs is None: # <<<<<<<<<<<<<< * raise TypeError('ExprCons already has lower bound') * assert self._lhs is None */ __pyx_t_2 = (__pyx_v_self->_lhs != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { /* "src/pyscipopt/expr.pxi":347 * elif op == 5: # >= * if not self._lhs is None: * raise TypeError('ExprCons already has lower bound') # <<<<<<<<<<<<<< * assert self._lhs is None * assert not self._rhs is None */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 347, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":346 * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) * elif op == 5: # >= * if not self._lhs is None: # <<<<<<<<<<<<<< * raise TypeError('ExprCons already has lower bound') * assert self._lhs is None */ } /* "src/pyscipopt/expr.pxi":348 * if not self._lhs is None: * raise TypeError('ExprCons already has lower bound') * assert self._lhs is None # <<<<<<<<<<<<<< * assert not self._rhs is None * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = (__pyx_v_self->_lhs == Py_None); if (unlikely(!(__pyx_t_3 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 348, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":349 * raise TypeError('ExprCons already has lower bound') * assert self._lhs is None * assert not self._rhs is None # <<<<<<<<<<<<<< * * if not _is_number(other): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = (__pyx_v_self->_rhs != Py_None); if (unlikely(!(__pyx_t_3 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 349, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":351 * assert not self._rhs is None * * if not _is_number(other): # <<<<<<<<<<<<<< * raise TypeError('Ranged ExprCons is not well defined!') * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_other); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_2)) { /* "src/pyscipopt/expr.pxi":352 * * if not _is_number(other): * raise TypeError('Ranged ExprCons is not well defined!') # <<<<<<<<<<<<<< * * return ExprCons(self.expr, lhs=float(other), rhs=self._rhs) */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 352, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":351 * assert not self._rhs is None * * if not _is_number(other): # <<<<<<<<<<<<<< * raise TypeError('Ranged ExprCons is not well defined!') * */ } /* "src/pyscipopt/expr.pxi":354 * raise TypeError('Ranged ExprCons is not well defined!') * * return ExprCons(self.expr, lhs=float(other), rhs=self._rhs) # <<<<<<<<<<<<<< * else: * raise TypeError */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->expr); __Pyx_GIVEREF(__pyx_v_self->expr); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->expr); __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_lhs, __pyx_t_1) < 0) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_rhs, __pyx_v_self->_rhs) < 0) __PYX_ERR(0, 354, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ExprCons), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":345 * * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) * elif op == 5: # >= # <<<<<<<<<<<<<< * if not self._lhs is None: * raise TypeError('ExprCons already has lower bound') */ } /* "src/pyscipopt/expr.pxi":356 * return ExprCons(self.expr, lhs=float(other), rhs=self._rhs) * else: * raise TypeError # <<<<<<<<<<<<<< * * def __repr__(self): */ /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(0, 356, __pyx_L1_error) } /* "src/pyscipopt/expr.pxi":333 * * * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< * '''turn it into a constraint''' * if op == 1: # <= */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":358 * raise TypeError * * def __repr__(self): # <<<<<<<<<<<<<< * return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_7__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_7__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_6__repr__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_6__repr__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":359 * * def __repr__(self): * return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs) # <<<<<<<<<<<<<< * * def __nonzero__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u_ExprCons); __pyx_t_2 += 9; __Pyx_GIVEREF(__pyx_kp_u_ExprCons); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ExprCons); __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->expr), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_); __pyx_t_2 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_); __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->_lhs), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_); __pyx_t_2 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_); __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->_rhs), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__5); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__5); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__5); __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":358 * raise TypeError * * def __repr__(self): # <<<<<<<<<<<<<< * return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":361 * return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs) * * def __nonzero__(self): # <<<<<<<<<<<<<< * '''Make sure that equality of expressions is not asserted with ==''' * */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_9__nonzero__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_9__nonzero__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_8__nonzero__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_8__nonzero__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_v_msg = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__nonzero__", 0); /* "src/pyscipopt/expr.pxi":364 * '''Make sure that equality of expressions is not asserted with ==''' * * msg = """Can't evaluate constraints as booleans. # <<<<<<<<<<<<<< * * If you want to add a ranged constraint of the form */ __Pyx_INCREF(__pyx_kp_u_Can_t_evaluate_constraints_as_bo); __pyx_v_msg = __pyx_kp_u_Can_t_evaluate_constraints_as_bo; /* "src/pyscipopt/expr.pxi":371 * lhs <= (expression <= rhs) * """ * raise TypeError(msg) # <<<<<<<<<<<<<< * * def quicksum(termlist): */ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_v_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 371, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":361 * return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs) * * def __nonzero__(self): # <<<<<<<<<<<<<< * '''Make sure that equality of expressions is not asserted with ==''' * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_XDECREF(__pyx_v_msg); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":305 * cdef class ExprCons: * '''Constraints with a polynomial expressions and lower/upper bounds.''' * cdef public expr # <<<<<<<<<<<<<< * cdef public _lhs * cdef public _rhs */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr___get__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4expr___get__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->expr); __pyx_r = __pyx_v_self->expr; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr_2__set__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr_2__set__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->expr); __Pyx_DECREF(__pyx_v_self->expr); __pyx_v_self->expr = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr_4__del__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4expr_4__del__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->expr); __Pyx_DECREF(__pyx_v_self->expr); __pyx_v_self->expr = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":306 * '''Constraints with a polynomial expressions and lower/upper bounds.''' * cdef public expr * cdef public _lhs # <<<<<<<<<<<<<< * cdef public _rhs * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs___get__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs___get__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_lhs); __pyx_r = __pyx_v_self->_lhs; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs_2__set__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs_2__set__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->_lhs); __Pyx_DECREF(__pyx_v_self->_lhs); __pyx_v_self->_lhs = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs_4__del__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_lhs_4__del__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_lhs); __Pyx_DECREF(__pyx_v_self->_lhs); __pyx_v_self->_lhs = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":307 * cdef public expr * cdef public _lhs * cdef public _rhs # <<<<<<<<<<<<<< * * def __init__(self, expr, lhs=None, rhs=None): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs___get__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs___get__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_rhs); __pyx_r = __pyx_v_self->_rhs; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs_2__set__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs_2__set__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->_rhs); __Pyx_DECREF(__pyx_v_self->_rhs); __pyx_v_self->_rhs = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs_4__del__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ExprCons_4_rhs_4__del__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_rhs); __Pyx_DECREF(__pyx_v_self->_rhs); __pyx_v_self->_rhs = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_10__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_10__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._lhs, self._rhs, self.expr) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->_lhs); __Pyx_GIVEREF(__pyx_v_self->_lhs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_lhs); __Pyx_INCREF(__pyx_v_self->_rhs); __Pyx_GIVEREF(__pyx_v_self->_rhs); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_rhs); __Pyx_INCREF(__pyx_v_self->expr); __Pyx_GIVEREF(__pyx_v_self->expr); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->expr); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._lhs, self._rhs, self.expr) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._lhs, self._rhs, self.expr) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._lhs is not None or self._rhs is not None or self.expr is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._lhs, self._rhs, self.expr) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._lhs is not None or self._rhs is not None or self.expr is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->_lhs != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->_rhs != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->expr != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._lhs is not None or self._rhs is not None or self.expr is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._lhs is not None or self._rhs is not None or self.expr is not None * if use_setstate: * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ExprCons); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_150239579); __Pyx_GIVEREF(__pyx_int_150239579); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_150239579); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._lhs is not None or self._rhs is not None or self.expr is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, None), state * else: * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ExprCons__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ExprCons); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_150239579); __Pyx_GIVEREF(__pyx_int_150239579); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_150239579); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ExprCons__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ExprCons_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ExprCons_12__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ExprCons_12__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ExprCons__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_ExprCons__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_ExprCons, (type(self), 0x8f4795b, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ExprCons__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.ExprCons.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":373 * raise TypeError(msg) * * def quicksum(termlist): # <<<<<<<<<<<<<< * '''add linear expressions and constants much faster than Python's sum * by avoiding intermediate data structures and adding terms inplace */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7quicksum(PyObject *__pyx_self, PyObject *__pyx_v_termlist); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6quicksum[] = "add linear expressions and constants much faster than Python's sum\n by avoiding intermediate data structures and adding terms inplace\n "; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_7quicksum = {"quicksum", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7quicksum, METH_O, __pyx_doc_9pyscipopt_4scip_6quicksum}; static PyObject *__pyx_pw_9pyscipopt_4scip_7quicksum(PyObject *__pyx_self, PyObject *__pyx_v_termlist) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quicksum (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6quicksum(__pyx_self, ((PyObject *)__pyx_v_termlist)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6quicksum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_termlist) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_term = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("quicksum", 0); /* "src/pyscipopt/expr.pxi":377 * by avoiding intermediate data structures and adding terms inplace * ''' * result = Expr() # <<<<<<<<<<<<<< * for term in termlist: * result += term */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":378 * ''' * result = Expr() * for term in termlist: # <<<<<<<<<<<<<< * result += term * return result */ if (likely(PyList_CheckExact(__pyx_v_termlist)) || PyTuple_CheckExact(__pyx_v_termlist)) { __pyx_t_1 = __pyx_v_termlist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_termlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 378, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 378, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 378, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":379 * result = Expr() * for term in termlist: * result += term # <<<<<<<<<<<<<< * return result * */ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_v_term); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":378 * ''' * result = Expr() * for term in termlist: # <<<<<<<<<<<<<< * result += term * return result */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":380 * for term in termlist: * result += term * return result # <<<<<<<<<<<<<< * * def quickprod(termlist): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":373 * raise TypeError(msg) * * def quicksum(termlist): # <<<<<<<<<<<<<< * '''add linear expressions and constants much faster than Python's sum * by avoiding intermediate data structures and adding terms inplace */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.quicksum", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_term); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":382 * return result * * def quickprod(termlist): # <<<<<<<<<<<<<< * '''multiply linear expressions and constants by avoiding intermediate * data structures and multiplying terms inplace */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9quickprod(PyObject *__pyx_self, PyObject *__pyx_v_termlist); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8quickprod[] = "multiply linear expressions and constants by avoiding intermediate \n data structures and multiplying terms inplace\n "; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_9quickprod = {"quickprod", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9quickprod, METH_O, __pyx_doc_9pyscipopt_4scip_8quickprod}; static PyObject *__pyx_pw_9pyscipopt_4scip_9quickprod(PyObject *__pyx_self, PyObject *__pyx_v_termlist) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quickprod (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8quickprod(__pyx_self, ((PyObject *)__pyx_v_termlist)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8quickprod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_termlist) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_term = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("quickprod", 0); /* "src/pyscipopt/expr.pxi":386 * data structures and multiplying terms inplace * ''' * result = Expr() + 1 # <<<<<<<<<<<<<< * for term in termlist: * result *= term */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":387 * ''' * result = Expr() + 1 * for term in termlist: # <<<<<<<<<<<<<< * result *= term * return result */ if (likely(PyList_CheckExact(__pyx_v_termlist)) || PyTuple_CheckExact(__pyx_v_termlist)) { __pyx_t_2 = __pyx_v_termlist; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_termlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 387, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 387, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 387, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":388 * result = Expr() + 1 * for term in termlist: * result *= term # <<<<<<<<<<<<<< * return result * */ __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":387 * ''' * result = Expr() + 1 * for term in termlist: # <<<<<<<<<<<<<< * result *= term * return result */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":389 * for term in termlist: * result *= term * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":382 * return result * * def quickprod(termlist): # <<<<<<<<<<<<<< * '''multiply linear expressions and constants by avoiding intermediate * data structures and multiplying terms inplace */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.quickprod", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_term); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":415 * prod:SCIP_EXPR_PRODUCT * } * def getOpIndex(self, op): # <<<<<<<<<<<<<< * '''returns operator index''' * return Op.operatorIndexDic[op]; */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2Op_1getOpIndex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2Op_getOpIndex[] = "returns operator index"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_2Op_1getOpIndex = {"getOpIndex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2Op_1getOpIndex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2Op_getOpIndex}; static PyObject *__pyx_pw_9pyscipopt_4scip_2Op_1getOpIndex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOpIndex (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_op,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getOpIndex", 1, 2, 2, 1); __PYX_ERR(0, 415, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getOpIndex") < 0)) __PYX_ERR(0, 415, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_op = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getOpIndex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 415, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Op.getOpIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2Op_getOpIndex(__pyx_self, __pyx_v_self, __pyx_v_op); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2Op_getOpIndex(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOpIndex", 0); /* "src/pyscipopt/expr.pxi":417 * def getOpIndex(self, op): * '''returns operator index''' * return Op.operatorIndexDic[op]; # <<<<<<<<<<<<<< * * Operator = Op() */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":415 * prod:SCIP_EXPR_PRODUCT * } * def getOpIndex(self, op): # <<<<<<<<<<<<<< * '''returns operator index''' * return Op.operatorIndexDic[op]; */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Op.getOpIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":435 * * * def __init__(self): # do we need it # <<<<<<<<<<<<<< * ''' ''' * */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7GenExpr___init__[] = " "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_9pyscipopt_4scip_7GenExpr___init__; #endif static int __pyx_pw_9pyscipopt_4scip_7GenExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr___init__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr___init__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":438 * ''' ''' * * def __abs__(self): # <<<<<<<<<<<<<< * return UnaryExpr(Operator.fabs, self) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_3__abs__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_3__abs__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_2__abs__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_2__abs__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__abs__", 0); /* "src/pyscipopt/expr.pxi":439 * * def __abs__(self): * return UnaryExpr(Operator.fabs, self) # <<<<<<<<<<<<<< * * def __add__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fabs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_UnaryExpr), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":438 * ''' ''' * * def __abs__(self): # <<<<<<<<<<<<<< * return UnaryExpr(Operator.fabs, self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":441 * return UnaryExpr(Operator.fabs, self) * * def __add__(self, other): # <<<<<<<<<<<<<< * left = buildGenExprObj(self) * right = buildGenExprObj(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_5__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_5__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_4__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_4__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_left = NULL; PyObject *__pyx_v_right = NULL; struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_ans = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); /* "src/pyscipopt/expr.pxi":442 * * def __add__(self, other): * left = buildGenExprObj(self) # <<<<<<<<<<<<<< * right = buildGenExprObj(other) * ans = SumExpr() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_left = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":443 * def __add__(self, other): * left = buildGenExprObj(self) * right = buildGenExprObj(other) # <<<<<<<<<<<<<< * ans = SumExpr() * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_right = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":444 * left = buildGenExprObj(self) * right = buildGenExprObj(other) * ans = SumExpr() # <<<<<<<<<<<<<< * * # add left term */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_SumExpr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ans = ((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":447 * * # add left term * if left.getOp() == Operator.add: # <<<<<<<<<<<<<< * ans.coefs.extend(left.coefs) * ans.children.extend(left.children) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":448 * # add left term * if left.getOp() == Operator.add: * ans.coefs.extend(left.coefs) # <<<<<<<<<<<<<< * ans.children.extend(left.children) * ans.constant += left.constant */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans->coefs, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":449 * if left.getOp() == Operator.add: * ans.coefs.extend(left.coefs) * ans.children.extend(left.children) # <<<<<<<<<<<<<< * ans.constant += left.constant * elif left.getOp() == Operator.const: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans->__pyx_base.children, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":450 * ans.coefs.extend(left.coefs) * ans.children.extend(left.children) * ans.constant += left.constant # <<<<<<<<<<<<<< * elif left.getOp() == Operator.const: * ans.constant += left.number */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":447 * * # add left term * if left.getOp() == Operator.add: # <<<<<<<<<<<<<< * ans.coefs.extend(left.coefs) * ans.children.extend(left.children) */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":451 * ans.children.extend(left.children) * ans.constant += left.constant * elif left.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant += left.number * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":452 * ans.constant += left.constant * elif left.getOp() == Operator.const: * ans.constant += left.number # <<<<<<<<<<<<<< * else: * ans.coefs.append(1.0) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":451 * ans.children.extend(left.children) * ans.constant += left.constant * elif left.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant += left.number * else: */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":454 * ans.constant += left.number * else: * ans.coefs.append(1.0) # <<<<<<<<<<<<<< * ans.children.append(left) * */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ans->coefs, __pyx_float_1_0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":455 * else: * ans.coefs.append(1.0) * ans.children.append(left) # <<<<<<<<<<<<<< * * # add right term */ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ans->__pyx_base.children, __pyx_v_left); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 455, __pyx_L1_error) } __pyx_L3:; /* "src/pyscipopt/expr.pxi":458 * * # add right term * if right.getOp() == Operator.add: # <<<<<<<<<<<<<< * ans.coefs.extend(right.coefs) * ans.children.extend(right.children) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":459 * # add right term * if right.getOp() == Operator.add: * ans.coefs.extend(right.coefs) # <<<<<<<<<<<<<< * ans.children.extend(right.children) * ans.constant += right.constant */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans->coefs, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":460 * if right.getOp() == Operator.add: * ans.coefs.extend(right.coefs) * ans.children.extend(right.children) # <<<<<<<<<<<<<< * ans.constant += right.constant * elif right.getOp() == Operator.const: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans->__pyx_base.children, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":461 * ans.coefs.extend(right.coefs) * ans.children.extend(right.children) * ans.constant += right.constant # <<<<<<<<<<<<<< * elif right.getOp() == Operator.const: * ans.constant += right.number */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":458 * * # add right term * if right.getOp() == Operator.add: # <<<<<<<<<<<<<< * ans.coefs.extend(right.coefs) * ans.children.extend(right.children) */ goto __pyx_L4; } /* "src/pyscipopt/expr.pxi":462 * ans.children.extend(right.children) * ans.constant += right.constant * elif right.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant += right.number * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":463 * ans.constant += right.constant * elif right.getOp() == Operator.const: * ans.constant += right.number # <<<<<<<<<<<<<< * else: * ans.coefs.append(1.0) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":462 * ans.children.extend(right.children) * ans.constant += right.constant * elif right.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant += right.number * else: */ goto __pyx_L4; } /* "src/pyscipopt/expr.pxi":465 * ans.constant += right.number * else: * ans.coefs.append(1.0) # <<<<<<<<<<<<<< * ans.children.append(right) * */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ans->coefs, __pyx_float_1_0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 465, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":466 * else: * ans.coefs.append(1.0) * ans.children.append(right) # <<<<<<<<<<<<<< * * return ans */ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ans->__pyx_base.children, __pyx_v_right); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 466, __pyx_L1_error) } __pyx_L4:; /* "src/pyscipopt/expr.pxi":468 * ans.children.append(right) * * return ans # <<<<<<<<<<<<<< * * #def __iadd__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ans)); __pyx_r = ((PyObject *)__pyx_v_ans); goto __pyx_L0; /* "src/pyscipopt/expr.pxi":441 * return UnaryExpr(Operator.fabs, self) * * def __add__(self, other): # <<<<<<<<<<<<<< * left = buildGenExprObj(self) * right = buildGenExprObj(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_left); __Pyx_XDECREF(__pyx_v_right); __Pyx_XDECREF((PyObject *)__pyx_v_ans); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":496 * # return self * * def __mul__(self, other): # <<<<<<<<<<<<<< * left = buildGenExprObj(self) * right = buildGenExprObj(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_7__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_7__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_6__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_6__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_left = NULL; PyObject *__pyx_v_right = NULL; struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_ans = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__mul__", 0); /* "src/pyscipopt/expr.pxi":497 * * def __mul__(self, other): * left = buildGenExprObj(self) # <<<<<<<<<<<<<< * right = buildGenExprObj(other) * ans = ProdExpr() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_left = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":498 * def __mul__(self, other): * left = buildGenExprObj(self) * right = buildGenExprObj(other) # <<<<<<<<<<<<<< * ans = ProdExpr() * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_right = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":499 * left = buildGenExprObj(self) * right = buildGenExprObj(other) * ans = ProdExpr() # <<<<<<<<<<<<<< * * # multiply left factor */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ProdExpr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ans = ((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":502 * * # multiply left factor * if left.getOp() == Operator.prod: # <<<<<<<<<<<<<< * ans.children.extend(left.children) * ans.constant *= left.constant */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":503 * # multiply left factor * if left.getOp() == Operator.prod: * ans.children.extend(left.children) # <<<<<<<<<<<<<< * ans.constant *= left.constant * elif left.getOp() == Operator.const: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans->__pyx_base.children, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":504 * if left.getOp() == Operator.prod: * ans.children.extend(left.children) * ans.constant *= left.constant # <<<<<<<<<<<<<< * elif left.getOp() == Operator.const: * ans.constant *= left.number */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":502 * * # multiply left factor * if left.getOp() == Operator.prod: # <<<<<<<<<<<<<< * ans.children.extend(left.children) * ans.constant *= left.constant */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":505 * ans.children.extend(left.children) * ans.constant *= left.constant * elif left.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant *= left.number * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":506 * ans.constant *= left.constant * elif left.getOp() == Operator.const: * ans.constant *= left.number # <<<<<<<<<<<<<< * else: * ans.children.append(left) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":505 * ans.children.extend(left.children) * ans.constant *= left.constant * elif left.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant *= left.number * else: */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":508 * ans.constant *= left.number * else: * ans.children.append(left) # <<<<<<<<<<<<<< * * # multiply right factor */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ans->__pyx_base.children, __pyx_v_left); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 508, __pyx_L1_error) } __pyx_L3:; /* "src/pyscipopt/expr.pxi":511 * * # multiply right factor * if right.getOp() == Operator.prod: # <<<<<<<<<<<<<< * ans.children.extend(right.children) * ans.constant *= right.constant */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":512 * # multiply right factor * if right.getOp() == Operator.prod: * ans.children.extend(right.children) # <<<<<<<<<<<<<< * ans.constant *= right.constant * elif right.getOp() == Operator.const: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans->__pyx_base.children, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":513 * if right.getOp() == Operator.prod: * ans.children.extend(right.children) * ans.constant *= right.constant # <<<<<<<<<<<<<< * elif right.getOp() == Operator.const: * ans.constant *= right.number */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/expr.pxi":511 * * # multiply right factor * if right.getOp() == Operator.prod: # <<<<<<<<<<<<<< * ans.children.extend(right.children) * ans.constant *= right.constant */ goto __pyx_L4; } /* "src/pyscipopt/expr.pxi":514 * ans.children.extend(right.children) * ans.constant *= right.constant * elif right.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant *= right.number * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":515 * ans.constant *= right.constant * elif right.getOp() == Operator.const: * ans.constant *= right.number # <<<<<<<<<<<<<< * else: * ans.children.append(right) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_ans->constant, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_ans->constant); __Pyx_DECREF(__pyx_v_ans->constant); __pyx_v_ans->constant = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":514 * ans.children.extend(right.children) * ans.constant *= right.constant * elif right.getOp() == Operator.const: # <<<<<<<<<<<<<< * ans.constant *= right.number * else: */ goto __pyx_L4; } /* "src/pyscipopt/expr.pxi":517 * ans.constant *= right.number * else: * ans.children.append(right) # <<<<<<<<<<<<<< * * return ans */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ans->__pyx_base.children, __pyx_v_right); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 517, __pyx_L1_error) } __pyx_L4:; /* "src/pyscipopt/expr.pxi":519 * ans.children.append(right) * * return ans # <<<<<<<<<<<<<< * * #def __imul__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ans)); __pyx_r = ((PyObject *)__pyx_v_ans); goto __pyx_L0; /* "src/pyscipopt/expr.pxi":496 * # return self * * def __mul__(self, other): # <<<<<<<<<<<<<< * left = buildGenExprObj(self) * right = buildGenExprObj(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_left); __Pyx_XDECREF(__pyx_v_right); __Pyx_XDECREF((PyObject *)__pyx_v_ans); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":543 * # return self * * def __pow__(self, other, modulo): # <<<<<<<<<<<<<< * expo = buildGenExprObj(other) * if expo.getOp() != Operator.const: */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_9__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_9__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_8__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_8__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, CYTHON_UNUSED PyObject *__pyx_v_modulo) { PyObject *__pyx_v_expo = NULL; struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_ans = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pow__", 0); /* "src/pyscipopt/expr.pxi":544 * * def __pow__(self, other, modulo): * expo = buildGenExprObj(other) # <<<<<<<<<<<<<< * if expo.getOp() != Operator.const: * raise NotImplementedError("exponents must be numbers") */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_expo = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":545 * def __pow__(self, other, modulo): * expo = buildGenExprObj(other) * if expo.getOp() != Operator.const: # <<<<<<<<<<<<<< * raise NotImplementedError("exponents must be numbers") * if self.getOp() == Operator.const: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expo, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_4)) { /* "src/pyscipopt/expr.pxi":546 * expo = buildGenExprObj(other) * if expo.getOp() != Operator.const: * raise NotImplementedError("exponents must be numbers") # <<<<<<<<<<<<<< * if self.getOp() == Operator.const: * return Constant(self.number**expo.number) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 546, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":545 * def __pow__(self, other, modulo): * expo = buildGenExprObj(other) * if expo.getOp() != Operator.const: # <<<<<<<<<<<<<< * raise NotImplementedError("exponents must be numbers") * if self.getOp() == Operator.const: */ } /* "src/pyscipopt/expr.pxi":547 * if expo.getOp() != Operator.const: * raise NotImplementedError("exponents must be numbers") * if self.getOp() == Operator.const: # <<<<<<<<<<<<<< * return Constant(self.number**expo.number) * ans = PowExpr() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getOp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Operator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "src/pyscipopt/expr.pxi":548 * raise NotImplementedError("exponents must be numbers") * if self.getOp() == Operator.const: * return Constant(self.number**expo.number) # <<<<<<<<<<<<<< * ans = PowExpr() * ans.children.append(self) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expo, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Constant), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":547 * if expo.getOp() != Operator.const: * raise NotImplementedError("exponents must be numbers") * if self.getOp() == Operator.const: # <<<<<<<<<<<<<< * return Constant(self.number**expo.number) * ans = PowExpr() */ } /* "src/pyscipopt/expr.pxi":549 * if self.getOp() == Operator.const: * return Constant(self.number**expo.number) * ans = PowExpr() # <<<<<<<<<<<<<< * ans.children.append(self) * ans.expo = expo.number */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PowExpr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ans = ((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":550 * return Constant(self.number**expo.number) * ans = PowExpr() * ans.children.append(self) # <<<<<<<<<<<<<< * ans.expo = expo.number * */ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_ans->__pyx_base.children, __pyx_v_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 550, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":551 * ans = PowExpr() * ans.children.append(self) * ans.expo = expo.number # <<<<<<<<<<<<<< * * return ans */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expo, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_ans->expo); __Pyx_DECREF(__pyx_v_ans->expo); __pyx_v_ans->expo = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":553 * ans.expo = expo.number * * return ans # <<<<<<<<<<<<<< * * #TODO: ipow, idiv, etc */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ans)); __pyx_r = ((PyObject *)__pyx_v_ans); goto __pyx_L0; /* "src/pyscipopt/expr.pxi":543 * # return self * * def __pow__(self, other, modulo): # <<<<<<<<<<<<<< * expo = buildGenExprObj(other) * if expo.getOp() != Operator.const: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_expo); __Pyx_XDECREF((PyObject *)__pyx_v_ans); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":556 * * #TODO: ipow, idiv, etc * def __div__(self, other): # <<<<<<<<<<<<<< * divisor = buildGenExprObj(other) * # we can't divide by 0 */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_11__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_11__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__div__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_10__div__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_10__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_divisor = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div__", 0); /* "src/pyscipopt/expr.pxi":557 * #TODO: ipow, idiv, etc * def __div__(self, other): * divisor = buildGenExprObj(other) # <<<<<<<<<<<<<< * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_divisor = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":559 * divisor = buildGenExprObj(other) * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: # <<<<<<<<<<<<<< * raise ZeroDivisionError("cannot divide by 0") * return self * divisor**(-1) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_divisor, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_divisor, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyFloat_EqObjC(__pyx_t_2, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_4)) { /* "src/pyscipopt/expr.pxi":560 * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: * raise ZeroDivisionError("cannot divide by 0") # <<<<<<<<<<<<<< * return self * divisor**(-1) * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ZeroDivisionError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 560, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":559 * divisor = buildGenExprObj(other) * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: # <<<<<<<<<<<<<< * raise ZeroDivisionError("cannot divide by 0") * return self * divisor**(-1) */ } /* "src/pyscipopt/expr.pxi":561 * if divisor.getOp() == Operator.const and divisor.number == 0.0: * raise ZeroDivisionError("cannot divide by 0") * return self * divisor**(-1) # <<<<<<<<<<<<<< * * def __rdiv__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Power(__pyx_v_divisor, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":556 * * #TODO: ipow, idiv, etc * def __div__(self, other): # <<<<<<<<<<<<<< * divisor = buildGenExprObj(other) * # we can't divide by 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_divisor); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/ /* "src/pyscipopt/expr.pxi":563 * return self * divisor**(-1) * * def __rdiv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * otherexpr = buildGenExprObj(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_13__rdiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7GenExpr_12__rdiv__[] = " other / self "; static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_13__rdiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rdiv__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_12__rdiv__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_12__rdiv__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_otherexpr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rdiv__", 0); /* "src/pyscipopt/expr.pxi":565 * def __rdiv__(self, other): * ''' other / self ''' * otherexpr = buildGenExprObj(other) # <<<<<<<<<<<<<< * return otherexpr.__div__(self) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_otherexpr = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":566 * ''' other / self ''' * otherexpr = buildGenExprObj(other) * return otherexpr.__div__(self) # <<<<<<<<<<<<<< * * def __truediv__(self,other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_otherexpr, __pyx_n_s_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":563 * return self * divisor**(-1) * * def __rdiv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * otherexpr = buildGenExprObj(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__rdiv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_otherexpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":568 * return otherexpr.__div__(self) * * def __truediv__(self,other): # <<<<<<<<<<<<<< * divisor = buildGenExprObj(other) * # we can't divide by 0 */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_15__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_15__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_14__truediv__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_14__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_divisor = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__truediv__", 0); /* "src/pyscipopt/expr.pxi":569 * * def __truediv__(self,other): * divisor = buildGenExprObj(other) # <<<<<<<<<<<<<< * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_divisor = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":571 * divisor = buildGenExprObj(other) * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: # <<<<<<<<<<<<<< * raise ZeroDivisionError("cannot divide by 0") * return self * divisor**(-1) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_divisor, __pyx_n_s_getOp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_divisor, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyFloat_EqObjC(__pyx_t_2, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_4)) { /* "src/pyscipopt/expr.pxi":572 * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: * raise ZeroDivisionError("cannot divide by 0") # <<<<<<<<<<<<<< * return self * divisor**(-1) * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ZeroDivisionError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 572, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":571 * divisor = buildGenExprObj(other) * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: # <<<<<<<<<<<<<< * raise ZeroDivisionError("cannot divide by 0") * return self * divisor**(-1) */ } /* "src/pyscipopt/expr.pxi":573 * if divisor.getOp() == Operator.const and divisor.number == 0.0: * raise ZeroDivisionError("cannot divide by 0") * return self * divisor**(-1) # <<<<<<<<<<<<<< * * def __rtruediv__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Power(__pyx_v_divisor, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":568 * return otherexpr.__div__(self) * * def __truediv__(self,other): # <<<<<<<<<<<<<< * divisor = buildGenExprObj(other) * # we can't divide by 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_divisor); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":575 * return self * divisor**(-1) * * def __rtruediv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * otherexpr = buildGenExprObj(other) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_17__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7GenExpr_16__rtruediv__[] = " other / self "; static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_17__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rtruediv__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_16__rtruediv__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_16__rtruediv__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_otherexpr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rtruediv__", 0); /* "src/pyscipopt/expr.pxi":577 * def __rtruediv__(self, other): * ''' other / self ''' * otherexpr = buildGenExprObj(other) # <<<<<<<<<<<<<< * return otherexpr.__truediv__(self) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_otherexpr = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":578 * ''' other / self ''' * otherexpr = buildGenExprObj(other) * return otherexpr.__truediv__(self) # <<<<<<<<<<<<<< * * def __neg__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_otherexpr, __pyx_n_s_truediv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":575 * return self * divisor**(-1) * * def __rtruediv__(self, other): # <<<<<<<<<<<<<< * ''' other / self ''' * otherexpr = buildGenExprObj(other) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_otherexpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":580 * return otherexpr.__truediv__(self) * * def __neg__(self): # <<<<<<<<<<<<<< * return -1.0 * self * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_19__neg__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_19__neg__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_18__neg__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_18__neg__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__neg__", 0); /* "src/pyscipopt/expr.pxi":581 * * def __neg__(self): * return -1.0 * self # <<<<<<<<<<<<<< * * def __sub__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Multiply(__pyx_float_neg_1_0, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":580 * return otherexpr.__truediv__(self) * * def __neg__(self): # <<<<<<<<<<<<<< * return -1.0 * self * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":583 * return -1.0 * self * * def __sub__(self, other): # <<<<<<<<<<<<<< * return self + (-other) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_21__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_21__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_20__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_20__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); /* "src/pyscipopt/expr.pxi":584 * * def __sub__(self, other): * return self + (-other) # <<<<<<<<<<<<<< * * def __radd__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":583 * return -1.0 * self * * def __sub__(self, other): # <<<<<<<<<<<<<< * return self + (-other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":586 * return self + (-other) * * def __radd__(self, other): # <<<<<<<<<<<<<< * return self.__add__(other) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_23__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_23__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_22__radd__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_22__radd__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__radd__", 0); /* "src/pyscipopt/expr.pxi":587 * * def __radd__(self, other): * return self.__add__(other) # <<<<<<<<<<<<<< * * def __rmul__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":586 * return self + (-other) * * def __radd__(self, other): # <<<<<<<<<<<<<< * return self.__add__(other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":589 * return self.__add__(other) * * def __rmul__(self, other): # <<<<<<<<<<<<<< * return self.__mul__(other) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_25__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_25__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_24__rmul__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_24__rmul__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rmul__", 0); /* "src/pyscipopt/expr.pxi":590 * * def __rmul__(self, other): * return self.__mul__(other) # <<<<<<<<<<<<<< * * def __rsub__(self, other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_other); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":589 * return self.__add__(other) * * def __rmul__(self, other): # <<<<<<<<<<<<<< * return self.__mul__(other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":592 * return self.__mul__(other) * * def __rsub__(self, other): # <<<<<<<<<<<<<< * return -1.0 * self + other * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_27__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_27__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_26__rsub__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_26__rsub__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rsub__", 0); /* "src/pyscipopt/expr.pxi":593 * * def __rsub__(self, other): * return -1.0 * self + other # <<<<<<<<<<<<<< * * def __richcmp__(self, other, op): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Multiply(__pyx_float_neg_1_0, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":592 * return self.__mul__(other) * * def __rsub__(self, other): # <<<<<<<<<<<<<< * return -1.0 * self + other * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":595 * return -1.0 * self + other * * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< * '''turn it into a constraint''' * return _expr_richcmp(self, other, op) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_29__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_29__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) { PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) __PYX_ERR(0, 595, __pyx_L3_error) __Pyx_GOTREF(__pyx_v_op); goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_28__richcmp__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_op)); /* function exit code */ __Pyx_XDECREF(__pyx_v_op); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_28__richcmp__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "src/pyscipopt/expr.pxi":597 * def __richcmp__(self, other, op): * '''turn it into a constraint''' * return _expr_richcmp(self, other, op) # <<<<<<<<<<<<<< * * def degree(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_expr_richcmp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_other); __Pyx_INCREF(__pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_op); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":595 * return -1.0 * self + other * * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< * '''turn it into a constraint''' * return _expr_richcmp(self, other, op) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":599 * return _expr_richcmp(self, other, op) * * def degree(self): # <<<<<<<<<<<<<< * '''Note: none of these expressions should be polynomial''' * return float('inf') */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_31degree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7GenExpr_30degree[] = "Note: none of these expressions should be polynomial"; static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_31degree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("degree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_30degree(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_30degree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("degree", 0); /* "src/pyscipopt/expr.pxi":601 * def degree(self): * '''Note: none of these expressions should be polynomial''' * return float('inf') # <<<<<<<<<<<<<< * * def getOp(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_n_u_inf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":599 * return _expr_richcmp(self, other, op) * * def degree(self): # <<<<<<<<<<<<<< * '''Note: none of these expressions should be polynomial''' * return float('inf') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.degree", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":603 * return float('inf') * * def getOp(self): # <<<<<<<<<<<<<< * '''returns operator of GenExpr''' * return self._op */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_33getOp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7GenExpr_32getOp[] = "returns operator of GenExpr"; static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_33getOp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOp (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_32getOp(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_32getOp(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOp", 0); /* "src/pyscipopt/expr.pxi":605 * def getOp(self): * '''returns operator of GenExpr''' * return self._op # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_op); __pyx_r = __pyx_v_self->_op; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":603 * return float('inf') * * def getOp(self): # <<<<<<<<<<<<<< * '''returns operator of GenExpr''' * return self._op */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":430 * #See also the @ref ExprDetails "description" in the expr.pxi. * cdef class GenExpr: * cdef public operatorIndex # <<<<<<<<<<<<<< * cdef public _op * cdef public children */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex___get__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex___get__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->operatorIndex); __pyx_r = __pyx_v_self->operatorIndex; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex_2__set__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex_2__set__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->operatorIndex); __Pyx_DECREF(__pyx_v_self->operatorIndex); __pyx_v_self->operatorIndex = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex_4__del__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr_13operatorIndex_4__del__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->operatorIndex); __Pyx_DECREF(__pyx_v_self->operatorIndex); __pyx_v_self->operatorIndex = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":431 * cdef class GenExpr: * cdef public operatorIndex * cdef public _op # <<<<<<<<<<<<<< * cdef public children * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op___get__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_3_op___get__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_op); __pyx_r = __pyx_v_self->_op; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op_2__set__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op_2__set__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->_op); __Pyx_DECREF(__pyx_v_self->_op); __pyx_v_self->_op = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op_4__del__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr_3_op_4__del__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_op); __Pyx_DECREF(__pyx_v_self->_op); __pyx_v_self->_op = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":432 * cdef public operatorIndex * cdef public _op * cdef public children # <<<<<<<<<<<<<< * * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_8children_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_8children_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_8children___get__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_8children___get__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->children); __pyx_r = __pyx_v_self->children; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_8children_2__set__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr_8children_2__set__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->children); __Pyx_DECREF(__pyx_v_self->children); __pyx_v_self->children = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_8children_4__del__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7GenExpr_8children_4__del__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->children); __Pyx_DECREF(__pyx_v_self->children); __pyx_v_self->children = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_34__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_34__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.operatorIndex) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->_op); __Pyx_GIVEREF(__pyx_v_self->_op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_op); __Pyx_INCREF(__pyx_v_self->children); __Pyx_GIVEREF(__pyx_v_self->children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->children); __Pyx_INCREF(__pyx_v_self->operatorIndex); __Pyx_GIVEREF(__pyx_v_self->operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->operatorIndex); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.operatorIndex) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->_op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->operatorIndex != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None * if use_setstate: * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_GenExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_195726446); __Pyx_GIVEREF(__pyx_int_195726446); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_195726446); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, None), state * else: * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_GenExpr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_GenExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_195726446); __Pyx_GIVEREF(__pyx_int_195726446); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_195726446); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_GenExpr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7GenExpr_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7GenExpr_36__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7GenExpr_36__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_GenExpr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_GenExpr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_GenExpr, (type(self), 0xbaa8c6e, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_GenExpr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.GenExpr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":614 * cdef public coefs * * def __init__(self): # <<<<<<<<<<<<<< * self.constant = 0.0 * self.coefs = [] */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr___init__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7SumExpr___init__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":615 * * def __init__(self): * self.constant = 0.0 # <<<<<<<<<<<<<< * self.coefs = [] * self.children = [] */ __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); __Pyx_GOTREF(__pyx_v_self->constant); __Pyx_DECREF(__pyx_v_self->constant); __pyx_v_self->constant = __pyx_float_0_0; /* "src/pyscipopt/expr.pxi":616 * def __init__(self): * self.constant = 0.0 * self.coefs = [] # <<<<<<<<<<<<<< * self.children = [] * self._op = Operator.add */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->coefs); __Pyx_DECREF(__pyx_v_self->coefs); __pyx_v_self->coefs = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":617 * self.constant = 0.0 * self.coefs = [] * self.children = [] # <<<<<<<<<<<<<< * self._op = Operator.add * self.operatorIndex = Operator.operatorIndexDic[self._op] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.children); __Pyx_DECREF(__pyx_v_self->__pyx_base.children); __pyx_v_self->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":618 * self.coefs = [] * self.children = [] * self._op = Operator.add # <<<<<<<<<<<<<< * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base._op); __Pyx_DECREF(__pyx_v_self->__pyx_base._op); __pyx_v_self->__pyx_base._op = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":619 * self.children = [] * self._op = Operator.add * self.operatorIndex = Operator.operatorIndexDic[self._op] # <<<<<<<<<<<<<< * def __repr__(self): * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_self->__pyx_base._op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v_self->__pyx_base.operatorIndex); __pyx_v_self->__pyx_base.operatorIndex = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":614 * cdef public coefs * * def __init__(self): # <<<<<<<<<<<<<< * self.constant = 0.0 * self.coefs = [] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.SumExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":620 * self._op = Operator.add * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":621 * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" # <<<<<<<<<<<<<< * * # Prod Expressions */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_8__repr___lambda3(PyObject *__pyx_self, PyObject *__pyx_v_child); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_7SumExpr_8__repr___lambda3 = {"lambda3", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7SumExpr_8__repr___lambda3, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_8__repr___lambda3(PyObject *__pyx_self, PyObject *__pyx_v_child) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, ((PyObject *)__pyx_v_child)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda3", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.SumExpr.__repr__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":620 * self._op = Operator.add * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" * */ static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":621 * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" # <<<<<<<<<<<<<< * * # Prod Expressions */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Add(__pyx_v_self->__pyx_base._op, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_self->constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_7SumExpr_8__repr___lambda3, 0, __pyx_n_s_repr___locals_lambda, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__9, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":620 * self._op = Operator.add * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.SumExpr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":611 * cdef class SumExpr(GenExpr): * * cdef public constant # <<<<<<<<<<<<<< * cdef public coefs * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant___get__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_8constant___get__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->constant); __pyx_r = __pyx_v_self->constant; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant_2__set__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant_2__set__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->constant); __Pyx_DECREF(__pyx_v_self->constant); __pyx_v_self->constant = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant_4__del__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7SumExpr_8constant_4__del__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->constant); __Pyx_DECREF(__pyx_v_self->constant); __pyx_v_self->constant = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":612 * * cdef public constant * cdef public coefs # <<<<<<<<<<<<<< * * def __init__(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs___get__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs___get__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->coefs); __pyx_r = __pyx_v_self->coefs; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs_2__set__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs_2__set__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->coefs); __Pyx_DECREF(__pyx_v_self->coefs); __pyx_v_self->coefs = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs_4__del__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7SumExpr_5coefs_4__del__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->coefs); __Pyx_DECREF(__pyx_v_self->coefs); __pyx_v_self->coefs = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_4__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.coefs, self.constant, self.operatorIndex) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base._op); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._op); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __Pyx_INCREF(__pyx_v_self->coefs); __Pyx_GIVEREF(__pyx_v_self->coefs); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->coefs); __Pyx_INCREF(__pyx_v_self->constant); __Pyx_GIVEREF(__pyx_v_self->constant); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->constant); __Pyx_INCREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx_base.operatorIndex); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.coefs, self.constant, self.operatorIndex) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.coefs, self.constant, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.coefs is not None or self.constant is not None or self.operatorIndex is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.coefs, self.constant, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.coefs is not None or self.constant is not None or self.operatorIndex is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->coefs != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->constant != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->__pyx_base.operatorIndex != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.coefs is not None or self.constant is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.coefs is not None or self.constant is not None or self.operatorIndex is not None * if use_setstate: * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SumExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_142711914); __Pyx_GIVEREF(__pyx_int_142711914); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142711914); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.coefs is not None or self.constant is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, None), state * else: * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_SumExpr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_SumExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_142711914); __Pyx_GIVEREF(__pyx_int_142711914); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142711914); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.SumExpr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_SumExpr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7SumExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7SumExpr_6__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7SumExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_SumExpr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_SumExpr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_SumExpr, (type(self), 0x8819c6a, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_SumExpr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.SumExpr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":626 * cdef class ProdExpr(GenExpr): * cdef public constant * def __init__(self): # <<<<<<<<<<<<<< * self.constant = 1.0 * self.children = [] */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ProdExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ProdExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr___init__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ProdExpr___init__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":627 * cdef public constant * def __init__(self): * self.constant = 1.0 # <<<<<<<<<<<<<< * self.children = [] * self._op = Operator.prod */ __Pyx_INCREF(__pyx_float_1_0); __Pyx_GIVEREF(__pyx_float_1_0); __Pyx_GOTREF(__pyx_v_self->constant); __Pyx_DECREF(__pyx_v_self->constant); __pyx_v_self->constant = __pyx_float_1_0; /* "src/pyscipopt/expr.pxi":628 * def __init__(self): * self.constant = 1.0 * self.children = [] # <<<<<<<<<<<<<< * self._op = Operator.prod * self.operatorIndex = Operator.operatorIndexDic[self._op] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.children); __Pyx_DECREF(__pyx_v_self->__pyx_base.children); __pyx_v_self->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":629 * self.constant = 1.0 * self.children = [] * self._op = Operator.prod # <<<<<<<<<<<<<< * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_prod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base._op); __Pyx_DECREF(__pyx_v_self->__pyx_base._op); __pyx_v_self->__pyx_base._op = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":630 * self.children = [] * self._op = Operator.prod * self.operatorIndex = Operator.operatorIndexDic[self._op] # <<<<<<<<<<<<<< * def __repr__(self): * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_self->__pyx_base._op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v_self->__pyx_base.operatorIndex); __pyx_v_self->__pyx_base.operatorIndex = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":626 * cdef class ProdExpr(GenExpr): * cdef public constant * def __init__(self): # <<<<<<<<<<<<<< * self.constant = 1.0 * self.children = [] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.ProdExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":631 * self._op = Operator.prod * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":632 * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" # <<<<<<<<<<<<<< * * # Var Expressions */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_8__repr___lambda4(PyObject *__pyx_self, PyObject *__pyx_v_child); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_8ProdExpr_8__repr___lambda4 = {"lambda4", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8ProdExpr_8__repr___lambda4, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_8__repr___lambda4(PyObject *__pyx_self, PyObject *__pyx_v_child) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self, ((PyObject *)__pyx_v_child)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda4", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.ProdExpr.__repr__.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":631 * self._op = Operator.prod * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" * */ static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":632 * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" # <<<<<<<<<<<<<< * * # Var Expressions */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Add(__pyx_v_self->__pyx_base._op, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_self->constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_8ProdExpr_8__repr___lambda4, 0, __pyx_n_s_repr___locals_lambda, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__9, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":631 * self._op = Operator.prod * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + str(self.constant) + "," + ",".join(map(lambda child : child.__repr__(), self.children)) + ")" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.ProdExpr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":625 * # Prod Expressions * cdef class ProdExpr(GenExpr): * cdef public constant # <<<<<<<<<<<<<< * def __init__(self): * self.constant = 1.0 */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant___get__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant___get__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->constant); __pyx_r = __pyx_v_self->constant; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant_2__set__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant_2__set__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->constant); __Pyx_DECREF(__pyx_v_self->constant); __pyx_v_self->constant = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant_4__del__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8ProdExpr_8constant_4__del__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->constant); __Pyx_DECREF(__pyx_v_self->constant); __pyx_v_self->constant = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr_4__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.constant, self.operatorIndex) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base._op); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._op); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __Pyx_INCREF(__pyx_v_self->constant); __Pyx_GIVEREF(__pyx_v_self->constant); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->constant); __Pyx_INCREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.operatorIndex); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.constant, self.operatorIndex) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.constant, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.constant is not None or self.operatorIndex is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.constant, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.constant is not None or self.operatorIndex is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->constant != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.operatorIndex != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.constant is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.constant is not None or self.operatorIndex is not None * if use_setstate: * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ProdExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_162847362); __Pyx_GIVEREF(__pyx_int_162847362); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_162847362); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.constant is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, None), state * else: * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ProdExpr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ProdExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_162847362); __Pyx_GIVEREF(__pyx_int_162847362); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_162847362); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.ProdExpr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ProdExpr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8ProdExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8ProdExpr_6__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8ProdExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ProdExpr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_ProdExpr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_ProdExpr, (type(self), 0x9b4da82, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ProdExpr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.ProdExpr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":637 * cdef class VarExpr(GenExpr): * cdef public var * def __init__(self, var): # <<<<<<<<<<<<<< * self.children = [var] * self._op = Operator.varidx */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7VarExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7VarExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_var = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 637, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_var = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 637, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.VarExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr___init__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self), __pyx_v_var); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7VarExpr___init__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":638 * cdef public var * def __init__(self, var): * self.children = [var] # <<<<<<<<<<<<<< * self._op = Operator.varidx * self.operatorIndex = Operator.operatorIndexDic[self._op] */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_var); __Pyx_GIVEREF(__pyx_v_var); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_var); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.children); __Pyx_DECREF(__pyx_v_self->__pyx_base.children); __pyx_v_self->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":639 * def __init__(self, var): * self.children = [var] * self._op = Operator.varidx # <<<<<<<<<<<<<< * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_varidx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base._op); __Pyx_DECREF(__pyx_v_self->__pyx_base._op); __pyx_v_self->__pyx_base._op = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":640 * self.children = [var] * self._op = Operator.varidx * self.operatorIndex = Operator.operatorIndexDic[self._op] # <<<<<<<<<<<<<< * def __repr__(self): * return self.children[0].__repr__() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_self->__pyx_base._op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v_self->__pyx_base.operatorIndex); __pyx_v_self->__pyx_base.operatorIndex = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":637 * cdef class VarExpr(GenExpr): * cdef public var * def __init__(self, var): # <<<<<<<<<<<<<< * self.children = [var] * self._op = Operator.varidx */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.VarExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":641 * self._op = Operator.varidx * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self.children[0].__repr__() * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":642 * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): * return self.children[0].__repr__() # <<<<<<<<<<<<<< * * # Pow Expressions */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->__pyx_base.children, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_repr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":641 * self._op = Operator.varidx * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self.children[0].__repr__() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.VarExpr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":636 * # Var Expressions * cdef class VarExpr(GenExpr): * cdef public var # <<<<<<<<<<<<<< * def __init__(self, var): * self.children = [var] */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_3var_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_3var_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr_3var___get__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_3var___get__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->var); __pyx_r = __pyx_v_self->var; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr_3var_2__set__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7VarExpr_3var_2__set__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->var); __Pyx_DECREF(__pyx_v_self->var); __pyx_v_self->var = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr_3var_4__del__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7VarExpr_3var_4__del__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->var); __Pyx_DECREF(__pyx_v_self->var); __pyx_v_self->var = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr_4__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.operatorIndex, self.var) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base._op); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._op); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __Pyx_INCREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.operatorIndex); __Pyx_INCREF(__pyx_v_self->var); __Pyx_GIVEREF(__pyx_v_self->var); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->var); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.operatorIndex, self.var) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.operatorIndex, self.var) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None or self.var is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.operatorIndex, self.var) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None or self.var is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->__pyx_base.operatorIndex != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->var != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None or self.var is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None or self.var is not None * if use_setstate: * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VarExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_168618862); __Pyx_GIVEREF(__pyx_int_168618862); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_168618862); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None or self.var is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, None), state * else: * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_VarExpr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_VarExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_168618862); __Pyx_GIVEREF(__pyx_int_168618862); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_168618862); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.VarExpr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_VarExpr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7VarExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7VarExpr_6__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7VarExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_VarExpr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_VarExpr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_VarExpr, (type(self), 0xa0ceb6e, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_VarExpr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.VarExpr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":647 * cdef class PowExpr(GenExpr): * cdef public expo * def __init__(self): # <<<<<<<<<<<<<< * self.expo = 1.0 * self.children = [] */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7PowExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7PowExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr___init__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7PowExpr___init__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":648 * cdef public expo * def __init__(self): * self.expo = 1.0 # <<<<<<<<<<<<<< * self.children = [] * self._op = Operator.power */ __Pyx_INCREF(__pyx_float_1_0); __Pyx_GIVEREF(__pyx_float_1_0); __Pyx_GOTREF(__pyx_v_self->expo); __Pyx_DECREF(__pyx_v_self->expo); __pyx_v_self->expo = __pyx_float_1_0; /* "src/pyscipopt/expr.pxi":649 * def __init__(self): * self.expo = 1.0 * self.children = [] # <<<<<<<<<<<<<< * self._op = Operator.power * self.operatorIndex = Operator.operatorIndexDic[self._op] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.children); __Pyx_DECREF(__pyx_v_self->__pyx_base.children); __pyx_v_self->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":650 * self.expo = 1.0 * self.children = [] * self._op = Operator.power # <<<<<<<<<<<<<< * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_power); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base._op); __Pyx_DECREF(__pyx_v_self->__pyx_base._op); __pyx_v_self->__pyx_base._op = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":651 * self.children = [] * self._op = Operator.power * self.operatorIndex = Operator.operatorIndexDic[self._op] # <<<<<<<<<<<<<< * def __repr__(self): * return self._op + "(" + self.children[0].__repr__() + "," + str(self.expo) + ")" */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_self->__pyx_base._op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v_self->__pyx_base.operatorIndex); __pyx_v_self->__pyx_base.operatorIndex = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":647 * cdef class PowExpr(GenExpr): * cdef public expo * def __init__(self): # <<<<<<<<<<<<<< * self.expo = 1.0 * self.children = [] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.PowExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":652 * self._op = Operator.power * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + self.children[0].__repr__() + "," + str(self.expo) + ")" * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":653 * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): * return self._op + "(" + self.children[0].__repr__() + "," + str(self.expo) + ")" # <<<<<<<<<<<<<< * * # Exp, Log, Sqrt Expressions */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Add(__pyx_v_self->__pyx_base._op, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->__pyx_base.children, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_repr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_kp_u__9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_self->expo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_kp_u__5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":652 * self._op = Operator.power * self.operatorIndex = Operator.operatorIndexDic[self._op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + self.children[0].__repr__() + "," + str(self.expo) + ")" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.PowExpr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":646 * # Pow Expressions * cdef class PowExpr(GenExpr): * cdef public expo # <<<<<<<<<<<<<< * def __init__(self): * self.expo = 1.0 */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo___get__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_4expo___get__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->expo); __pyx_r = __pyx_v_self->expo; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo_2__set__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo_2__set__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->expo); __Pyx_DECREF(__pyx_v_self->expo); __pyx_v_self->expo = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo_4__del__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7PowExpr_4expo_4__del__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->expo); __Pyx_DECREF(__pyx_v_self->expo); __pyx_v_self->expo = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr_4__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.expo, self.operatorIndex) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base._op); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._op); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __Pyx_INCREF(__pyx_v_self->expo); __Pyx_GIVEREF(__pyx_v_self->expo); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->expo); __Pyx_INCREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.operatorIndex); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.expo, self.operatorIndex) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.expo, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.expo is not None or self.operatorIndex is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.expo, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.expo is not None or self.operatorIndex is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->expo != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.operatorIndex != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.expo is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.expo is not None or self.operatorIndex is not None * if use_setstate: * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PowExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_188463554); __Pyx_GIVEREF(__pyx_int_188463554); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_188463554); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.expo is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, None), state * else: * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PowExpr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_PowExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_188463554); __Pyx_GIVEREF(__pyx_int_188463554); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_188463554); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.PowExpr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PowExpr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7PowExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7PowExpr_6__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7PowExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PowExpr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PowExpr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PowExpr, (type(self), 0xb3bb9c2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PowExpr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PowExpr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":657 * # Exp, Log, Sqrt Expressions * cdef class UnaryExpr(GenExpr): * def __init__(self, op, expr): # <<<<<<<<<<<<<< * self.children = [] * self.children.append(expr) */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_9UnaryExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_9UnaryExpr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_op = 0; PyObject *__pyx_v_expr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_op,&__pyx_n_s_expr,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 657, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 657, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_op = values[0]; __pyx_v_expr = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 657, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.UnaryExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_9UnaryExpr___init__(((struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *)__pyx_v_self), __pyx_v_op, __pyx_v_expr); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_9UnaryExpr___init__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self, PyObject *__pyx_v_op, PyObject *__pyx_v_expr) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":658 * cdef class UnaryExpr(GenExpr): * def __init__(self, op, expr): * self.children = [] # <<<<<<<<<<<<<< * self.children.append(expr) * self._op = op */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.children); __Pyx_DECREF(__pyx_v_self->__pyx_base.children); __pyx_v_self->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":659 * def __init__(self, op, expr): * self.children = [] * self.children.append(expr) # <<<<<<<<<<<<<< * self._op = op * self.operatorIndex = Operator.operatorIndexDic[op] */ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_self->__pyx_base.children, __pyx_v_expr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 659, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":660 * self.children = [] * self.children.append(expr) * self._op = op # <<<<<<<<<<<<<< * self.operatorIndex = Operator.operatorIndexDic[op] * def __repr__(self): */ __Pyx_INCREF(__pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); __Pyx_GOTREF(__pyx_v_self->__pyx_base._op); __Pyx_DECREF(__pyx_v_self->__pyx_base._op); __pyx_v_self->__pyx_base._op = __pyx_v_op; /* "src/pyscipopt/expr.pxi":661 * self.children.append(expr) * self._op = op * self.operatorIndex = Operator.operatorIndexDic[op] # <<<<<<<<<<<<<< * def __repr__(self): * return self._op + "(" + self.children[0].__repr__() + ")" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v_self->__pyx_base.operatorIndex); __pyx_v_self->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":657 * # Exp, Log, Sqrt Expressions * cdef class UnaryExpr(GenExpr): * def __init__(self, op, expr): # <<<<<<<<<<<<<< * self.children = [] * self.children.append(expr) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.UnaryExpr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":662 * self._op = op * self.operatorIndex = Operator.operatorIndexDic[op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + self.children[0].__repr__() + ")" * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9UnaryExpr_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9UnaryExpr_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9UnaryExpr_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9UnaryExpr_2__repr__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":663 * self.operatorIndex = Operator.operatorIndexDic[op] * def __repr__(self): * return self._op + "(" + self.children[0].__repr__() + ")" # <<<<<<<<<<<<<< * * # class for constant expressions */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Add(__pyx_v_self->__pyx_base._op, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->__pyx_base.children, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_repr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_kp_u__5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":662 * self._op = op * self.operatorIndex = Operator.operatorIndexDic[op] * def __repr__(self): # <<<<<<<<<<<<<< * return self._op + "(" + self.children[0].__repr__() + ")" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.UnaryExpr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9UnaryExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9UnaryExpr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9UnaryExpr_4__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9UnaryExpr_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.operatorIndex) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base._op); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._op); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __Pyx_INCREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.operatorIndex); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.operatorIndex) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->__pyx_base.operatorIndex != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None * if use_setstate: * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_UnaryExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_195726446); __Pyx_GIVEREF(__pyx_int_195726446); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_195726446); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, None), state * else: * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_UnaryExpr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_UnaryExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_195726446); __Pyx_GIVEREF(__pyx_int_195726446); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_195726446); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.UnaryExpr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_UnaryExpr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9UnaryExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9UnaryExpr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9UnaryExpr_6__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9UnaryExpr_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_UnaryExpr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_UnaryExpr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_UnaryExpr, (type(self), 0xbaa8c6e, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_UnaryExpr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.UnaryExpr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":668 * cdef class Constant(GenExpr): * cdef public number * def __init__(self,number): # <<<<<<<<<<<<<< * self.number = number * self._op = Operator.const */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Constant_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Constant_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_number = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_number,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_number)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 668, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_number = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 668, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Constant.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant___init__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self), __pyx_v_number); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Constant___init__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self, PyObject *__pyx_v_number) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/expr.pxi":669 * cdef public number * def __init__(self,number): * self.number = number # <<<<<<<<<<<<<< * self._op = Operator.const * self.operatorIndex = Operator.operatorIndexDic[self._op] */ __Pyx_INCREF(__pyx_v_number); __Pyx_GIVEREF(__pyx_v_number); __Pyx_GOTREF(__pyx_v_self->number); __Pyx_DECREF(__pyx_v_self->number); __pyx_v_self->number = __pyx_v_number; /* "src/pyscipopt/expr.pxi":670 * def __init__(self,number): * self.number = number * self._op = Operator.const # <<<<<<<<<<<<<< * self.operatorIndex = Operator.operatorIndexDic[self._op] * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_const); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base._op); __Pyx_DECREF(__pyx_v_self->__pyx_base._op); __pyx_v_self->__pyx_base._op = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":671 * self.number = number * self._op = Operator.const * self.operatorIndex = Operator.operatorIndexDic[self._op] # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_self->__pyx_base._op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v_self->__pyx_base.operatorIndex); __pyx_v_self->__pyx_base.operatorIndex = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":668 * cdef class Constant(GenExpr): * cdef public number * def __init__(self,number): # <<<<<<<<<<<<<< * self.number = number * self._op = Operator.const */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Constant.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":673 * self.operatorIndex = Operator.operatorIndexDic[self._op] * * def __repr__(self): # <<<<<<<<<<<<<< * return str(self.number) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_2__repr__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/expr.pxi":674 * * def __repr__(self): * return str(self.number) # <<<<<<<<<<<<<< * * def exp(expr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_self->number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":673 * self.operatorIndex = Operator.operatorIndexDic[self._op] * * def __repr__(self): # <<<<<<<<<<<<<< * return str(self.number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constant.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":667 * # class for constant expressions * cdef class Constant(GenExpr): * cdef public number # <<<<<<<<<<<<<< * def __init__(self,number): * self.number = number */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_6number_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_6number_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant_6number___get__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_6number___get__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->number); __pyx_r = __pyx_v_self->number; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Constant_6number_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Constant_6number_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant_6number_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Constant_6number_2__set__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->number); __Pyx_DECREF(__pyx_v_self->number); __pyx_v_self->number = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Constant_6number_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Constant_6number_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant_6number_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Constant_6number_4__del__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->number); __Pyx_DECREF(__pyx_v_self->number); __pyx_v_self->number = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant_4__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_4__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self._op, self.children, self.number, self.operatorIndex) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base._op); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._op); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._op); __Pyx_INCREF(__pyx_v_self->__pyx_base.children); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.children); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.children); __Pyx_INCREF(__pyx_v_self->number); __Pyx_GIVEREF(__pyx_v_self->number); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->number); __Pyx_INCREF(__pyx_v_self->__pyx_base.operatorIndex); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operatorIndex); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.operatorIndex); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._op, self.children, self.number, self.operatorIndex) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self._op, self.children, self.number, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._op is not None or self.children is not None or self.number is not None or self.operatorIndex is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self._op, self.children, self.number, self.operatorIndex) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._op is not None or self.children is not None or self.number is not None or self.operatorIndex is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._op != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.children != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->number != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->__pyx_base.operatorIndex != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.number is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self._op is not None or self.children is not None or self.number is not None or self.operatorIndex is not None * if use_setstate: * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_267070241); __Pyx_GIVEREF(__pyx_int_267070241); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_267070241); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self._op is not None or self.children is not None or self.number is not None or self.operatorIndex is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, None), state * else: * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Constant__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_267070241); __Pyx_GIVEREF(__pyx_int_267070241); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_267070241); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Constant.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Constant__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Constant_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Constant_6__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Constant_6__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Constant__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Constant__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Constant, (type(self), 0xfeb2b21, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Constant__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constant.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":676 * return str(self.number) * * def exp(expr): # <<<<<<<<<<<<<< * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_11exp(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10exp[] = "returns expression with exp-function"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_11exp = {"exp", (PyCFunction)__pyx_pw_9pyscipopt_4scip_11exp, METH_O, __pyx_doc_9pyscipopt_4scip_10exp}; static PyObject *__pyx_pw_9pyscipopt_4scip_11exp(PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exp (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10exp(__pyx_self, ((PyObject *)__pyx_v_expr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exp", 0); /* "src/pyscipopt/expr.pxi":678 * def exp(expr): * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) # <<<<<<<<<<<<<< * def log(expr): * """returns expression with log-function""" */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_expr) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expr); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_UnaryExpr), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":676 * return str(self.number) * * def exp(expr): # <<<<<<<<<<<<<< * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.exp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":679 * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) * def log(expr): # <<<<<<<<<<<<<< * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_13log(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_12log[] = "returns expression with log-function"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_13log = {"log", (PyCFunction)__pyx_pw_9pyscipopt_4scip_13log, METH_O, __pyx_doc_9pyscipopt_4scip_12log}; static PyObject *__pyx_pw_9pyscipopt_4scip_13log(PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("log (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_12log(__pyx_self, ((PyObject *)__pyx_v_expr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_12log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("log", 0); /* "src/pyscipopt/expr.pxi":681 * def log(expr): * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) # <<<<<<<<<<<<<< * def sqrt(expr): * """returns expression with sqrt-function""" */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_expr) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expr); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_UnaryExpr), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":679 * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) * def log(expr): # <<<<<<<<<<<<<< * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.log", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":682 * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) * def sqrt(expr): # <<<<<<<<<<<<<< * """returns expression with sqrt-function""" * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_15sqrt(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_14sqrt[] = "returns expression with sqrt-function"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_15sqrt = {"sqrt", (PyCFunction)__pyx_pw_9pyscipopt_4scip_15sqrt, METH_O, __pyx_doc_9pyscipopt_4scip_14sqrt}; static PyObject *__pyx_pw_9pyscipopt_4scip_15sqrt(PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sqrt (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_14sqrt(__pyx_self, ((PyObject *)__pyx_v_expr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_14sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sqrt", 0); /* "src/pyscipopt/expr.pxi":684 * def sqrt(expr): * """returns expression with sqrt-function""" * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) # <<<<<<<<<<<<<< * * def expr_to_nodes(expr): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_buildGenExprObj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_expr) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expr); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pyscipopt_4scip_UnaryExpr), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":682 * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) * def sqrt(expr): # <<<<<<<<<<<<<< * """returns expression with sqrt-function""" * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":686 * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) * * def expr_to_nodes(expr): # <<<<<<<<<<<<<< * '''transforms tree to an array of nodes. each node is an operator and the position of the * children of that operator (i.e. the other nodes) in the array''' */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17expr_to_nodes(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_16expr_to_nodes[] = "transforms tree to an array of nodes. each node is an operator and the position of the \n children of that operator (i.e. the other nodes) in the array"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_17expr_to_nodes = {"expr_to_nodes", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17expr_to_nodes, METH_O, __pyx_doc_9pyscipopt_4scip_16expr_to_nodes}; static PyObject *__pyx_pw_9pyscipopt_4scip_17expr_to_nodes(PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("expr_to_nodes (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_16expr_to_nodes(__pyx_self, ((PyObject *)__pyx_v_expr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_16expr_to_nodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) { PyObject *__pyx_v_nodes = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("expr_to_nodes", 0); /* "src/pyscipopt/expr.pxi":689 * '''transforms tree to an array of nodes. each node is an operator and the position of the * children of that operator (i.e. the other nodes) in the array''' * assert isinstance(expr, GenExpr) # <<<<<<<<<<<<<< * nodes = [] * expr_to_array(expr, nodes) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_expr, __pyx_ptype_9pyscipopt_4scip_GenExpr); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 689, __pyx_L1_error) } } #endif /* "src/pyscipopt/expr.pxi":690 * children of that operator (i.e. the other nodes) in the array''' * assert isinstance(expr, GenExpr) * nodes = [] # <<<<<<<<<<<<<< * expr_to_array(expr, nodes) * return nodes */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_nodes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":691 * assert isinstance(expr, GenExpr) * nodes = [] * expr_to_array(expr, nodes) # <<<<<<<<<<<<<< * return nodes * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_expr_to_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_expr, __pyx_v_nodes}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_expr, __pyx_v_nodes}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_expr); __Pyx_GIVEREF(__pyx_v_expr); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_expr); __Pyx_INCREF(__pyx_v_nodes); __Pyx_GIVEREF(__pyx_v_nodes); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_nodes); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":692 * nodes = [] * expr_to_array(expr, nodes) * return nodes # <<<<<<<<<<<<<< * * def value_to_array(val, nodes): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_nodes); __pyx_r = __pyx_v_nodes; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":686 * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) * * def expr_to_nodes(expr): # <<<<<<<<<<<<<< * '''transforms tree to an array of nodes. each node is an operator and the position of the * children of that operator (i.e. the other nodes) in the array''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.expr_to_nodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nodes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":694 * return nodes * * def value_to_array(val, nodes): # <<<<<<<<<<<<<< * """adds a given value to an array""" * nodes.append(tuple(['const', [val]])) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_19value_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_18value_to_array[] = "adds a given value to an array"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_19value_to_array = {"value_to_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_19value_to_array, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_18value_to_array}; static PyObject *__pyx_pw_9pyscipopt_4scip_19value_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_val = 0; PyObject *__pyx_v_nodes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("value_to_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_nodes,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("value_to_array", 1, 2, 2, 1); __PYX_ERR(0, 694, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "value_to_array") < 0)) __PYX_ERR(0, 694, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_val = values[0]; __pyx_v_nodes = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("value_to_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 694, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.value_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_18value_to_array(__pyx_self, __pyx_v_val, __pyx_v_nodes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_18value_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_nodes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_to_array", 0); /* "src/pyscipopt/expr.pxi":696 * def value_to_array(val, nodes): * """adds a given value to an array""" * nodes.append(tuple(['const', [val]])) # <<<<<<<<<<<<<< * return len(nodes) - 1 * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_const); __Pyx_GIVEREF(__pyx_n_u_const); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_const); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_nodes, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":697 * """adds a given value to an array""" * nodes.append(tuple(['const', [val]])) * return len(nodes) - 1 # <<<<<<<<<<<<<< * * # there many hacky things here: value_to_array is trying to mimick */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_Length(__pyx_v_nodes); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 697, __pyx_L1_error) __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_4 - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":694 * return nodes * * def value_to_array(val, nodes): # <<<<<<<<<<<<<< * """adds a given value to an array""" * nodes.append(tuple(['const', [val]])) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.value_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/expr.pxi":704 * # also, for sums, we are not considering coefficients, because basically all coefficients are 1 * # haven't even consider substractions, but I guess we would interpret them as a - b = a + (-1) * b * def expr_to_array(expr, nodes): # <<<<<<<<<<<<<< * """adds expression to array""" * op = expr._op */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_21expr_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_20expr_to_array[] = "adds expression to array"; static PyMethodDef __pyx_mdef_9pyscipopt_4scip_21expr_to_array = {"expr_to_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_21expr_to_array, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_20expr_to_array}; static PyObject *__pyx_pw_9pyscipopt_4scip_21expr_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_expr = 0; PyObject *__pyx_v_nodes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("expr_to_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_nodes,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("expr_to_array", 1, 2, 2, 1); __PYX_ERR(0, 704, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "expr_to_array") < 0)) __PYX_ERR(0, 704, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_expr = values[0]; __pyx_v_nodes = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("expr_to_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.expr_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_20expr_to_array(__pyx_self, __pyx_v_expr, __pyx_v_nodes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_20expr_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_nodes) { PyObject *__pyx_v_op = NULL; PyObject *__pyx_v_indices = NULL; CYTHON_UNUSED Py_ssize_t __pyx_v_nchildren; PyObject *__pyx_v_child = NULL; PyObject *__pyx_v_pos = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("expr_to_array", 0); /* "src/pyscipopt/expr.pxi":706 * def expr_to_array(expr, nodes): * """adds expression to array""" * op = expr._op # <<<<<<<<<<<<<< * if op == Operator.const: # FIXME: constant expr should also have children! * nodes.append(tuple([op, [expr.number]])) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_op_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_op = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":707 * """adds expression to array""" * op = expr._op * if op == Operator.const: # FIXME: constant expr should also have children! # <<<<<<<<<<<<<< * nodes.append(tuple([op, [expr.number]])) * elif op != Operator.varidx: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_const); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_op, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":708 * op = expr._op * if op == Operator.const: # FIXME: constant expr should also have children! * nodes.append(tuple([op, [expr.number]])) # <<<<<<<<<<<<<< * elif op != Operator.varidx: * indices = [] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_op); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_nodes, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":707 * """adds expression to array""" * op = expr._op * if op == Operator.const: # FIXME: constant expr should also have children! # <<<<<<<<<<<<<< * nodes.append(tuple([op, [expr.number]])) * elif op != Operator.varidx: */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":709 * if op == Operator.const: # FIXME: constant expr should also have children! * nodes.append(tuple([op, [expr.number]])) * elif op != Operator.varidx: # <<<<<<<<<<<<<< * indices = [] * nchildren = len(expr.children) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_varidx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_op, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":710 * nodes.append(tuple([op, [expr.number]])) * elif op != Operator.varidx: * indices = [] # <<<<<<<<<<<<<< * nchildren = len(expr.children) * for child in expr.children: */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_indices = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":711 * elif op != Operator.varidx: * indices = [] * nchildren = len(expr.children) # <<<<<<<<<<<<<< * for child in expr.children: * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nchildren = __pyx_t_5; /* "src/pyscipopt/expr.pxi":712 * indices = [] * nchildren = len(expr.children) * for child in expr.children: # <<<<<<<<<<<<<< * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' * indices.append(pos) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 712, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 712, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 712, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":713 * nchildren = len(expr.children) * for child in expr.children: * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' # <<<<<<<<<<<<<< * indices.append(pos) * if op == Operator.power: */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_expr_to_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_child, __pyx_v_nodes}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_child, __pyx_v_nodes}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_child); __Pyx_GIVEREF(__pyx_v_child); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_child); __Pyx_INCREF(__pyx_v_nodes); __Pyx_GIVEREF(__pyx_v_nodes); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_nodes); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":714 * for child in expr.children: * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' * indices.append(pos) # <<<<<<<<<<<<<< * if op == Operator.power: * pos = value_to_array(expr.expo, nodes) */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_indices, __pyx_v_pos); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 714, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":712 * indices = [] * nchildren = len(expr.children) * for child in expr.children: # <<<<<<<<<<<<<< * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' * indices.append(pos) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":715 * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' * indices.append(pos) * if op == Operator.power: # <<<<<<<<<<<<<< * pos = value_to_array(expr.expo, nodes) * indices.append(pos) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_power); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_op, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":716 * indices.append(pos) * if op == Operator.power: * pos = value_to_array(expr.expo, nodes) # <<<<<<<<<<<<<< * indices.append(pos) * elif (op == Operator.add and expr.constant != 0.0) or (op == Operator.prod and expr.constant != 1.0): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_value_to_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_expo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_v_nodes}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_v_nodes}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_v_nodes); __Pyx_GIVEREF(__pyx_v_nodes); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_v_nodes); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":717 * if op == Operator.power: * pos = value_to_array(expr.expo, nodes) * indices.append(pos) # <<<<<<<<<<<<<< * elif (op == Operator.add and expr.constant != 0.0) or (op == Operator.prod and expr.constant != 1.0): * pos = value_to_array(expr.constant, nodes) */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_indices, __pyx_v_pos); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 717, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":715 * pos = expr_to_array(child, nodes) # position of child in the final array of nodes, 'nodes' * indices.append(pos) * if op == Operator.power: # <<<<<<<<<<<<<< * pos = value_to_array(expr.expo, nodes) * indices.append(pos) */ goto __pyx_L6; } /* "src/pyscipopt/expr.pxi":718 * pos = value_to_array(expr.expo, nodes) * indices.append(pos) * elif (op == Operator.add and expr.constant != 0.0) or (op == Operator.prod and expr.constant != 1.0): # <<<<<<<<<<<<<< * pos = value_to_array(expr.constant, nodes) * indices.append(pos) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_op, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_11) { goto __pyx_L8_next_or; } else { } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyFloat_NeObjC(__pyx_t_1, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_11) { } else { __pyx_t_3 = __pyx_t_11; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_or:; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_op, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_11) { } else { __pyx_t_3 = __pyx_t_11; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyFloat_NeObjC(__pyx_t_2, __pyx_float_1_0, 1.0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_11; __pyx_L7_bool_binop_done:; if (__pyx_t_3) { /* "src/pyscipopt/expr.pxi":719 * indices.append(pos) * elif (op == Operator.add and expr.constant != 0.0) or (op == Operator.prod and expr.constant != 1.0): * pos = value_to_array(expr.constant, nodes) # <<<<<<<<<<<<<< * indices.append(pos) * nodes.append( tuple( [op, indices] ) ) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_value_to_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_v_nodes}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_v_nodes}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_8); __Pyx_INCREF(__pyx_v_nodes); __Pyx_GIVEREF(__pyx_v_nodes); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_nodes); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":720 * elif (op == Operator.add and expr.constant != 0.0) or (op == Operator.prod and expr.constant != 1.0): * pos = value_to_array(expr.constant, nodes) * indices.append(pos) # <<<<<<<<<<<<<< * nodes.append( tuple( [op, indices] ) ) * else: # var */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_indices, __pyx_v_pos); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 720, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":718 * pos = value_to_array(expr.expo, nodes) * indices.append(pos) * elif (op == Operator.add and expr.constant != 0.0) or (op == Operator.prod and expr.constant != 1.0): # <<<<<<<<<<<<<< * pos = value_to_array(expr.constant, nodes) * indices.append(pos) */ } __pyx_L6:; /* "src/pyscipopt/expr.pxi":721 * pos = value_to_array(expr.constant, nodes) * indices.append(pos) * nodes.append( tuple( [op, indices] ) ) # <<<<<<<<<<<<<< * else: # var * nodes.append( tuple( [op, expr.children] ) ) */ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_op); __Pyx_INCREF(__pyx_v_indices); __Pyx_GIVEREF(__pyx_v_indices); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_indices); __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_nodes, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":709 * if op == Operator.const: # FIXME: constant expr should also have children! * nodes.append(tuple([op, [expr.number]])) * elif op != Operator.varidx: # <<<<<<<<<<<<<< * indices = [] * nchildren = len(expr.children) */ goto __pyx_L3; } /* "src/pyscipopt/expr.pxi":723 * nodes.append( tuple( [op, indices] ) ) * else: # var * nodes.append( tuple( [op, expr.children] ) ) # <<<<<<<<<<<<<< * return len(nodes) - 1 */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_op); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_nodes, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "src/pyscipopt/expr.pxi":724 * else: # var * nodes.append( tuple( [op, expr.children] ) ) * return len(nodes) - 1 # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyObject_Length(__pyx_v_nodes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 724, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_5 - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/expr.pxi":704 * # also, for sums, we are not considering coefficients, because basically all coefficients are 1 * # haven't even consider substractions, but I guess we would interpret them as a - b = a + (-1) * b * def expr_to_array(expr, nodes): # <<<<<<<<<<<<<< * """adds expression to array""" * op = expr._op */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.expr_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_op); __Pyx_XDECREF(__pyx_v_indices); __Pyx_XDECREF(__pyx_v_child); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":7 * cdef readonly str name * * def __init__(self, name="LP", sense="minimize"): # <<<<<<<<<<<<<< * """ * Keyword arguments: */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_2LP_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP___init__[] = "\n Keyword arguments:\n name -- the name of the problem (default 'LP')\n sense -- objective sense (default minimize)\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_9pyscipopt_4scip_2LP___init__; #endif static int __pyx_pw_9pyscipopt_4scip_2LP_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_sense = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_sense,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_n_u_LP); values[1] = ((PyObject *)__pyx_n_u_minimize); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sense); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = values[0]; __pyx_v_sense = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP___init__(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_name, __pyx_v_sense); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_2LP___init__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_sense) { PyObject *__pyx_v_n = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; char const *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "src/pyscipopt/lp.pxi":13 * sense -- objective sense (default minimize) * """ * self.name = name # <<<<<<<<<<<<<< * n = str_conversion(name) * if sense == "minimize": */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 13, __pyx_L1_error) __pyx_t_1 = __pyx_v_name; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":14 * """ * self.name = name * n = str_conversion(name) # <<<<<<<<<<<<<< * if sense == "minimize": * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":15 * self.name = name * n = str_conversion(name) * if sense == "minimize": # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) * elif sense == "maximize": */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_sense, __pyx_n_u_minimize, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 15, __pyx_L1_error) if (__pyx_t_4) { /* "src/pyscipopt/lp.pxi":16 * n = str_conversion(name) * if sense == "minimize": * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) # <<<<<<<<<<<<<< * elif sense == "maximize": * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MAXIMIZE)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiCreate((&__pyx_v_self->lpi), NULL, __pyx_t_5, SCIP_OBJSENSE_MINIMIZE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":15 * self.name = name * n = str_conversion(name) * if sense == "minimize": # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) * elif sense == "maximize": */ goto __pyx_L3; } /* "src/pyscipopt/lp.pxi":17 * if sense == "minimize": * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) * elif sense == "maximize": # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MAXIMIZE)) * else: */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_sense, __pyx_n_u_maximize, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 17, __pyx_L1_error) if (likely(__pyx_t_4)) { /* "src/pyscipopt/lp.pxi":18 * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) * elif sense == "maximize": * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MAXIMIZE)) # <<<<<<<<<<<<<< * else: * raise Warning("unrecognized objective sense") */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 18, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiCreate((&__pyx_v_self->lpi), NULL, __pyx_t_5, SCIP_OBJSENSE_MAXIMIZE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":17 * if sense == "minimize": * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MINIMIZE)) * elif sense == "maximize": # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MAXIMIZE)) * else: */ goto __pyx_L3; } /* "src/pyscipopt/lp.pxi":20 * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MAXIMIZE)) * else: * raise Warning("unrecognized objective sense") # <<<<<<<<<<<<<< * * def __dealloc__(self): */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 20, __pyx_L1_error) } __pyx_L3:; /* "src/pyscipopt/lp.pxi":7 * cdef readonly str name * * def __init__(self, name="LP", sense="minimize"): # <<<<<<<<<<<<<< * """ * Keyword arguments: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":22 * raise Warning("unrecognized objective sense") * * def __dealloc__(self): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiFree(&(self.lpi))) * */ /* Python wrapper */ static void __pyx_pw_9pyscipopt_4scip_2LP_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_9pyscipopt_4scip_2LP_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_9pyscipopt_4scip_2LP_2__dealloc__(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_9pyscipopt_4scip_2LP_2__dealloc__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "src/pyscipopt/lp.pxi":23 * * def __dealloc__(self): * PY_SCIP_CALL(SCIPlpiFree(&(self.lpi))) # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiFree((&__pyx_v_self->lpi))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":22 * raise Warning("unrecognized objective sense") * * def __dealloc__(self): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiFree(&(self.lpi))) * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.LP.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "src/pyscipopt/lp.pxi":25 * PY_SCIP_CALL(SCIPlpiFree(&(self.lpi))) * * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_4__repr__(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_4__repr__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 0); /* "src/pyscipopt/lp.pxi":26 * * def __repr__(self): * return self.name # <<<<<<<<<<<<<< * * def writeLP(self, filename): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":25 * PY_SCIP_CALL(SCIPlpiFree(&(self.lpi))) * * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":28 * return self.name * * def writeLP(self, filename): # <<<<<<<<<<<<<< * """Writes LP to a file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_7writeLP(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_6writeLP[] = "Writes LP to a file.\n\n Keyword arguments:\n filename -- the name of the file to be used\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_7writeLP(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeLP (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_6writeLP(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), ((PyObject *)__pyx_v_filename)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_6writeLP(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char const *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeLP", 0); /* "src/pyscipopt/lp.pxi":34 * filename -- the name of the file to be used * """ * PY_SCIP_CALL(SCIPlpiWriteLP(self.lpi, filename)) # <<<<<<<<<<<<<< * * def readLP(self, filename): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 34, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiWriteLP(__pyx_v_self->lpi, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":28 * return self.name * * def writeLP(self, filename): # <<<<<<<<<<<<<< * """Writes LP to a file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.writeLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":36 * PY_SCIP_CALL(SCIPlpiWriteLP(self.lpi, filename)) * * def readLP(self, filename): # <<<<<<<<<<<<<< * """Reads LP from a file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_9readLP(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_8readLP[] = "Reads LP from a file.\n\n Keyword arguments:\n filename -- the name of the file to be used\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_9readLP(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readLP (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_8readLP(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), ((PyObject *)__pyx_v_filename)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_8readLP(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char const *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readLP", 0); /* "src/pyscipopt/lp.pxi":42 * filename -- the name of the file to be used * """ * PY_SCIP_CALL(SCIPlpiReadLP(self.lpi, filename)) # <<<<<<<<<<<<<< * * def infinity(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 42, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiReadLP(__pyx_v_self->lpi, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":36 * PY_SCIP_CALL(SCIPlpiWriteLP(self.lpi, filename)) * * def readLP(self, filename): # <<<<<<<<<<<<<< * """Reads LP from a file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.readLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":44 * PY_SCIP_CALL(SCIPlpiReadLP(self.lpi, filename)) * * def infinity(self): # <<<<<<<<<<<<<< * """Returns infinity value of the LP. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_11infinity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_10infinity[] = "Returns infinity value of the LP.\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_11infinity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infinity (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_10infinity(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_10infinity(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infinity", 0); /* "src/pyscipopt/lp.pxi":47 * """Returns infinity value of the LP. * """ * return SCIPlpiInfinity(self.lpi) # <<<<<<<<<<<<<< * * def isInfinity(self, val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPlpiInfinity(__pyx_v_self->lpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":44 * PY_SCIP_CALL(SCIPlpiReadLP(self.lpi, filename)) * * def infinity(self): # <<<<<<<<<<<<<< * """Returns infinity value of the LP. * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.LP.infinity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":49 * return SCIPlpiInfinity(self.lpi) * * def isInfinity(self, val): # <<<<<<<<<<<<<< * """Checks if a given value is equal to the infinity value of the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_13isInfinity(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_12isInfinity[] = "Checks if a given value is equal to the infinity value of the LP.\n\n Keyword arguments:\n val -- value that should be checked\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_13isInfinity(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isInfinity (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_12isInfinity(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_12isInfinity(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isInfinity", 0); /* "src/pyscipopt/lp.pxi":55 * val -- value that should be checked * """ * return SCIPlpiIsInfinity(self.lpi, val) # <<<<<<<<<<<<<< * * def addCol(self, entries, obj = 0.0, lb = 0.0, ub = None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 55, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPlpiIsInfinity(__pyx_v_self->lpi, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":49 * return SCIPlpiInfinity(self.lpi) * * def isInfinity(self, val): # <<<<<<<<<<<<<< * """Checks if a given value is equal to the infinity value of the LP. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.LP.isInfinity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":57 * return SCIPlpiIsInfinity(self.lpi, val) * * def addCol(self, entries, obj = 0.0, lb = 0.0, ub = None): # <<<<<<<<<<<<<< * """Adds a single column to the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_15addCol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_14addCol[] = "Adds a single column to the LP.\n\n Keyword arguments:\n entries -- list of tuples, each tuple consists of a row index and a coefficient\n obj -- objective coefficient (default 0.0)\n lb -- lower bound (default 0.0)\n ub -- upper bound (default infinity)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_15addCol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_entries = 0; PyObject *__pyx_v_obj = 0; PyObject *__pyx_v_lb = 0; PyObject *__pyx_v_ub = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addCol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entries,&__pyx_n_s_obj,&__pyx_n_s_lb,&__pyx_n_s_ub,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)__pyx_float_0_0); values[2] = ((PyObject *)__pyx_float_0_0); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entries)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCol") < 0)) __PYX_ERR(1, 57, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_entries = values[0]; __pyx_v_obj = values[1]; __pyx_v_lb = values[2]; __pyx_v_ub = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addCol", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 57, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.addCol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_14addCol(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_entries, __pyx_v_obj, __pyx_v_lb, __pyx_v_ub); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_14addCol(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entries, PyObject *__pyx_v_obj, PyObject *__pyx_v_lb, PyObject *__pyx_v_ub) { PyObject *__pyx_v_nnonz = NULL; SCIP_Real *__pyx_v_c_coefs; int *__pyx_v_c_inds; SCIP_Real __pyx_v_c_obj; SCIP_Real __pyx_v_c_lb; SCIP_Real __pyx_v_c_ub; int __pyx_v_c_beg; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_entry = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; SCIP_Real __pyx_t_5; int __pyx_t_6; SCIP_Real __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addCol", 0); /* "src/pyscipopt/lp.pxi":66 * ub -- upper bound (default infinity) * """ * nnonz = len(entries) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) */ __pyx_t_1 = PyObject_Length(__pyx_v_entries); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 66, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_nnonz = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":68 * nnonz = len(entries) * * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) * cdef SCIP_Real c_obj */ __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_coefs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":69 * * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) # <<<<<<<<<<<<<< * cdef SCIP_Real c_obj * cdef SCIP_Real c_lb */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c_inds = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":75 * cdef int c_beg * * c_obj = obj # <<<<<<<<<<<<<< * c_lb = lb * c_ub = ub if ub != None else self.infinity() */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 75, __pyx_L1_error) __pyx_v_c_obj = __pyx_t_5; /* "src/pyscipopt/lp.pxi":76 * * c_obj = obj * c_lb = lb # <<<<<<<<<<<<<< * c_ub = ub if ub != None else self.infinity() * c_beg = 0 */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L1_error) __pyx_v_c_lb = __pyx_t_5; /* "src/pyscipopt/lp.pxi":77 * c_obj = obj * c_lb = lb * c_ub = ub if ub != None else self.infinity() # <<<<<<<<<<<<<< * c_beg = 0 * */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_ub, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 77, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 77, __pyx_L1_error) __pyx_t_5 = __pyx_t_7; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_7; } __pyx_v_c_ub = __pyx_t_5; /* "src/pyscipopt/lp.pxi":78 * c_lb = lb * c_ub = ub if ub != None else self.infinity() * c_beg = 0 # <<<<<<<<<<<<<< * * for i,entry in enumerate(entries): */ __pyx_v_c_beg = 0; /* "src/pyscipopt/lp.pxi":80 * c_beg = 0 * * for i,entry in enumerate(entries): # <<<<<<<<<<<<<< * c_inds[i] = entry[0] * c_coefs[i] = entry[1] */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_entries)) || PyTuple_CheckExact(__pyx_v_entries)) { __pyx_t_3 = __pyx_v_entries; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_9 = NULL; } else { __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 80, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 80, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 80, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 80, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_8; __pyx_t_8 = 0; /* "src/pyscipopt/lp.pxi":81 * * for i,entry in enumerate(entries): * c_inds[i] = entry[0] # <<<<<<<<<<<<<< * c_coefs[i] = entry[1] * */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_entry, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 81, __pyx_L1_error) (__pyx_v_c_inds[__pyx_t_11]) = __pyx_t_10; /* "src/pyscipopt/lp.pxi":82 * for i,entry in enumerate(entries): * c_inds[i] = entry[0] * c_coefs[i] = entry[1] # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, 1, &c_obj, &c_lb, &c_ub, NULL, nnonz, &c_beg, c_inds, c_coefs)) */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 82, __pyx_L1_error) (__pyx_v_c_coefs[__pyx_t_11]) = __pyx_t_5; /* "src/pyscipopt/lp.pxi":80 * c_beg = 0 * * for i,entry in enumerate(entries): # <<<<<<<<<<<<<< * c_inds[i] = entry[0] * c_coefs[i] = entry[1] */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":84 * c_coefs[i] = entry[1] * * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, 1, &c_obj, &c_lb, &c_ub, NULL, nnonz, &c_beg, c_inds, c_coefs)) # <<<<<<<<<<<<<< * * free(c_coefs) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_nnonz); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 84, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiAddCols(__pyx_v_self->lpi, 1, (&__pyx_v_c_obj), (&__pyx_v_c_lb), (&__pyx_v_c_ub), NULL, __pyx_t_10, (&__pyx_v_c_beg), __pyx_v_c_inds, __pyx_v_c_coefs)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":86 * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, 1, &c_obj, &c_lb, &c_ub, NULL, nnonz, &c_beg, c_inds, c_coefs)) * * free(c_coefs) # <<<<<<<<<<<<<< * free(c_inds) * */ free(__pyx_v_c_coefs); /* "src/pyscipopt/lp.pxi":87 * * free(c_coefs) * free(c_inds) # <<<<<<<<<<<<<< * * def addCols(self, entrieslist, objs = None, lbs = None, ubs = None): */ free(__pyx_v_c_inds); /* "src/pyscipopt/lp.pxi":57 * return SCIPlpiIsInfinity(self.lpi, val) * * def addCol(self, entries, obj = 0.0, lb = 0.0, ub = None): # <<<<<<<<<<<<<< * """Adds a single column to the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pyscipopt.scip.LP.addCol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nnonz); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_entry); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":89 * free(c_inds) * * def addCols(self, entrieslist, objs = None, lbs = None, ubs = None): # <<<<<<<<<<<<<< * """Adds multiple columns to the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_17addCols(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_16addCols[] = "Adds multiple columns to the LP.\n\n Keyword arguments:\n entrieslist -- list containing lists of tuples, each tuple contains a coefficient and a row index\n objs -- objective coefficient (default 0.0)\n lbs -- lower bounds (default 0.0)\n ubs -- upper bounds (default infinity)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_17addCols(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_entrieslist = 0; PyObject *__pyx_v_objs = 0; PyObject *__pyx_v_lbs = 0; PyObject *__pyx_v_ubs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addCols (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entrieslist,&__pyx_n_s_objs,&__pyx_n_s_lbs,&__pyx_n_s_ubs,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entrieslist)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_objs); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lbs); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ubs); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCols") < 0)) __PYX_ERR(1, 89, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_entrieslist = values[0]; __pyx_v_objs = values[1]; __pyx_v_lbs = values[2]; __pyx_v_ubs = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addCols", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 89, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.addCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_16addCols(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_entrieslist, __pyx_v_objs, __pyx_v_lbs, __pyx_v_ubs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_2LP_7addCols_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/pyscipopt/lp.pxi":100 * * ncols = len(entrieslist) * nnonz = sum(len(entries) for entries in entrieslist) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_objs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_7addCols_genexpr(PyObject *__pyx_self) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_5_genexpr(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 100, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pyscipopt_4scip_2LP_7addCols_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_addCols_locals_genexpr, __pyx_n_s_pyscipopt_scip); if (unlikely(!gen)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.addCols.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_2LP_7addCols_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 100, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist)) { __Pyx_RaiseClosureNameError("entrieslist"); __PYX_ERR(1, 100, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 100, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 100, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 100, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 100, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_entries); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_entries, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_entries); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 100, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":89 * free(c_inds) * * def addCols(self, entrieslist, objs = None, lbs = None, ubs = None): # <<<<<<<<<<<<<< * """Adds multiple columns to the LP. * */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_16addCols(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entrieslist, PyObject *__pyx_v_objs, PyObject *__pyx_v_lbs, PyObject *__pyx_v_ubs) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *__pyx_cur_scope; PyObject *__pyx_v_ncols = NULL; PyObject *__pyx_v_nnonz = NULL; SCIP_Real *__pyx_v_c_objs; SCIP_Real *__pyx_v_c_lbs; SCIP_Real *__pyx_v_c_ubs; SCIP_Real *__pyx_v_c_coefs; int *__pyx_v_c_inds; int *__pyx_v_c_beg; PyObject *__pyx_v_tmp = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_entries = NULL; PyObject *__pyx_v_entry = NULL; PyObject *__pyx_gb_9pyscipopt_4scip_2LP_7addCols_2generator2 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; SCIP_Real __pyx_t_8; SCIP_Real __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addCols", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_4_addCols(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_4_addCols, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 89, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_entrieslist = __pyx_v_entrieslist; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_entrieslist); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_entrieslist); /* "src/pyscipopt/lp.pxi":99 * """ * * ncols = len(entrieslist) # <<<<<<<<<<<<<< * nnonz = sum(len(entries) for entries in entrieslist) * */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ncols = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":100 * * ncols = len(entrieslist) * nnonz = sum(len(entries) for entries in entrieslist) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_objs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ __pyx_t_1 = __pyx_pf_9pyscipopt_4scip_2LP_7addCols_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nnonz = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":102 * nnonz = sum(len(entries) for entries in entrieslist) * * cdef SCIP_Real* c_objs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_objs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":103 * * cdef SCIP_Real* c_objs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_coefs */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_lbs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":104 * cdef SCIP_Real* c_objs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_coefs * cdef int* c_inds */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_ubs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":110 * * * if nnonz > 0: # <<<<<<<<<<<<<< * c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * c_inds = <int*>malloc(nnonz * sizeof(int)) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_nnonz, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "src/pyscipopt/lp.pxi":111 * * if nnonz > 0: * c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * c_inds = <int*>malloc(nnonz * sizeof(int)) * c_beg = <int*>malloc(ncols * sizeof(int)) */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_coefs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":112 * if nnonz > 0: * c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * c_inds = <int*>malloc(nnonz * sizeof(int)) # <<<<<<<<<<<<<< * c_beg = <int*>malloc(ncols * sizeof(int)) * */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_inds = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":113 * c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * c_inds = <int*>malloc(nnonz * sizeof(int)) * c_beg = <int*>malloc(ncols * sizeof(int)) # <<<<<<<<<<<<<< * * tmp = 0 */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_beg = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":115 * c_beg = <int*>malloc(ncols * sizeof(int)) * * tmp = 0 # <<<<<<<<<<<<<< * for i,entries in enumerate(entrieslist): * c_objs[i] = objs[i] if objs != None else 0.0 */ __Pyx_INCREF(__pyx_int_0); __pyx_v_tmp = __pyx_int_0; /* "src/pyscipopt/lp.pxi":116 * * tmp = 0 * for i,entries in enumerate(entrieslist): # <<<<<<<<<<<<<< * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_entrieslist)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_entrieslist)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_6 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_entrieslist); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 116, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 116, __pyx_L1_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 116, __pyx_L1_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } } else { __pyx_t_7 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 116, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XDECREF_SET(__pyx_v_entries, __pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_7; __pyx_t_7 = 0; /* "src/pyscipopt/lp.pxi":117 * tmp = 0 * for i,entries in enumerate(entrieslist): * c_objs[i] = objs[i] if objs != None else 0.0 # <<<<<<<<<<<<<< * c_lbs[i] = lbs[i] if lbs != None else 0.0 * c_ubs[i] = ubs[i] if ubs != None else self.infinity() */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_objs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 117, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_objs, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __pyx_t_9; } else { __pyx_t_8 = 0.0; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 117, __pyx_L1_error) (__pyx_v_c_objs[__pyx_t_10]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":118 * for i,entries in enumerate(entrieslist): * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 # <<<<<<<<<<<<<< * c_ubs[i] = ubs[i] if ubs != None else self.infinity() * c_beg[i] = tmp */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_lbs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 118, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_lbs, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __pyx_t_9; } else { __pyx_t_8 = 0.0; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 118, __pyx_L1_error) (__pyx_v_c_lbs[__pyx_t_10]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":119 * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 * c_ubs[i] = ubs[i] if ubs != None else self.infinity() # <<<<<<<<<<<<<< * c_beg[i] = tmp * */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_ubs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 119, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_ubs, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __pyx_t_9; } else { __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_infinity); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } __pyx_t_7 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __pyx_t_9; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 119, __pyx_L1_error) (__pyx_v_c_ubs[__pyx_t_10]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":120 * c_lbs[i] = lbs[i] if lbs != None else 0.0 * c_ubs[i] = ubs[i] if ubs != None else self.infinity() * c_beg[i] = tmp # <<<<<<<<<<<<<< * * for entry in entries: */ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_tmp); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 120, __pyx_L1_error) __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 120, __pyx_L1_error) (__pyx_v_c_beg[__pyx_t_10]) = __pyx_t_13; /* "src/pyscipopt/lp.pxi":122 * c_beg[i] = tmp * * for entry in entries: # <<<<<<<<<<<<<< * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] */ if (likely(PyList_CheckExact(__pyx_v_entries)) || PyTuple_CheckExact(__pyx_v_entries)) { __pyx_t_7 = __pyx_v_entries; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0; __pyx_t_14 = NULL; } else { __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 122, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 122, __pyx_L1_error) #else __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 122, __pyx_L1_error) #else __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif } } else { __pyx_t_11 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 122, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_11); __pyx_t_11 = 0; /* "src/pyscipopt/lp.pxi":123 * * for entry in entries: * c_inds[tmp] = entry[0] # <<<<<<<<<<<<<< * c_coefs[tmp] = entry[1] * tmp += 1 */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tmp); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L1_error) (__pyx_v_c_inds[__pyx_t_15]) = __pyx_t_13; /* "src/pyscipopt/lp.pxi":124 * for entry in entries: * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] # <<<<<<<<<<<<<< * tmp += 1 * */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tmp); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 124, __pyx_L1_error) (__pyx_v_c_coefs[__pyx_t_15]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":125 * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] * tmp += 1 # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, ncols, c_objs, c_lbs, c_ubs, NULL, nnonz, c_beg, c_inds, c_coefs)) */ __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_v_tmp, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF_SET(__pyx_v_tmp, __pyx_t_11); __pyx_t_11 = 0; /* "src/pyscipopt/lp.pxi":122 * c_beg[i] = tmp * * for entry in entries: # <<<<<<<<<<<<<< * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/pyscipopt/lp.pxi":116 * * tmp = 0 * for i,entries in enumerate(entrieslist): # <<<<<<<<<<<<<< * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":127 * tmp += 1 * * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, ncols, c_objs, c_lbs, c_ubs, NULL, nnonz, c_beg, c_inds, c_coefs)) # <<<<<<<<<<<<<< * * free(c_beg) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_ncols); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 127, __pyx_L1_error) __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_nnonz); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 127, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiAddCols(__pyx_v_self->lpi, __pyx_t_13, __pyx_v_c_objs, __pyx_v_c_lbs, __pyx_v_c_ubs, NULL, __pyx_t_16, __pyx_v_c_beg, __pyx_v_c_inds, __pyx_v_c_coefs)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":129 * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, ncols, c_objs, c_lbs, c_ubs, NULL, nnonz, c_beg, c_inds, c_coefs)) * * free(c_beg) # <<<<<<<<<<<<<< * free(c_inds) * free(c_coefs) */ free(__pyx_v_c_beg); /* "src/pyscipopt/lp.pxi":130 * * free(c_beg) * free(c_inds) # <<<<<<<<<<<<<< * free(c_coefs) * else: */ free(__pyx_v_c_inds); /* "src/pyscipopt/lp.pxi":131 * free(c_beg) * free(c_inds) * free(c_coefs) # <<<<<<<<<<<<<< * else: * for i in range(len(entrieslist)): */ free(__pyx_v_c_coefs); /* "src/pyscipopt/lp.pxi":110 * * * if nnonz > 0: # <<<<<<<<<<<<<< * c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * c_inds = <int*>malloc(nnonz * sizeof(int)) */ goto __pyx_L3; } /* "src/pyscipopt/lp.pxi":133 * free(c_coefs) * else: * for i in range(len(entrieslist)): # <<<<<<<<<<<<<< * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 */ /*else*/ { __pyx_t_3 = __pyx_cur_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_6 = NULL; } else { __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 133, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 133, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 133, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 133, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":134 * else: * for i in range(len(entrieslist)): * c_objs[i] = objs[i] if objs != None else 0.0 # <<<<<<<<<<<<<< * c_lbs[i] = lbs[i] if lbs != None else 0.0 * c_ubs[i] = ubs[i] if ubs != None else self.infinity() */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_objs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 134, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_objs, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; } else { __pyx_t_8 = 0.0; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 134, __pyx_L1_error) (__pyx_v_c_objs[__pyx_t_10]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":135 * for i in range(len(entrieslist)): * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 # <<<<<<<<<<<<<< * c_ubs[i] = ubs[i] if ubs != None else self.infinity() * */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_lbs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 135, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_lbs, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; } else { __pyx_t_8 = 0.0; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 135, __pyx_L1_error) (__pyx_v_c_lbs[__pyx_t_10]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":136 * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 * c_ubs[i] = ubs[i] if ubs != None else self.infinity() # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, ncols, c_objs, c_lbs, c_ubs, NULL, 0, NULL, NULL, NULL)) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_ubs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 136, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_ubs, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; } else { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_infinity); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 136, __pyx_L1_error) (__pyx_v_c_ubs[__pyx_t_10]) = __pyx_t_8; /* "src/pyscipopt/lp.pxi":133 * free(c_coefs) * else: * for i in range(len(entrieslist)): # <<<<<<<<<<<<<< * c_objs[i] = objs[i] if objs != None else 0.0 * c_lbs[i] = lbs[i] if lbs != None else 0.0 */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":138 * c_ubs[i] = ubs[i] if ubs != None else self.infinity() * * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, ncols, c_objs, c_lbs, c_ubs, NULL, 0, NULL, NULL, NULL)) # <<<<<<<<<<<<<< * * free(c_ubs) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_ncols); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 138, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiAddCols(__pyx_v_self->lpi, __pyx_t_16, __pyx_v_c_objs, __pyx_v_c_lbs, __pyx_v_c_ubs, NULL, 0, NULL, NULL, NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "src/pyscipopt/lp.pxi":140 * PY_SCIP_CALL(SCIPlpiAddCols(self.lpi, ncols, c_objs, c_lbs, c_ubs, NULL, 0, NULL, NULL, NULL)) * * free(c_ubs) # <<<<<<<<<<<<<< * free(c_lbs) * free(c_objs) */ free(__pyx_v_c_ubs); /* "src/pyscipopt/lp.pxi":141 * * free(c_ubs) * free(c_lbs) # <<<<<<<<<<<<<< * free(c_objs) * */ free(__pyx_v_c_lbs); /* "src/pyscipopt/lp.pxi":142 * free(c_ubs) * free(c_lbs) * free(c_objs) # <<<<<<<<<<<<<< * * def delCols(self, firstcol, lastcol): */ free(__pyx_v_c_objs); /* "src/pyscipopt/lp.pxi":89 * free(c_inds) * * def addCols(self, entrieslist, objs = None, lbs = None, ubs = None): # <<<<<<<<<<<<<< * """Adds multiple columns to the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pyscipopt.scip.LP.addCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ncols); __Pyx_XDECREF(__pyx_v_nnonz); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_entries); __Pyx_XDECREF(__pyx_v_entry); __Pyx_XDECREF(__pyx_gb_9pyscipopt_4scip_2LP_7addCols_2generator2); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":144 * free(c_objs) * * def delCols(self, firstcol, lastcol): # <<<<<<<<<<<<<< * """Deletes a range of columns from the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_19delCols(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_18delCols[] = "Deletes a range of columns from the LP.\n\n Keyword arguments:\n firstcol -- first column to delete\n lastcol -- last column to delete\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_19delCols(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_firstcol = 0; PyObject *__pyx_v_lastcol = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delCols (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_firstcol,&__pyx_n_s_lastcol,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstcol)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lastcol)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("delCols", 1, 2, 2, 1); __PYX_ERR(1, 144, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delCols") < 0)) __PYX_ERR(1, 144, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_firstcol = values[0]; __pyx_v_lastcol = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("delCols", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 144, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.delCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_18delCols(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_firstcol, __pyx_v_lastcol); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_18delCols(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstcol, PyObject *__pyx_v_lastcol) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delCols", 0); /* "src/pyscipopt/lp.pxi":151 * lastcol -- last column to delete * """ * PY_SCIP_CALL(SCIPlpiDelCols(self.lpi, firstcol, lastcol)) # <<<<<<<<<<<<<< * * def addRow(self, entries, lhs=0.0, rhs=None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_firstcol); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_lastcol); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiDelCols(__pyx_v_self->lpi, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":144 * free(c_objs) * * def delCols(self, firstcol, lastcol): # <<<<<<<<<<<<<< * """Deletes a range of columns from the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.delCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":153 * PY_SCIP_CALL(SCIPlpiDelCols(self.lpi, firstcol, lastcol)) * * def addRow(self, entries, lhs=0.0, rhs=None): # <<<<<<<<<<<<<< * """Adds a single row to the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_21addRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_20addRow[] = "Adds a single row to the LP.\n\n Keyword arguments:\n entries -- list of tuples, each tuple contains a coefficient and a column index\n lhs -- left-hand side of the row (default 0.0)\n rhs -- right-hand side of the row (default infinity)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_21addRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_entries = 0; PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_rhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addRow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entries,&__pyx_n_s_lhs,&__pyx_n_s_rhs,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)__pyx_float_0_0); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entries)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRow") < 0)) __PYX_ERR(1, 153, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_entries = values[0]; __pyx_v_lhs = values[1]; __pyx_v_rhs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addRow", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 153, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_20addRow(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_entries, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_20addRow(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entries, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) { CYTHON_UNUSED long __pyx_v_beg; PyObject *__pyx_v_nnonz = NULL; SCIP_Real *__pyx_v_c_coefs; int *__pyx_v_c_inds; SCIP_Real __pyx_v_c_lhs; SCIP_Real __pyx_v_c_rhs; int __pyx_v_c_beg; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_entry = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; SCIP_Real __pyx_t_5; int __pyx_t_6; SCIP_Real __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addRow", 0); /* "src/pyscipopt/lp.pxi":161 * rhs -- right-hand side of the row (default infinity) * """ * beg = 0 # <<<<<<<<<<<<<< * nnonz = len(entries) * */ __pyx_v_beg = 0; /* "src/pyscipopt/lp.pxi":162 * """ * beg = 0 * nnonz = len(entries) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) */ __pyx_t_1 = PyObject_Length(__pyx_v_entries); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 162, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_nnonz = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":164 * nnonz = len(entries) * * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) * cdef SCIP_Real c_lhs */ __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_coefs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":165 * * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) # <<<<<<<<<<<<<< * cdef SCIP_Real c_lhs * cdef SCIP_Real c_rhs */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c_inds = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":170 * cdef int c_beg * * c_lhs = lhs # <<<<<<<<<<<<<< * c_rhs = rhs if rhs != None else self.infinity() * c_beg = 0 */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lhs); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error) __pyx_v_c_lhs = __pyx_t_5; /* "src/pyscipopt/lp.pxi":171 * * c_lhs = lhs * c_rhs = rhs if rhs != None else self.infinity() # <<<<<<<<<<<<<< * c_beg = 0 * */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_rhs, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 171, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 171, __pyx_L1_error) __pyx_t_5 = __pyx_t_7; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_7; } __pyx_v_c_rhs = __pyx_t_5; /* "src/pyscipopt/lp.pxi":172 * c_lhs = lhs * c_rhs = rhs if rhs != None else self.infinity() * c_beg = 0 # <<<<<<<<<<<<<< * * for i,entry in enumerate(entries): */ __pyx_v_c_beg = 0; /* "src/pyscipopt/lp.pxi":174 * c_beg = 0 * * for i,entry in enumerate(entries): # <<<<<<<<<<<<<< * c_inds[i] = entry[0] * c_coefs[i] = entry[1] */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_entries)) || PyTuple_CheckExact(__pyx_v_entries)) { __pyx_t_3 = __pyx_v_entries; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_9 = NULL; } else { __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 174, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 174, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 174, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 174, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_8; __pyx_t_8 = 0; /* "src/pyscipopt/lp.pxi":175 * * for i,entry in enumerate(entries): * c_inds[i] = entry[0] # <<<<<<<<<<<<<< * c_coefs[i] = entry[1] * */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_entry, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error) (__pyx_v_c_inds[__pyx_t_11]) = __pyx_t_10; /* "src/pyscipopt/lp.pxi":176 * for i,entry in enumerate(entries): * c_inds[i] = entry[0] * c_coefs[i] = entry[1] # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPlpiAddRows(self.lpi, 1, &c_lhs, &c_rhs, NULL, nnonz, &c_beg, c_inds, c_coefs)) */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L1_error) (__pyx_v_c_coefs[__pyx_t_11]) = __pyx_t_5; /* "src/pyscipopt/lp.pxi":174 * c_beg = 0 * * for i,entry in enumerate(entries): # <<<<<<<<<<<<<< * c_inds[i] = entry[0] * c_coefs[i] = entry[1] */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":178 * c_coefs[i] = entry[1] * * PY_SCIP_CALL(SCIPlpiAddRows(self.lpi, 1, &c_lhs, &c_rhs, NULL, nnonz, &c_beg, c_inds, c_coefs)) # <<<<<<<<<<<<<< * * free(c_coefs) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_nnonz); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 178, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiAddRows(__pyx_v_self->lpi, 1, (&__pyx_v_c_lhs), (&__pyx_v_c_rhs), NULL, __pyx_t_10, (&__pyx_v_c_beg), __pyx_v_c_inds, __pyx_v_c_coefs)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":180 * PY_SCIP_CALL(SCIPlpiAddRows(self.lpi, 1, &c_lhs, &c_rhs, NULL, nnonz, &c_beg, c_inds, c_coefs)) * * free(c_coefs) # <<<<<<<<<<<<<< * free(c_inds) * */ free(__pyx_v_c_coefs); /* "src/pyscipopt/lp.pxi":181 * * free(c_coefs) * free(c_inds) # <<<<<<<<<<<<<< * * def addRows(self, entrieslist, lhss = None, rhss = None): */ free(__pyx_v_c_inds); /* "src/pyscipopt/lp.pxi":153 * PY_SCIP_CALL(SCIPlpiDelCols(self.lpi, firstcol, lastcol)) * * def addRow(self, entries, lhs=0.0, rhs=None): # <<<<<<<<<<<<<< * """Adds a single row to the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pyscipopt.scip.LP.addRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nnonz); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_entry); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":183 * free(c_inds) * * def addRows(self, entrieslist, lhss = None, rhss = None): # <<<<<<<<<<<<<< * """Adds multiple rows to the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_23addRows(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_22addRows[] = "Adds multiple rows to the LP.\n\n Keyword arguments:\n entrieslist -- list containing lists of tuples, each tuple contains a coefficient and a column index\n lhss -- left-hand side of the row (default 0.0)\n rhss -- right-hand side of the row (default infinity)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_23addRows(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_entrieslist = 0; PyObject *__pyx_v_lhss = 0; PyObject *__pyx_v_rhss = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addRows (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entrieslist,&__pyx_n_s_lhss,&__pyx_n_s_rhss,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entrieslist)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhss); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhss); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRows") < 0)) __PYX_ERR(1, 183, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_entrieslist = values[0]; __pyx_v_lhss = values[1]; __pyx_v_rhss = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addRows", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 183, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.addRows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_22addRows(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_entrieslist, __pyx_v_lhss, __pyx_v_rhss); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_2LP_7addRows_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/pyscipopt/lp.pxi":192 * """ * nrows = len(entrieslist) * nnonz = sum(len(entries) for entries in entrieslist) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_7addRows_genexpr(PyObject *__pyx_self) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_7_genexpr(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 192, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pyscipopt_4scip_2LP_7addRows_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_addRows_locals_genexpr, __pyx_n_s_pyscipopt_scip); if (unlikely(!gen)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.addRows.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9pyscipopt_4scip_2LP_7addRows_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 192, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist)) { __Pyx_RaiseClosureNameError("entrieslist"); __PYX_ERR(1, 192, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_entrieslist); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 192, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 192, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 192, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_entries); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_entries, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_entries); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 192, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 192, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":183 * free(c_inds) * * def addRows(self, entrieslist, lhss = None, rhss = None): # <<<<<<<<<<<<<< * """Adds multiple rows to the LP. * */ static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_22addRows(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_entrieslist, PyObject *__pyx_v_lhss, PyObject *__pyx_v_rhss) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *__pyx_cur_scope; PyObject *__pyx_v_nrows = NULL; PyObject *__pyx_v_nnonz = NULL; SCIP_Real *__pyx_v_c_lhss; SCIP_Real *__pyx_v_c_rhss; SCIP_Real *__pyx_v_c_coefs; int *__pyx_v_c_inds; int *__pyx_v_c_beg; PyObject *__pyx_v_tmp = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_entries = NULL; PyObject *__pyx_v_entry = NULL; PyObject *__pyx_gb_9pyscipopt_4scip_2LP_7addRows_2generator3 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; SCIP_Real __pyx_t_7; int __pyx_t_8; SCIP_Real __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addRows", 0); __pyx_cur_scope = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *)__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_6_addRows(__pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_6_addRows, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 183, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_entrieslist = __pyx_v_entrieslist; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_entrieslist); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_entrieslist); /* "src/pyscipopt/lp.pxi":191 * rhss -- right-hand side of the row (default infinity) * """ * nrows = len(entrieslist) # <<<<<<<<<<<<<< * nnonz = sum(len(entries) for entries in entrieslist) * */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_nrows = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":192 * """ * nrows = len(entrieslist) * nnonz = sum(len(entries) for entries in entrieslist) # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) */ __pyx_t_1 = __pyx_pf_9pyscipopt_4scip_2LP_7addRows_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nnonz = __pyx_t_3; __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":194 * nnonz = sum(len(entries) for entries in entrieslist) * * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_lhss = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":195 * * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_rhss = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":196 * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) * cdef int* c_beg = <int*>malloc(nrows * sizeof(int)) */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_coefs = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":197 * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) # <<<<<<<<<<<<<< * cdef int* c_beg = <int*>malloc(nrows * sizeof(int)) * */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_v_nnonz, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_inds = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":198 * cdef SCIP_Real* c_coefs = <SCIP_Real*> malloc(nnonz * sizeof(SCIP_Real)) * cdef int* c_inds = <int*>malloc(nnonz * sizeof(int)) * cdef int* c_beg = <int*>malloc(nrows * sizeof(int)) # <<<<<<<<<<<<<< * * tmp = 0 */ __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_beg = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":200 * cdef int* c_beg = <int*>malloc(nrows * sizeof(int)) * * tmp = 0 # <<<<<<<<<<<<<< * for i,entries in enumerate(entrieslist): * c_lhss[i] = lhss[i] if lhss != None else 0.0 */ __Pyx_INCREF(__pyx_int_0); __pyx_v_tmp = __pyx_int_0; /* "src/pyscipopt/lp.pxi":201 * * tmp = 0 * for i,entries in enumerate(entrieslist): # <<<<<<<<<<<<<< * c_lhss[i] = lhss[i] if lhss != None else 0.0 * c_rhss[i] = rhss[i] if rhss != None else self.infinity() */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_entrieslist)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_entrieslist)) { __pyx_t_3 = __pyx_cur_scope->__pyx_v_entrieslist; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_entrieslist); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 201, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 201, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 201, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 201, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_v_entries, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; /* "src/pyscipopt/lp.pxi":202 * tmp = 0 * for i,entries in enumerate(entrieslist): * c_lhss[i] = lhss[i] if lhss != None else 0.0 # <<<<<<<<<<<<<< * c_rhss[i] = rhss[i] if rhss != None else self.infinity() * c_beg[i] = tmp */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_lhss, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 202, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lhss, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = 0.0; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 202, __pyx_L1_error) (__pyx_v_c_lhss[__pyx_t_10]) = __pyx_t_7; /* "src/pyscipopt/lp.pxi":203 * for i,entries in enumerate(entrieslist): * c_lhss[i] = lhss[i] if lhss != None else 0.0 * c_rhss[i] = rhss[i] if rhss != None else self.infinity() # <<<<<<<<<<<<<< * c_beg[i] = tmp * */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_rhss, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 203, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_rhss, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __pyx_t_9; } else { __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_infinity); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __pyx_t_9; } __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L1_error) (__pyx_v_c_rhss[__pyx_t_10]) = __pyx_t_7; /* "src/pyscipopt/lp.pxi":204 * c_lhss[i] = lhss[i] if lhss != None else 0.0 * c_rhss[i] = rhss[i] if rhss != None else self.infinity() * c_beg[i] = tmp # <<<<<<<<<<<<<< * * for entry in entries: */ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_tmp); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 204, __pyx_L1_error) __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 204, __pyx_L1_error) (__pyx_v_c_beg[__pyx_t_10]) = __pyx_t_13; /* "src/pyscipopt/lp.pxi":206 * c_beg[i] = tmp * * for entry in entries: # <<<<<<<<<<<<<< * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] */ if (likely(PyList_CheckExact(__pyx_v_entries)) || PyTuple_CheckExact(__pyx_v_entries)) { __pyx_t_6 = __pyx_v_entries; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0; __pyx_t_14 = NULL; } else { __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 206, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 206, __pyx_L1_error) #else __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 206, __pyx_L1_error) #else __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif } } else { __pyx_t_11 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 206, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_11); __pyx_t_11 = 0; /* "src/pyscipopt/lp.pxi":207 * * for entry in entries: * c_inds[tmp] = entry[0] # <<<<<<<<<<<<<< * c_coefs[tmp] = entry[1] * tmp += 1 */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tmp); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 207, __pyx_L1_error) (__pyx_v_c_inds[__pyx_t_15]) = __pyx_t_13; /* "src/pyscipopt/lp.pxi":208 * for entry in entries: * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] # <<<<<<<<<<<<<< * tmp += 1 * */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 208, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tmp); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 208, __pyx_L1_error) (__pyx_v_c_coefs[__pyx_t_15]) = __pyx_t_7; /* "src/pyscipopt/lp.pxi":209 * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] * tmp += 1 # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPlpiAddRows(self.lpi, nrows, c_lhss, c_rhss, NULL, nnonz, c_beg, c_inds, c_coefs)) */ __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_v_tmp, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF_SET(__pyx_v_tmp, __pyx_t_11); __pyx_t_11 = 0; /* "src/pyscipopt/lp.pxi":206 * c_beg[i] = tmp * * for entry in entries: # <<<<<<<<<<<<<< * c_inds[tmp] = entry[0] * c_coefs[tmp] = entry[1] */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/lp.pxi":201 * * tmp = 0 * for i,entries in enumerate(entrieslist): # <<<<<<<<<<<<<< * c_lhss[i] = lhss[i] if lhss != None else 0.0 * c_rhss[i] = rhss[i] if rhss != None else self.infinity() */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":211 * tmp += 1 * * PY_SCIP_CALL(SCIPlpiAddRows(self.lpi, nrows, c_lhss, c_rhss, NULL, nnonz, c_beg, c_inds, c_coefs)) # <<<<<<<<<<<<<< * * free(c_beg) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_nrows); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 211, __pyx_L1_error) __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_nnonz); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 211, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiAddRows(__pyx_v_self->lpi, __pyx_t_13, __pyx_v_c_lhss, __pyx_v_c_rhss, NULL, __pyx_t_16, __pyx_v_c_beg, __pyx_v_c_inds, __pyx_v_c_coefs)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":213 * PY_SCIP_CALL(SCIPlpiAddRows(self.lpi, nrows, c_lhss, c_rhss, NULL, nnonz, c_beg, c_inds, c_coefs)) * * free(c_beg) # <<<<<<<<<<<<<< * free(c_inds) * free(c_coefs) */ free(__pyx_v_c_beg); /* "src/pyscipopt/lp.pxi":214 * * free(c_beg) * free(c_inds) # <<<<<<<<<<<<<< * free(c_coefs) * free(c_lhss) */ free(__pyx_v_c_inds); /* "src/pyscipopt/lp.pxi":215 * free(c_beg) * free(c_inds) * free(c_coefs) # <<<<<<<<<<<<<< * free(c_lhss) * free(c_rhss) */ free(__pyx_v_c_coefs); /* "src/pyscipopt/lp.pxi":216 * free(c_inds) * free(c_coefs) * free(c_lhss) # <<<<<<<<<<<<<< * free(c_rhss) * */ free(__pyx_v_c_lhss); /* "src/pyscipopt/lp.pxi":217 * free(c_coefs) * free(c_lhss) * free(c_rhss) # <<<<<<<<<<<<<< * * def delRows(self, firstrow, lastrow): */ free(__pyx_v_c_rhss); /* "src/pyscipopt/lp.pxi":183 * free(c_inds) * * def addRows(self, entrieslist, lhss = None, rhss = None): # <<<<<<<<<<<<<< * """Adds multiple rows to the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pyscipopt.scip.LP.addRows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nrows); __Pyx_XDECREF(__pyx_v_nnonz); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_entries); __Pyx_XDECREF(__pyx_v_entry); __Pyx_XDECREF(__pyx_gb_9pyscipopt_4scip_2LP_7addRows_2generator3); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":219 * free(c_rhss) * * def delRows(self, firstrow, lastrow): # <<<<<<<<<<<<<< * """Deletes a range of rows from the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_25delRows(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_24delRows[] = "Deletes a range of rows from the LP.\n\n Keyword arguments:\n firstrow -- first row to delete\n lastrow -- last row to delete\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_25delRows(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_firstrow = 0; PyObject *__pyx_v_lastrow = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delRows (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_firstrow,&__pyx_n_s_lastrow,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstrow)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lastrow)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("delRows", 1, 2, 2, 1); __PYX_ERR(1, 219, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delRows") < 0)) __PYX_ERR(1, 219, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_firstrow = values[0]; __pyx_v_lastrow = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("delRows", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 219, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.delRows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_24delRows(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_firstrow, __pyx_v_lastrow); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_24delRows(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstrow, PyObject *__pyx_v_lastrow) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delRows", 0); /* "src/pyscipopt/lp.pxi":226 * lastrow -- last row to delete * """ * PY_SCIP_CALL(SCIPlpiDelRows(self.lpi, firstrow, lastrow)) # <<<<<<<<<<<<<< * * def getBounds(self, firstcol = 0, lastcol = None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_firstrow); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 226, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_lastrow); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 226, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiDelRows(__pyx_v_self->lpi, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":219 * free(c_rhss) * * def delRows(self, firstrow, lastrow): # <<<<<<<<<<<<<< * """Deletes a range of rows from the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.delRows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":228 * PY_SCIP_CALL(SCIPlpiDelRows(self.lpi, firstrow, lastrow)) * * def getBounds(self, firstcol = 0, lastcol = None): # <<<<<<<<<<<<<< * """Returns all lower and upper bounds for a range of columns. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_27getBounds(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_26getBounds[] = "Returns all lower and upper bounds for a range of columns.\n\n Keyword arguments:\n firstcol -- first column (default 0)\n lastcol -- last column (default ncols - 1)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_27getBounds(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_firstcol = 0; PyObject *__pyx_v_lastcol = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBounds (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_firstcol,&__pyx_n_s_lastcol,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_int_0); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstcol); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lastcol); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getBounds") < 0)) __PYX_ERR(1, 228, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_firstcol = values[0]; __pyx_v_lastcol = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getBounds", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 228, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.getBounds", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_26getBounds(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_firstcol, __pyx_v_lastcol); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_26getBounds(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstcol, PyObject *__pyx_v_lastcol) { PyObject *__pyx_v_ncols = NULL; SCIP_Real *__pyx_v_c_lbs; SCIP_Real *__pyx_v_c_ubs; PyObject *__pyx_v_lbs = NULL; PyObject *__pyx_v_ubs = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBounds", 0); __Pyx_INCREF(__pyx_v_lastcol); /* "src/pyscipopt/lp.pxi":235 * lastcol -- last column (default ncols - 1) * """ * lastcol = lastcol if lastcol != None else self.ncols() - 1 # <<<<<<<<<<<<<< * * if firstcol > lastcol: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_lastcol, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_v_lastcol); __pyx_t_1 = __pyx_v_lastcol; } else { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF_SET(__pyx_v_lastcol, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":237 * lastcol = lastcol if lastcol != None else self.ncols() - 1 * * if firstcol > lastcol: # <<<<<<<<<<<<<< * return None * */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_firstcol, __pyx_v_lastcol, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "src/pyscipopt/lp.pxi":238 * * if firstcol > lastcol: * return None # <<<<<<<<<<<<<< * * ncols = lastcol - firstcol + 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "src/pyscipopt/lp.pxi":237 * lastcol = lastcol if lastcol != None else self.ncols() - 1 * * if firstcol > lastcol: # <<<<<<<<<<<<<< * return None * */ } /* "src/pyscipopt/lp.pxi":240 * return None * * ncols = lastcol - firstcol + 1 # <<<<<<<<<<<<<< * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_lastcol, __pyx_v_firstcol); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ncols = __pyx_t_4; __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":241 * * ncols = lastcol - firstcol + 1 * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetBounds(self.lpi, firstcol, lastcol, c_lbs, c_ubs)) */ __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_lbs = ((SCIP_Real *)malloc(__pyx_t_6)); /* "src/pyscipopt/lp.pxi":242 * ncols = lastcol - firstcol + 1 * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetBounds(self.lpi, firstcol, lastcol, c_lbs, c_ubs)) * */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_c_ubs = ((SCIP_Real *)malloc(__pyx_t_6)); /* "src/pyscipopt/lp.pxi":243 * cdef SCIP_Real* c_lbs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * cdef SCIP_Real* c_ubs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetBounds(self.lpi, firstcol, lastcol, c_lbs, c_ubs)) # <<<<<<<<<<<<<< * * lbs = [] */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_firstcol); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 243, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_lastcol); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 243, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetBounds(__pyx_v_self->lpi, __pyx_t_7, __pyx_t_8, __pyx_v_c_lbs, __pyx_v_c_ubs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":245 * PY_SCIP_CALL(SCIPlpiGetBounds(self.lpi, firstcol, lastcol, c_lbs, c_ubs)) * * lbs = [] # <<<<<<<<<<<<<< * ubs = [] * */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_lbs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":246 * * lbs = [] * ubs = [] # <<<<<<<<<<<<<< * * for i in range(ncols): */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_ubs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":248 * ubs = [] * * for i in range(ncols): # <<<<<<<<<<<<<< * lbs.append(c_lbs[i]) * ubs.append(c_ubs[i]) */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 248, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 248, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 248, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 248, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":249 * * for i in range(ncols): * lbs.append(c_lbs[i]) # <<<<<<<<<<<<<< * ubs.append(c_ubs[i]) * */ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L1_error) __pyx_t_4 = PyFloat_FromDouble((__pyx_v_c_lbs[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lbs, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":250 * for i in range(ncols): * lbs.append(c_lbs[i]) * ubs.append(c_ubs[i]) # <<<<<<<<<<<<<< * * free(c_ubs) */ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 250, __pyx_L1_error) __pyx_t_4 = PyFloat_FromDouble((__pyx_v_c_ubs[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ubs, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":248 * ubs = [] * * for i in range(ncols): # <<<<<<<<<<<<<< * lbs.append(c_lbs[i]) * ubs.append(c_ubs[i]) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":252 * ubs.append(c_ubs[i]) * * free(c_ubs) # <<<<<<<<<<<<<< * free(c_lbs) * */ free(__pyx_v_c_ubs); /* "src/pyscipopt/lp.pxi":253 * * free(c_ubs) * free(c_lbs) # <<<<<<<<<<<<<< * * return lbs, ubs */ free(__pyx_v_c_lbs); /* "src/pyscipopt/lp.pxi":255 * free(c_lbs) * * return lbs, ubs # <<<<<<<<<<<<<< * * def getSides(self, firstrow = 0, lastrow = None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_lbs); __Pyx_GIVEREF(__pyx_v_lbs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lbs); __Pyx_INCREF(__pyx_v_ubs); __Pyx_GIVEREF(__pyx_v_ubs); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ubs); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":228 * PY_SCIP_CALL(SCIPlpiDelRows(self.lpi, firstrow, lastrow)) * * def getBounds(self, firstcol = 0, lastcol = None): # <<<<<<<<<<<<<< * """Returns all lower and upper bounds for a range of columns. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.getBounds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ncols); __Pyx_XDECREF(__pyx_v_lbs); __Pyx_XDECREF(__pyx_v_ubs); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_lastcol); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":257 * return lbs, ubs * * def getSides(self, firstrow = 0, lastrow = None): # <<<<<<<<<<<<<< * """Returns all left- and right-hand sides for a range of rows. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_29getSides(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_28getSides[] = "Returns all left- and right-hand sides for a range of rows.\n\n Keyword arguments:\n firstrow -- first row (default 0)\n lastrow -- last row (default nrows - 1)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_29getSides(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_firstrow = 0; PyObject *__pyx_v_lastrow = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSides (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_firstrow,&__pyx_n_s_lastrow,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_int_0); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstrow); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lastrow); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getSides") < 0)) __PYX_ERR(1, 257, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_firstrow = values[0]; __pyx_v_lastrow = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getSides", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 257, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.getSides", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_28getSides(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_firstrow, __pyx_v_lastrow); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_28getSides(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_firstrow, PyObject *__pyx_v_lastrow) { PyObject *__pyx_v_nrows = NULL; SCIP_Real *__pyx_v_c_lhss; SCIP_Real *__pyx_v_c_rhss; PyObject *__pyx_v_lhss = NULL; PyObject *__pyx_v_rhss = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSides", 0); __Pyx_INCREF(__pyx_v_lastrow); /* "src/pyscipopt/lp.pxi":264 * lastrow -- last row (default nrows - 1) * """ * lastrow = lastrow if lastrow != None else self.nrows() - 1 # <<<<<<<<<<<<<< * * if firstrow > lastrow: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_lastrow, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 264, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_v_lastrow); __pyx_t_1 = __pyx_v_lastrow; } else { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF_SET(__pyx_v_lastrow, __pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":266 * lastrow = lastrow if lastrow != None else self.nrows() - 1 * * if firstrow > lastrow: # <<<<<<<<<<<<<< * return None * */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_firstrow, __pyx_v_lastrow, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "src/pyscipopt/lp.pxi":267 * * if firstrow > lastrow: * return None # <<<<<<<<<<<<<< * * nrows = lastrow - firstrow + 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "src/pyscipopt/lp.pxi":266 * lastrow = lastrow if lastrow != None else self.nrows() - 1 * * if firstrow > lastrow: # <<<<<<<<<<<<<< * return None * */ } /* "src/pyscipopt/lp.pxi":269 * return None * * nrows = lastrow - firstrow + 1 # <<<<<<<<<<<<<< * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_lastrow, __pyx_v_firstrow); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nrows = __pyx_t_4; __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":270 * * nrows = lastrow - firstrow + 1 * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSides(self.lpi, firstrow, lastrow, c_lhss, c_rhss)) */ __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c_lhss = ((SCIP_Real *)malloc(__pyx_t_6)); /* "src/pyscipopt/lp.pxi":271 * nrows = lastrow - firstrow + 1 * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetSides(self.lpi, firstrow, lastrow, c_lhss, c_rhss)) * */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_c_rhss = ((SCIP_Real *)malloc(__pyx_t_6)); /* "src/pyscipopt/lp.pxi":272 * cdef SCIP_Real* c_lhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * cdef SCIP_Real* c_rhss = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSides(self.lpi, firstrow, lastrow, c_lhss, c_rhss)) # <<<<<<<<<<<<<< * * lhss = [] */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_firstrow); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 272, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_lastrow); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 272, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetSides(__pyx_v_self->lpi, __pyx_t_7, __pyx_t_8, __pyx_v_c_lhss, __pyx_v_c_rhss)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":274 * PY_SCIP_CALL(SCIPlpiGetSides(self.lpi, firstrow, lastrow, c_lhss, c_rhss)) * * lhss = [] # <<<<<<<<<<<<<< * rhss = [] * */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_lhss = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":275 * * lhss = [] * rhss = [] # <<<<<<<<<<<<<< * * for i in range(firstrow, lastrow + 1): */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_rhss = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":277 * rhss = [] * * for i in range(firstrow, lastrow + 1): # <<<<<<<<<<<<<< * lhss.append(c_lhss[i]) * rhss.append(c_rhss[i]) */ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_lastrow, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_firstrow); __Pyx_GIVEREF(__pyx_v_firstrow); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_firstrow); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 277, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 277, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 277, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 277, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":278 * * for i in range(firstrow, lastrow + 1): * lhss.append(c_lhss[i]) # <<<<<<<<<<<<<< * rhss.append(c_rhss[i]) * */ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 278, __pyx_L1_error) __pyx_t_4 = PyFloat_FromDouble((__pyx_v_c_lhss[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lhss, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":279 * for i in range(firstrow, lastrow + 1): * lhss.append(c_lhss[i]) * rhss.append(c_rhss[i]) # <<<<<<<<<<<<<< * * free(c_rhss) */ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 279, __pyx_L1_error) __pyx_t_4 = PyFloat_FromDouble((__pyx_v_c_rhss[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_rhss, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/lp.pxi":277 * rhss = [] * * for i in range(firstrow, lastrow + 1): # <<<<<<<<<<<<<< * lhss.append(c_lhss[i]) * rhss.append(c_rhss[i]) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":281 * rhss.append(c_rhss[i]) * * free(c_rhss) # <<<<<<<<<<<<<< * free(c_lhss) * */ free(__pyx_v_c_rhss); /* "src/pyscipopt/lp.pxi":282 * * free(c_rhss) * free(c_lhss) # <<<<<<<<<<<<<< * * return lhss, rhss */ free(__pyx_v_c_lhss); /* "src/pyscipopt/lp.pxi":284 * free(c_lhss) * * return lhss, rhss # <<<<<<<<<<<<<< * * def chgObj(self, col, obj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_lhss); __Pyx_GIVEREF(__pyx_v_lhss); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lhss); __Pyx_INCREF(__pyx_v_rhss); __Pyx_GIVEREF(__pyx_v_rhss); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_rhss); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":257 * return lbs, ubs * * def getSides(self, firstrow = 0, lastrow = None): # <<<<<<<<<<<<<< * """Returns all left- and right-hand sides for a range of rows. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.getSides", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nrows); __Pyx_XDECREF(__pyx_v_lhss); __Pyx_XDECREF(__pyx_v_rhss); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_lastrow); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":286 * return lhss, rhss * * def chgObj(self, col, obj): # <<<<<<<<<<<<<< * """Changes objective coefficient of a single column. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_31chgObj(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_30chgObj[] = "Changes objective coefficient of a single column.\n\n Keyword arguments:\n col -- column to change\n obj -- new objective coefficient\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_31chgObj(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_col = 0; PyObject *__pyx_v_obj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgObj (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_col,&__pyx_n_s_obj,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_col)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgObj", 1, 2, 2, 1); __PYX_ERR(1, 286, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgObj") < 0)) __PYX_ERR(1, 286, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_col = values[0]; __pyx_v_obj = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgObj", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 286, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.chgObj", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_30chgObj(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_col, __pyx_v_obj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_30chgObj(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_col, PyObject *__pyx_v_obj) { int __pyx_v_c_col; SCIP_Real __pyx_v_c_obj; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgObj", 0); /* "src/pyscipopt/lp.pxi":293 * obj -- new objective coefficient * """ * cdef int c_col = col # <<<<<<<<<<<<<< * cdef SCIP_Real c_obj = obj * PY_SCIP_CALL(SCIPlpiChgObj(self.lpi, 1, &c_col, &c_obj)) */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_col); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 293, __pyx_L1_error) __pyx_v_c_col = __pyx_t_1; /* "src/pyscipopt/lp.pxi":294 * """ * cdef int c_col = col * cdef SCIP_Real c_obj = obj # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiChgObj(self.lpi, 1, &c_col, &c_obj)) * */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 294, __pyx_L1_error) __pyx_v_c_obj = __pyx_t_2; /* "src/pyscipopt/lp.pxi":295 * cdef int c_col = col * cdef SCIP_Real c_obj = obj * PY_SCIP_CALL(SCIPlpiChgObj(self.lpi, 1, &c_col, &c_obj)) # <<<<<<<<<<<<<< * * def chgCoef(self, row, col, newval): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiChgObj(__pyx_v_self->lpi, 1, (&__pyx_v_c_col), (&__pyx_v_c_obj))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":286 * return lhss, rhss * * def chgObj(self, col, obj): # <<<<<<<<<<<<<< * """Changes objective coefficient of a single column. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.chgObj", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":297 * PY_SCIP_CALL(SCIPlpiChgObj(self.lpi, 1, &c_col, &c_obj)) * * def chgCoef(self, row, col, newval): # <<<<<<<<<<<<<< * """Changes a single coefficient in the LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_33chgCoef(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_32chgCoef[] = "Changes a single coefficient in the LP.\n\n Keyword arguments:\n row -- row to change\n col -- column to change\n newval -- new coefficient\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_33chgCoef(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_row = 0; PyObject *__pyx_v_col = 0; PyObject *__pyx_v_newval = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgCoef (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_col,&__pyx_n_s_newval,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_col)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgCoef", 1, 3, 3, 1); __PYX_ERR(1, 297, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newval)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgCoef", 1, 3, 3, 2); __PYX_ERR(1, 297, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgCoef") < 0)) __PYX_ERR(1, 297, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_row = values[0]; __pyx_v_col = values[1]; __pyx_v_newval = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgCoef", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 297, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.chgCoef", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_32chgCoef(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_row, __pyx_v_col, __pyx_v_newval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_32chgCoef(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_col, PyObject *__pyx_v_newval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgCoef", 0); /* "src/pyscipopt/lp.pxi":305 * newval -- new coefficient * """ * PY_SCIP_CALL(SCIPlpiChgCoef(self.lpi, row, col, newval)) # <<<<<<<<<<<<<< * * def chgBound(self, col, lb, ub): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_row); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 305, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_col); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 305, __pyx_L1_error) __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_newval); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 305, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiChgCoef(__pyx_v_self->lpi, __pyx_t_3, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":297 * PY_SCIP_CALL(SCIPlpiChgObj(self.lpi, 1, &c_col, &c_obj)) * * def chgCoef(self, row, col, newval): # <<<<<<<<<<<<<< * """Changes a single coefficient in the LP. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.LP.chgCoef", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":307 * PY_SCIP_CALL(SCIPlpiChgCoef(self.lpi, row, col, newval)) * * def chgBound(self, col, lb, ub): # <<<<<<<<<<<<<< * """Changes the lower and upper bound of a single column. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_35chgBound(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_34chgBound[] = "Changes the lower and upper bound of a single column.\n\n Keyword arguments:\n col -- column to change\n lb -- new lower bound\n ub -- new upper bound\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_35chgBound(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_col = 0; PyObject *__pyx_v_lb = 0; PyObject *__pyx_v_ub = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgBound (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_col,&__pyx_n_s_lb,&__pyx_n_s_ub,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_col)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgBound", 1, 3, 3, 1); __PYX_ERR(1, 307, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgBound", 1, 3, 3, 2); __PYX_ERR(1, 307, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgBound") < 0)) __PYX_ERR(1, 307, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_col = values[0]; __pyx_v_lb = values[1]; __pyx_v_ub = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgBound", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 307, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.chgBound", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_34chgBound(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_col, __pyx_v_lb, __pyx_v_ub); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_34chgBound(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_col, PyObject *__pyx_v_lb, PyObject *__pyx_v_ub) { int __pyx_v_c_col; SCIP_Real __pyx_v_c_lb; SCIP_Real __pyx_v_c_ub; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgBound", 0); /* "src/pyscipopt/lp.pxi":315 * ub -- new upper bound * """ * cdef int c_col = col # <<<<<<<<<<<<<< * cdef SCIP_Real c_lb = lb * cdef SCIP_Real c_ub = ub */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_col); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 315, __pyx_L1_error) __pyx_v_c_col = __pyx_t_1; /* "src/pyscipopt/lp.pxi":316 * """ * cdef int c_col = col * cdef SCIP_Real c_lb = lb # <<<<<<<<<<<<<< * cdef SCIP_Real c_ub = ub * PY_SCIP_CALL(SCIPlpiChgBounds(self.lpi, 1, &c_col, &c_lb, &c_ub)) */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 316, __pyx_L1_error) __pyx_v_c_lb = __pyx_t_2; /* "src/pyscipopt/lp.pxi":317 * cdef int c_col = col * cdef SCIP_Real c_lb = lb * cdef SCIP_Real c_ub = ub # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiChgBounds(self.lpi, 1, &c_col, &c_lb, &c_ub)) * */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 317, __pyx_L1_error) __pyx_v_c_ub = __pyx_t_2; /* "src/pyscipopt/lp.pxi":318 * cdef SCIP_Real c_lb = lb * cdef SCIP_Real c_ub = ub * PY_SCIP_CALL(SCIPlpiChgBounds(self.lpi, 1, &c_col, &c_lb, &c_ub)) # <<<<<<<<<<<<<< * * def chgSide(self, row, lhs, rhs): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiChgBounds(__pyx_v_self->lpi, 1, (&__pyx_v_c_col), (&__pyx_v_c_lb), (&__pyx_v_c_ub))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":307 * PY_SCIP_CALL(SCIPlpiChgCoef(self.lpi, row, col, newval)) * * def chgBound(self, col, lb, ub): # <<<<<<<<<<<<<< * """Changes the lower and upper bound of a single column. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.chgBound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":320 * PY_SCIP_CALL(SCIPlpiChgBounds(self.lpi, 1, &c_col, &c_lb, &c_ub)) * * def chgSide(self, row, lhs, rhs): # <<<<<<<<<<<<<< * """Changes the left- and right-hand side of a single row. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_37chgSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_36chgSide[] = "Changes the left- and right-hand side of a single row.\n\n Keyword arguments:\n row -- row to change\n lhs -- new left-hand side\n rhs -- new right-hand side\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_37chgSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_row = 0; PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_rhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgSide (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_lhs,&__pyx_n_s_rhs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgSide", 1, 3, 3, 1); __PYX_ERR(1, 320, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgSide", 1, 3, 3, 2); __PYX_ERR(1, 320, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgSide") < 0)) __PYX_ERR(1, 320, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_row = values[0]; __pyx_v_lhs = values[1]; __pyx_v_rhs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgSide", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 320, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.chgSide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_36chgSide(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_row, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_36chgSide(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) { int __pyx_v_c_row; SCIP_Real __pyx_v_c_lhs; SCIP_Real __pyx_v_c_rhs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgSide", 0); /* "src/pyscipopt/lp.pxi":328 * rhs -- new right-hand side * """ * cdef int c_row = row # <<<<<<<<<<<<<< * cdef SCIP_Real c_lhs = lhs * cdef SCIP_Real c_rhs = rhs */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_row); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L1_error) __pyx_v_c_row = __pyx_t_1; /* "src/pyscipopt/lp.pxi":329 * """ * cdef int c_row = row * cdef SCIP_Real c_lhs = lhs # <<<<<<<<<<<<<< * cdef SCIP_Real c_rhs = rhs * PY_SCIP_CALL(SCIPlpiChgSides(self.lpi, 1, &c_row, &c_lhs, &c_rhs)) */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_lhs); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 329, __pyx_L1_error) __pyx_v_c_lhs = __pyx_t_2; /* "src/pyscipopt/lp.pxi":330 * cdef int c_row = row * cdef SCIP_Real c_lhs = lhs * cdef SCIP_Real c_rhs = rhs # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiChgSides(self.lpi, 1, &c_row, &c_lhs, &c_rhs)) * */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(1, 330, __pyx_L1_error) __pyx_v_c_rhs = __pyx_t_2; /* "src/pyscipopt/lp.pxi":331 * cdef SCIP_Real c_lhs = lhs * cdef SCIP_Real c_rhs = rhs * PY_SCIP_CALL(SCIPlpiChgSides(self.lpi, 1, &c_row, &c_lhs, &c_rhs)) # <<<<<<<<<<<<<< * * def clear(self): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiChgSides(__pyx_v_self->lpi, 1, (&__pyx_v_c_row), (&__pyx_v_c_lhs), (&__pyx_v_c_rhs))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":320 * PY_SCIP_CALL(SCIPlpiChgBounds(self.lpi, 1, &c_col, &c_lb, &c_ub)) * * def chgSide(self, row, lhs, rhs): # <<<<<<<<<<<<<< * """Changes the left- and right-hand side of a single row. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.chgSide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":333 * PY_SCIP_CALL(SCIPlpiChgSides(self.lpi, 1, &c_row, &c_lhs, &c_rhs)) * * def clear(self): # <<<<<<<<<<<<<< * """Clears the whole LP.""" * PY_SCIP_CALL(SCIPlpiClear(self.lpi)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_39clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_38clear[] = "Clears the whole LP."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_39clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_38clear(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_38clear(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear", 0); /* "src/pyscipopt/lp.pxi":335 * def clear(self): * """Clears the whole LP.""" * PY_SCIP_CALL(SCIPlpiClear(self.lpi)) # <<<<<<<<<<<<<< * * def nrows(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiClear(__pyx_v_self->lpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":333 * PY_SCIP_CALL(SCIPlpiChgSides(self.lpi, 1, &c_row, &c_lhs, &c_rhs)) * * def clear(self): # <<<<<<<<<<<<<< * """Clears the whole LP.""" * PY_SCIP_CALL(SCIPlpiClear(self.lpi)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.LP.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":337 * PY_SCIP_CALL(SCIPlpiClear(self.lpi)) * * def nrows(self): # <<<<<<<<<<<<<< * """Returns the number of rows.""" * cdef int nrows */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_41nrows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_40nrows[] = "Returns the number of rows."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_41nrows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nrows (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_40nrows(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_40nrows(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { int __pyx_v_nrows; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("nrows", 0); /* "src/pyscipopt/lp.pxi":340 * """Returns the number of rows.""" * cdef int nrows * PY_SCIP_CALL(SCIPlpiGetNRows(self.lpi, &nrows)) # <<<<<<<<<<<<<< * return nrows * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetNRows(__pyx_v_self->lpi, (&__pyx_v_nrows))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":341 * cdef int nrows * PY_SCIP_CALL(SCIPlpiGetNRows(self.lpi, &nrows)) * return nrows # <<<<<<<<<<<<<< * * def ncols(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":337 * PY_SCIP_CALL(SCIPlpiClear(self.lpi)) * * def nrows(self): # <<<<<<<<<<<<<< * """Returns the number of rows.""" * cdef int nrows */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.LP.nrows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":343 * return nrows * * def ncols(self): # <<<<<<<<<<<<<< * """Returns the number of columns.""" * cdef int ncols */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_43ncols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_42ncols[] = "Returns the number of columns."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_43ncols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ncols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_42ncols(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_42ncols(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { int __pyx_v_ncols; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ncols", 0); /* "src/pyscipopt/lp.pxi":346 * """Returns the number of columns.""" * cdef int ncols * PY_SCIP_CALL(SCIPlpiGetNCols(self.lpi, &ncols)) # <<<<<<<<<<<<<< * return ncols * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetNCols(__pyx_v_self->lpi, (&__pyx_v_ncols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":347 * cdef int ncols * PY_SCIP_CALL(SCIPlpiGetNCols(self.lpi, &ncols)) * return ncols # <<<<<<<<<<<<<< * * def solve(self, dual=True): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":343 * return nrows * * def ncols(self): # <<<<<<<<<<<<<< * """Returns the number of columns.""" * cdef int ncols */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.LP.ncols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":349 * return ncols * * def solve(self, dual=True): # <<<<<<<<<<<<<< * """Solves the current LP. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_45solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_44solve[] = "Solves the current LP.\n\n Keyword arguments:\n dual -- use the dual or primal Simplex method (default: dual)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_45solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dual = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solve (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dual,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dual); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solve") < 0)) __PYX_ERR(1, 349, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dual = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("solve", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 349, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.LP.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_44solve(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), __pyx_v_dual); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_44solve(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, PyObject *__pyx_v_dual) { SCIP_Real __pyx_v_objval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solve", 0); /* "src/pyscipopt/lp.pxi":355 * dual -- use the dual or primal Simplex method (default: dual) * """ * if dual: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiSolveDual(self.lpi)) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dual); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 355, __pyx_L1_error) if (__pyx_t_1) { /* "src/pyscipopt/lp.pxi":356 * """ * if dual: * PY_SCIP_CALL(SCIPlpiSolveDual(self.lpi)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPlpiSolvePrimal(self.lpi)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiSolveDual(__pyx_v_self->lpi)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":355 * dual -- use the dual or primal Simplex method (default: dual) * """ * if dual: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiSolveDual(self.lpi)) * else: */ goto __pyx_L3; } /* "src/pyscipopt/lp.pxi":358 * PY_SCIP_CALL(SCIPlpiSolveDual(self.lpi)) * else: * PY_SCIP_CALL(SCIPlpiSolvePrimal(self.lpi)) # <<<<<<<<<<<<<< * * cdef SCIP_Real objval */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiSolvePrimal(__pyx_v_self->lpi)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "src/pyscipopt/lp.pxi":361 * * cdef SCIP_Real objval * PY_SCIP_CALL(SCIPlpiGetObjval(self.lpi, &objval)) # <<<<<<<<<<<<<< * return objval * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetObjval(__pyx_v_self->lpi, (&__pyx_v_objval))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":362 * cdef SCIP_Real objval * PY_SCIP_CALL(SCIPlpiGetObjval(self.lpi, &objval)) * return objval # <<<<<<<<<<<<<< * * def getPrimal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_objval); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":349 * return ncols * * def solve(self, dual=True): # <<<<<<<<<<<<<< * """Solves the current LP. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":364 * return objval * * def getPrimal(self): # <<<<<<<<<<<<<< * """Returns the primal solution of the last LP solve.""" * ncols = self.ncols() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_47getPrimal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_46getPrimal[] = "Returns the primal solution of the last LP solve."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_47getPrimal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPrimal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_46getPrimal(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_46getPrimal(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_v_ncols = NULL; SCIP_Real *__pyx_v_c_primalsol; PyObject *__pyx_v_primalsol = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPrimal", 0); /* "src/pyscipopt/lp.pxi":366 * def getPrimal(self): * """Returns the primal solution of the last LP solve.""" * ncols = self.ncols() # <<<<<<<<<<<<<< * cdef SCIP_Real* c_primalsol = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, c_primalsol, NULL, NULL, NULL)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ncols = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":367 * """Returns the primal solution of the last LP solve.""" * ncols = self.ncols() * cdef SCIP_Real* c_primalsol = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, c_primalsol, NULL, NULL, NULL)) * primalsol = [0.0] * ncols */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c_primalsol = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":368 * ncols = self.ncols() * cdef SCIP_Real* c_primalsol = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, c_primalsol, NULL, NULL, NULL)) # <<<<<<<<<<<<<< * primalsol = [0.0] * ncols * for i in range(ncols): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetSol(__pyx_v_self->lpi, NULL, __pyx_v_c_primalsol, NULL, NULL, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":369 * cdef SCIP_Real* c_primalsol = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, c_primalsol, NULL, NULL, NULL)) * primalsol = [0.0] * ncols # <<<<<<<<<<<<<< * for i in range(ncols): * primalsol[i] = c_primalsol[i] */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_0_0); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_ncols); if (unlikely(!__pyx_temp)) __PYX_ERR(1, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_temp; } __pyx_v_primalsol = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":370 * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, c_primalsol, NULL, NULL, NULL)) * primalsol = [0.0] * ncols * for i in range(ncols): # <<<<<<<<<<<<<< * primalsol[i] = c_primalsol[i] * free(c_primalsol) */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 370, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 370, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 370, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 370, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":371 * primalsol = [0.0] * ncols * for i in range(ncols): * primalsol[i] = c_primalsol[i] # <<<<<<<<<<<<<< * free(c_primalsol) * */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 371, __pyx_L1_error) __pyx_t_2 = PyFloat_FromDouble((__pyx_v_c_primalsol[__pyx_t_8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyObject_SetItem(__pyx_v_primalsol, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(1, 371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":370 * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, c_primalsol, NULL, NULL, NULL)) * primalsol = [0.0] * ncols * for i in range(ncols): # <<<<<<<<<<<<<< * primalsol[i] = c_primalsol[i] * free(c_primalsol) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":372 * for i in range(ncols): * primalsol[i] = c_primalsol[i] * free(c_primalsol) # <<<<<<<<<<<<<< * * return primalsol */ free(__pyx_v_c_primalsol); /* "src/pyscipopt/lp.pxi":374 * free(c_primalsol) * * return primalsol # <<<<<<<<<<<<<< * * def isPrimalFeasible(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_primalsol); __pyx_r = __pyx_v_primalsol; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":364 * return objval * * def getPrimal(self): # <<<<<<<<<<<<<< * """Returns the primal solution of the last LP solve.""" * ncols = self.ncols() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.getPrimal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ncols); __Pyx_XDECREF(__pyx_v_primalsol); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":376 * return primalsol * * def isPrimalFeasible(self): # <<<<<<<<<<<<<< * """Returns True iff LP is proven to be primal feasible.""" * return SCIPlpiIsPrimalFeasible(self.lpi) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_49isPrimalFeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_48isPrimalFeasible[] = "Returns True iff LP is proven to be primal feasible."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_49isPrimalFeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isPrimalFeasible (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_48isPrimalFeasible(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_48isPrimalFeasible(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isPrimalFeasible", 0); /* "src/pyscipopt/lp.pxi":378 * def isPrimalFeasible(self): * """Returns True iff LP is proven to be primal feasible.""" * return SCIPlpiIsPrimalFeasible(self.lpi) # <<<<<<<<<<<<<< * * def getDual(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPlpiIsPrimalFeasible(__pyx_v_self->lpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":376 * return primalsol * * def isPrimalFeasible(self): # <<<<<<<<<<<<<< * """Returns True iff LP is proven to be primal feasible.""" * return SCIPlpiIsPrimalFeasible(self.lpi) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.LP.isPrimalFeasible", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":380 * return SCIPlpiIsPrimalFeasible(self.lpi) * * def getDual(self): # <<<<<<<<<<<<<< * """Returns the dual solution of the last LP solve.""" * nrows = self.nrows() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_51getDual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_50getDual[] = "Returns the dual solution of the last LP solve."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_51getDual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDual (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_50getDual(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_50getDual(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_v_nrows = NULL; SCIP_Real *__pyx_v_c_dualsol; PyObject *__pyx_v_dualsol = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDual", 0); /* "src/pyscipopt/lp.pxi":382 * def getDual(self): * """Returns the dual solution of the last LP solve.""" * nrows = self.nrows() # <<<<<<<<<<<<<< * cdef SCIP_Real* c_dualsol = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, c_dualsol, NULL, NULL)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nrows = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":383 * """Returns the dual solution of the last LP solve.""" * nrows = self.nrows() * cdef SCIP_Real* c_dualsol = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, c_dualsol, NULL, NULL)) * dualsol = [0.0] * nrows */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c_dualsol = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":384 * nrows = self.nrows() * cdef SCIP_Real* c_dualsol = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, c_dualsol, NULL, NULL)) # <<<<<<<<<<<<<< * dualsol = [0.0] * nrows * for i in range(nrows): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetSol(__pyx_v_self->lpi, NULL, NULL, __pyx_v_c_dualsol, NULL, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":385 * cdef SCIP_Real* c_dualsol = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, c_dualsol, NULL, NULL)) * dualsol = [0.0] * nrows # <<<<<<<<<<<<<< * for i in range(nrows): * dualsol[i] = c_dualsol[i] */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_0_0); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_nrows); if (unlikely(!__pyx_temp)) __PYX_ERR(1, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_temp; } __pyx_v_dualsol = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":386 * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, c_dualsol, NULL, NULL)) * dualsol = [0.0] * nrows * for i in range(nrows): # <<<<<<<<<<<<<< * dualsol[i] = c_dualsol[i] * free(c_dualsol) */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 386, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 386, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 386, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 386, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":387 * dualsol = [0.0] * nrows * for i in range(nrows): * dualsol[i] = c_dualsol[i] # <<<<<<<<<<<<<< * free(c_dualsol) * */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 387, __pyx_L1_error) __pyx_t_2 = PyFloat_FromDouble((__pyx_v_c_dualsol[__pyx_t_8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyObject_SetItem(__pyx_v_dualsol, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":386 * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, c_dualsol, NULL, NULL)) * dualsol = [0.0] * nrows * for i in range(nrows): # <<<<<<<<<<<<<< * dualsol[i] = c_dualsol[i] * free(c_dualsol) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":388 * for i in range(nrows): * dualsol[i] = c_dualsol[i] * free(c_dualsol) # <<<<<<<<<<<<<< * * return dualsol */ free(__pyx_v_c_dualsol); /* "src/pyscipopt/lp.pxi":390 * free(c_dualsol) * * return dualsol # <<<<<<<<<<<<<< * * def isDualFeasible(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dualsol); __pyx_r = __pyx_v_dualsol; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":380 * return SCIPlpiIsPrimalFeasible(self.lpi) * * def getDual(self): # <<<<<<<<<<<<<< * """Returns the dual solution of the last LP solve.""" * nrows = self.nrows() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.getDual", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nrows); __Pyx_XDECREF(__pyx_v_dualsol); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":392 * return dualsol * * def isDualFeasible(self): # <<<<<<<<<<<<<< * """Returns True iff LP is proven to be dual feasible.""" * return SCIPlpiIsDualFeasible(self.lpi) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_53isDualFeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_52isDualFeasible[] = "Returns True iff LP is proven to be dual feasible."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_53isDualFeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isDualFeasible (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_52isDualFeasible(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_52isDualFeasible(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isDualFeasible", 0); /* "src/pyscipopt/lp.pxi":394 * def isDualFeasible(self): * """Returns True iff LP is proven to be dual feasible.""" * return SCIPlpiIsDualFeasible(self.lpi) # <<<<<<<<<<<<<< * * def getPrimalRay(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPlpiIsDualFeasible(__pyx_v_self->lpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":392 * return dualsol * * def isDualFeasible(self): # <<<<<<<<<<<<<< * """Returns True iff LP is proven to be dual feasible.""" * return SCIPlpiIsDualFeasible(self.lpi) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.LP.isDualFeasible", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":396 * return SCIPlpiIsDualFeasible(self.lpi) * * def getPrimalRay(self): # <<<<<<<<<<<<<< * """Returns a primal ray if possible, None otherwise.""" * if not SCIPlpiHasPrimalRay(self.lpi): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_55getPrimalRay(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_54getPrimalRay[] = "Returns a primal ray if possible, None otherwise."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_55getPrimalRay(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPrimalRay (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_54getPrimalRay(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_54getPrimalRay(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_v_ncols = NULL; SCIP_Real *__pyx_v_c_ray; PyObject *__pyx_v_ray = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPrimalRay", 0); /* "src/pyscipopt/lp.pxi":398 * def getPrimalRay(self): * """Returns a primal ray if possible, None otherwise.""" * if not SCIPlpiHasPrimalRay(self.lpi): # <<<<<<<<<<<<<< * return None * ncols = self.ncols() */ __pyx_t_1 = ((!(SCIPlpiHasPrimalRay(__pyx_v_self->lpi) != 0)) != 0); if (__pyx_t_1) { /* "src/pyscipopt/lp.pxi":399 * """Returns a primal ray if possible, None otherwise.""" * if not SCIPlpiHasPrimalRay(self.lpi): * return None # <<<<<<<<<<<<<< * ncols = self.ncols() * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "src/pyscipopt/lp.pxi":398 * def getPrimalRay(self): * """Returns a primal ray if possible, None otherwise.""" * if not SCIPlpiHasPrimalRay(self.lpi): # <<<<<<<<<<<<<< * return None * ncols = self.ncols() */ } /* "src/pyscipopt/lp.pxi":400 * if not SCIPlpiHasPrimalRay(self.lpi): * return None * ncols = self.ncols() # <<<<<<<<<<<<<< * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetPrimalRay(self.lpi, c_ray)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_ncols = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":401 * return None * ncols = self.ncols() * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetPrimalRay(self.lpi, c_ray)) * ray = [0.0] * ncols */ __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_ray = ((SCIP_Real *)malloc(__pyx_t_5)); /* "src/pyscipopt/lp.pxi":402 * ncols = self.ncols() * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetPrimalRay(self.lpi, c_ray)) # <<<<<<<<<<<<<< * ray = [0.0] * ncols * for i in range(ncols): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetPrimalRay(__pyx_v_self->lpi, __pyx_v_c_ray)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":403 * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetPrimalRay(self.lpi, c_ray)) * ray = [0.0] * ncols # <<<<<<<<<<<<<< * for i in range(ncols): * ray[i] = c_ray[i] */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_float_0_0); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_v_ncols); if (unlikely(!__pyx_temp)) __PYX_ERR(1, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_temp; } __pyx_v_ray = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":404 * PY_SCIP_CALL(SCIPlpiGetPrimalRay(self.lpi, c_ray)) * ray = [0.0] * ncols * for i in range(ncols): # <<<<<<<<<<<<<< * ray[i] = c_ray[i] * free(c_ray) */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 404, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 404, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 404, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 404, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":405 * ray = [0.0] * ncols * for i in range(ncols): * ray[i] = c_ray[i] # <<<<<<<<<<<<<< * free(c_ray) * */ __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 405, __pyx_L1_error) __pyx_t_3 = PyFloat_FromDouble((__pyx_v_c_ray[__pyx_t_9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyObject_SetItem(__pyx_v_ray, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(1, 405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":404 * PY_SCIP_CALL(SCIPlpiGetPrimalRay(self.lpi, c_ray)) * ray = [0.0] * ncols * for i in range(ncols): # <<<<<<<<<<<<<< * ray[i] = c_ray[i] * free(c_ray) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":406 * for i in range(ncols): * ray[i] = c_ray[i] * free(c_ray) # <<<<<<<<<<<<<< * * return ray */ free(__pyx_v_c_ray); /* "src/pyscipopt/lp.pxi":408 * free(c_ray) * * return ray # <<<<<<<<<<<<<< * * def getDualRay(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ray); __pyx_r = __pyx_v_ray; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":396 * return SCIPlpiIsDualFeasible(self.lpi) * * def getPrimalRay(self): # <<<<<<<<<<<<<< * """Returns a primal ray if possible, None otherwise.""" * if not SCIPlpiHasPrimalRay(self.lpi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.getPrimalRay", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ncols); __Pyx_XDECREF(__pyx_v_ray); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":410 * return ray * * def getDualRay(self): # <<<<<<<<<<<<<< * """Returns a dual ray if possible, None otherwise.""" * if not SCIPlpiHasDualRay(self.lpi): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_57getDualRay(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_56getDualRay[] = "Returns a dual ray if possible, None otherwise."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_57getDualRay(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDualRay (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_56getDualRay(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_56getDualRay(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_v_nrows = NULL; SCIP_Real *__pyx_v_c_ray; PyObject *__pyx_v_ray = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDualRay", 0); /* "src/pyscipopt/lp.pxi":412 * def getDualRay(self): * """Returns a dual ray if possible, None otherwise.""" * if not SCIPlpiHasDualRay(self.lpi): # <<<<<<<<<<<<<< * return None * nrows = self.nrows() */ __pyx_t_1 = ((!(SCIPlpiHasDualRay(__pyx_v_self->lpi) != 0)) != 0); if (__pyx_t_1) { /* "src/pyscipopt/lp.pxi":413 * """Returns a dual ray if possible, None otherwise.""" * if not SCIPlpiHasDualRay(self.lpi): * return None # <<<<<<<<<<<<<< * nrows = self.nrows() * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "src/pyscipopt/lp.pxi":412 * def getDualRay(self): * """Returns a dual ray if possible, None otherwise.""" * if not SCIPlpiHasDualRay(self.lpi): # <<<<<<<<<<<<<< * return None * nrows = self.nrows() */ } /* "src/pyscipopt/lp.pxi":414 * if not SCIPlpiHasDualRay(self.lpi): * return None * nrows = self.nrows() # <<<<<<<<<<<<<< * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetDualfarkas(self.lpi, c_ray)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nrows = __pyx_t_2; __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":415 * return None * nrows = self.nrows() * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetDualfarkas(self.lpi, c_ray)) * ray = [0.0] * nrows */ __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_c_ray = ((SCIP_Real *)malloc(__pyx_t_5)); /* "src/pyscipopt/lp.pxi":416 * nrows = self.nrows() * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetDualfarkas(self.lpi, c_ray)) # <<<<<<<<<<<<<< * ray = [0.0] * nrows * for i in range(nrows): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetDualfarkas(__pyx_v_self->lpi, __pyx_v_c_ray)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":417 * cdef SCIP_Real* c_ray = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetDualfarkas(self.lpi, c_ray)) * ray = [0.0] * nrows # <<<<<<<<<<<<<< * for i in range(nrows): * ray[i] = c_ray[i] */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_float_0_0); __Pyx_GIVEREF(__pyx_float_0_0); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_float_0_0); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_v_nrows); if (unlikely(!__pyx_temp)) __PYX_ERR(1, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_temp; } __pyx_v_ray = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":418 * PY_SCIP_CALL(SCIPlpiGetDualfarkas(self.lpi, c_ray)) * ray = [0.0] * nrows * for i in range(nrows): # <<<<<<<<<<<<<< * ray[i] = c_ray[i] * free(c_ray) */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 418, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 418, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 418, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 418, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":419 * ray = [0.0] * nrows * for i in range(nrows): * ray[i] = c_ray[i] # <<<<<<<<<<<<<< * free(c_ray) * */ __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 419, __pyx_L1_error) __pyx_t_3 = PyFloat_FromDouble((__pyx_v_c_ray[__pyx_t_9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyObject_SetItem(__pyx_v_ray, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(1, 419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":418 * PY_SCIP_CALL(SCIPlpiGetDualfarkas(self.lpi, c_ray)) * ray = [0.0] * nrows * for i in range(nrows): # <<<<<<<<<<<<<< * ray[i] = c_ray[i] * free(c_ray) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":420 * for i in range(nrows): * ray[i] = c_ray[i] * free(c_ray) # <<<<<<<<<<<<<< * * return ray */ free(__pyx_v_c_ray); /* "src/pyscipopt/lp.pxi":422 * free(c_ray) * * return ray # <<<<<<<<<<<<<< * * def getNIterations(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ray); __pyx_r = __pyx_v_ray; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":410 * return ray * * def getDualRay(self): # <<<<<<<<<<<<<< * """Returns a dual ray if possible, None otherwise.""" * if not SCIPlpiHasDualRay(self.lpi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.LP.getDualRay", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nrows); __Pyx_XDECREF(__pyx_v_ray); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":424 * return ray * * def getNIterations(self): # <<<<<<<<<<<<<< * """Returns the number of LP iterations of the last LP solve.""" * cdef int niters */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_59getNIterations(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_58getNIterations[] = "Returns the number of LP iterations of the last LP solve."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_59getNIterations(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNIterations (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_58getNIterations(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_58getNIterations(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { int __pyx_v_niters; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNIterations", 0); /* "src/pyscipopt/lp.pxi":427 * """Returns the number of LP iterations of the last LP solve.""" * cdef int niters * PY_SCIP_CALL(SCIPlpiGetIterations(self.lpi, &niters)) # <<<<<<<<<<<<<< * return niters * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetIterations(__pyx_v_self->lpi, (&__pyx_v_niters))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":428 * cdef int niters * PY_SCIP_CALL(SCIPlpiGetIterations(self.lpi, &niters)) * return niters # <<<<<<<<<<<<<< * * def getRedcost(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_niters); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":424 * return ray * * def getNIterations(self): # <<<<<<<<<<<<<< * """Returns the number of LP iterations of the last LP solve.""" * cdef int niters */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.LP.getNIterations", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":430 * return niters * * def getRedcost(self): # <<<<<<<<<<<<<< * """Returns the reduced cost vector of the last LP solve.""" * ncols = self.ncols() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_61getRedcost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_60getRedcost[] = "Returns the reduced cost vector of the last LP solve."; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_61getRedcost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRedcost (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_60getRedcost(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_60getRedcost(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_v_ncols = NULL; SCIP_Real *__pyx_v_c_redcost; PyObject *__pyx_v_redcost = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRedcost", 0); /* "src/pyscipopt/lp.pxi":432 * def getRedcost(self): * """Returns the reduced cost vector of the last LP solve.""" * ncols = self.ncols() # <<<<<<<<<<<<<< * * cdef SCIP_Real* c_redcost = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ncols = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":434 * ncols = self.ncols() * * cdef SCIP_Real* c_redcost = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, NULL, NULL, c_redcost)) * */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_Real))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_v_ncols, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c_redcost = ((SCIP_Real *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":435 * * cdef SCIP_Real* c_redcost = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, NULL, NULL, c_redcost)) # <<<<<<<<<<<<<< * * redcost = [] */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetSol(__pyx_v_self->lpi, NULL, NULL, NULL, NULL, __pyx_v_c_redcost)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":437 * PY_SCIP_CALL(SCIPlpiGetSol(self.lpi, NULL, NULL, NULL, NULL, c_redcost)) * * redcost = [] # <<<<<<<<<<<<<< * for i in range(ncols): * redcost[i].append(c_redcost[i]) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_redcost = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":438 * * redcost = [] * for i in range(ncols): # <<<<<<<<<<<<<< * redcost[i].append(c_redcost[i]) * */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 438, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 438, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 438, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":439 * redcost = [] * for i in range(ncols): * redcost[i].append(c_redcost[i]) # <<<<<<<<<<<<<< * * free(c_redcost) */ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_redcost, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 439, __pyx_L1_error) __pyx_t_3 = PyFloat_FromDouble((__pyx_v_c_redcost[__pyx_t_8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/pyscipopt/lp.pxi":438 * * redcost = [] * for i in range(ncols): # <<<<<<<<<<<<<< * redcost[i].append(c_redcost[i]) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":441 * redcost[i].append(c_redcost[i]) * * free(c_redcost) # <<<<<<<<<<<<<< * return redcost * */ free(__pyx_v_c_redcost); /* "src/pyscipopt/lp.pxi":442 * * free(c_redcost) * return redcost # <<<<<<<<<<<<<< * * def getBasisInds(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_redcost); __pyx_r = __pyx_v_redcost; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":430 * return niters * * def getRedcost(self): # <<<<<<<<<<<<<< * """Returns the reduced cost vector of the last LP solve.""" * ncols = self.ncols() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.getRedcost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ncols); __Pyx_XDECREF(__pyx_v_redcost); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":444 * return redcost * * def getBasisInds(self): # <<<<<<<<<<<<<< * """Returns the indices of the basic columns and rows; index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * nrows = self.nrows() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_63getBasisInds(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_2LP_62getBasisInds[] = "Returns the indices of the basic columns and rows; index i >= 0 corresponds to column i, index i < 0 to row -i-1"; static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_63getBasisInds(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBasisInds (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_62getBasisInds(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_62getBasisInds(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_v_nrows = NULL; int *__pyx_v_c_binds; PyObject *__pyx_v_binds = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBasisInds", 0); /* "src/pyscipopt/lp.pxi":446 * def getBasisInds(self): * """Returns the indices of the basic columns and rows; index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * nrows = self.nrows() # <<<<<<<<<<<<<< * cdef int* c_binds = <int*> malloc(nrows * sizeof(int)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nrows = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":447 * """Returns the indices of the basic columns and rows; index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * nrows = self.nrows() * cdef int* c_binds = <int*> malloc(nrows * sizeof(int)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPlpiGetBasisInd(self.lpi, c_binds)) */ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_v_nrows, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c_binds = ((int *)malloc(__pyx_t_4)); /* "src/pyscipopt/lp.pxi":449 * cdef int* c_binds = <int*> malloc(nrows * sizeof(int)) * * PY_SCIP_CALL(SCIPlpiGetBasisInd(self.lpi, c_binds)) # <<<<<<<<<<<<<< * * binds = [] */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetBasisInd(__pyx_v_self->lpi, __pyx_v_c_binds)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":451 * PY_SCIP_CALL(SCIPlpiGetBasisInd(self.lpi, c_binds)) * * binds = [] # <<<<<<<<<<<<<< * for i in range(nrows): * binds.append(c_binds[i]) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_binds = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":452 * * binds = [] * for i in range(nrows): # <<<<<<<<<<<<<< * binds.append(c_binds[i]) * */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 452, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 452, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 452, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 452, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":453 * binds = [] * for i in range(nrows): * binds.append(c_binds[i]) # <<<<<<<<<<<<<< * * free(c_binds) */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 453, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_c_binds[__pyx_t_8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_binds, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/lp.pxi":452 * * binds = [] * for i in range(nrows): # <<<<<<<<<<<<<< * binds.append(c_binds[i]) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/lp.pxi":455 * binds.append(c_binds[i]) * * free(c_binds) # <<<<<<<<<<<<<< * return binds */ free(__pyx_v_c_binds); /* "src/pyscipopt/lp.pxi":456 * * free(c_binds) * return binds # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_binds); __pyx_r = __pyx_v_binds; goto __pyx_L0; /* "src/pyscipopt/lp.pxi":444 * return redcost * * def getBasisInds(self): # <<<<<<<<<<<<<< * """Returns the indices of the basic columns and rows; index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * nrows = self.nrows() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.LP.getBasisInds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nrows); __Pyx_XDECREF(__pyx_v_binds); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/lp.pxi":5 * cdef class LP: * cdef SCIP_LPI* lpi * cdef readonly str name # <<<<<<<<<<<<<< * * def __init__(self, name="LP", sense="minimize"): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_4name___get__(struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.lpi cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_65__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_65__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_64__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_64__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.lpi cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.LP.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.lpi cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_67__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_2LP_67__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_2LP_66__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_LP *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_2LP_66__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_LP *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.lpi cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.lpi cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.LP.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":7 * cdef public str name * * def bendersfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of Benders decomposition ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_1bendersfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_bendersfree[] = "calls destructor and frees memory of Benders decomposition "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_1bendersfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_bendersfree(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_bendersfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":11 * pass * * def bendersinit(self): # <<<<<<<<<<<<<< * '''initializes Benders deconposition''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_3bendersinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_2bendersinit[] = "initializes Benders deconposition"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_3bendersinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_2bendersinit(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_2bendersinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":15 * pass * * def bendersexit(self): # <<<<<<<<<<<<<< * '''calls exit method of Benders decomposition''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_5bendersexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_4bendersexit[] = "calls exit method of Benders decomposition"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_5bendersexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_4bendersexit(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_4bendersexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":19 * pass * * def bendersinitpre(self): # <<<<<<<<<<<<<< * '''informs the Benders decomposition that the presolving process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_7bendersinitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_6bendersinitpre[] = "informs the Benders decomposition that the presolving process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_7bendersinitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersinitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_6bendersinitpre(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_6bendersinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersinitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":23 * pass * * def bendersexitpre(self): # <<<<<<<<<<<<<< * '''informs the Benders decomposition that the presolving process has been completed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_9bendersexitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_8bendersexitpre[] = "informs the Benders decomposition that the presolving process has been completed"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_9bendersexitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersexitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_8bendersexitpre(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_8bendersexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersexitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":27 * pass * * def bendersinitsol(self): # <<<<<<<<<<<<<< * '''informs Benders decomposition that the branch and bound process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_11bendersinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_10bendersinitsol[] = "informs Benders decomposition that the branch and bound process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_11bendersinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_10bendersinitsol(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_10bendersinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":31 * pass * * def bendersexitsol(self): # <<<<<<<<<<<<<< * '''informs Benders decomposition that the branch and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_13bendersexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_12bendersexitsol[] = "informs Benders decomposition that the branch and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_13bendersexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_12bendersexitsol(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_12bendersexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":35 * pass * * def benderscreatesub(self, probnumber): # <<<<<<<<<<<<<< * '''creates the subproblems and registers it with the Benders decomposition struct ''' * print("python error in benderscreatesub: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_15benderscreatesub(PyObject *__pyx_v_self, PyObject *__pyx_v_probnumber); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_14benderscreatesub[] = "creates the subproblems and registers it with the Benders decomposition struct "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_15benderscreatesub(PyObject *__pyx_v_self, PyObject *__pyx_v_probnumber) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscreatesub (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_14benderscreatesub(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), ((PyObject *)__pyx_v_probnumber)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_14benderscreatesub(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_probnumber) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("benderscreatesub", 0); /* "src/pyscipopt/benders.pxi":37 * def benderscreatesub(self, probnumber): * '''creates the subproblems and registers it with the Benders decomposition struct ''' * print("python error in benderscreatesub: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":38 * '''creates the subproblems and registers it with the Benders decomposition struct ''' * print("python error in benderscreatesub: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def benderspresubsolve(self, solution, enfotype, checkint): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":35 * pass * * def benderscreatesub(self, probnumber): # <<<<<<<<<<<<<< * '''creates the subproblems and registers it with the Benders decomposition struct ''' * print("python error in benderscreatesub: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.benderscreatesub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":40 * return {} * * def benderspresubsolve(self, solution, enfotype, checkint): # <<<<<<<<<<<<<< * '''sets the pre subproblem solve callback of Benders decomposition ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_17benderspresubsolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_16benderspresubsolve[] = "sets the pre subproblem solve callback of Benders decomposition "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_17benderspresubsolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_enfotype = 0; CYTHON_UNUSED PyObject *__pyx_v_checkint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderspresubsolve (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_enfotype,&__pyx_n_s_checkint,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enfotype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspresubsolve", 1, 3, 3, 1); __PYX_ERR(2, 40, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkint)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspresubsolve", 1, 3, 3, 2); __PYX_ERR(2, 40, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "benderspresubsolve") < 0)) __PYX_ERR(2, 40, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_solution = values[0]; __pyx_v_enfotype = values[1]; __pyx_v_checkint = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("benderspresubsolve", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 40, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Benders.benderspresubsolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_16benderspresubsolve(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), __pyx_v_solution, __pyx_v_enfotype, __pyx_v_checkint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_16benderspresubsolve(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_enfotype, CYTHON_UNUSED PyObject *__pyx_v_checkint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("benderspresubsolve", 0); /* "src/pyscipopt/benders.pxi":42 * def benderspresubsolve(self, solution, enfotype, checkint): * '''sets the pre subproblem solve callback of Benders decomposition ''' * return {} # <<<<<<<<<<<<<< * * def benderssolvesubconvex(self, solution, probnumber, onlyconvex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":40 * return {} * * def benderspresubsolve(self, solution, enfotype, checkint): # <<<<<<<<<<<<<< * '''sets the pre subproblem solve callback of Benders decomposition ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.benderspresubsolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":44 * return {} * * def benderssolvesubconvex(self, solution, probnumber, onlyconvex): # <<<<<<<<<<<<<< * '''sets convex solve callback of Benders decomposition''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_19benderssolvesubconvex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_18benderssolvesubconvex[] = "sets convex solve callback of Benders decomposition"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_19benderssolvesubconvex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_probnumber = 0; CYTHON_UNUSED PyObject *__pyx_v_onlyconvex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderssolvesubconvex (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_probnumber,&__pyx_n_s_onlyconvex,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderssolvesubconvex", 1, 3, 3, 1); __PYX_ERR(2, 44, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_onlyconvex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderssolvesubconvex", 1, 3, 3, 2); __PYX_ERR(2, 44, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "benderssolvesubconvex") < 0)) __PYX_ERR(2, 44, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_solution = values[0]; __pyx_v_probnumber = values[1]; __pyx_v_onlyconvex = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("benderssolvesubconvex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 44, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Benders.benderssolvesubconvex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_18benderssolvesubconvex(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), __pyx_v_solution, __pyx_v_probnumber, __pyx_v_onlyconvex); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_18benderssolvesubconvex(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_probnumber, CYTHON_UNUSED PyObject *__pyx_v_onlyconvex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("benderssolvesubconvex", 0); /* "src/pyscipopt/benders.pxi":46 * def benderssolvesubconvex(self, solution, probnumber, onlyconvex): * '''sets convex solve callback of Benders decomposition''' * return {} # <<<<<<<<<<<<<< * * def benderssolvesub(self, solution, probnumber): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":44 * return {} * * def benderssolvesubconvex(self, solution, probnumber, onlyconvex): # <<<<<<<<<<<<<< * '''sets convex solve callback of Benders decomposition''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.benderssolvesubconvex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":48 * return {} * * def benderssolvesub(self, solution, probnumber): # <<<<<<<<<<<<<< * '''sets solve callback of Benders decomposition ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_21benderssolvesub(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_20benderssolvesub[] = "sets solve callback of Benders decomposition "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_21benderssolvesub(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_probnumber = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderssolvesub (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_probnumber,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderssolvesub", 1, 2, 2, 1); __PYX_ERR(2, 48, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "benderssolvesub") < 0)) __PYX_ERR(2, 48, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_solution = values[0]; __pyx_v_probnumber = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("benderssolvesub", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Benders.benderssolvesub", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_20benderssolvesub(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), __pyx_v_solution, __pyx_v_probnumber); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_20benderssolvesub(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_probnumber) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("benderssolvesub", 0); /* "src/pyscipopt/benders.pxi":50 * def benderssolvesub(self, solution, probnumber): * '''sets solve callback of Benders decomposition ''' * return {} # <<<<<<<<<<<<<< * * def benderspostsolve(self, solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":48 * return {} * * def benderssolvesub(self, solution, probnumber): # <<<<<<<<<<<<<< * '''sets solve callback of Benders decomposition ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.benderssolvesub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":52 * return {} * * def benderspostsolve(self, solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible): # <<<<<<<<<<<<<< * '''sets post-solve callback of Benders decomposition ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_23benderspostsolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_22benderspostsolve[] = "sets post-solve callback of Benders decomposition "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_23benderspostsolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_enfotype = 0; CYTHON_UNUSED PyObject *__pyx_v_mergecandidates = 0; CYTHON_UNUSED PyObject *__pyx_v_npriomergecands = 0; CYTHON_UNUSED PyObject *__pyx_v_checkint = 0; CYTHON_UNUSED PyObject *__pyx_v_infeasible = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderspostsolve (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_enfotype,&__pyx_n_s_mergecandidates,&__pyx_n_s_npriomergecands,&__pyx_n_s_checkint,&__pyx_n_s_infeasible,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enfotype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspostsolve", 1, 6, 6, 1); __PYX_ERR(2, 52, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mergecandidates)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspostsolve", 1, 6, 6, 2); __PYX_ERR(2, 52, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_npriomergecands)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspostsolve", 1, 6, 6, 3); __PYX_ERR(2, 52, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkint)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspostsolve", 1, 6, 6, 4); __PYX_ERR(2, 52, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_infeasible)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderspostsolve", 1, 6, 6, 5); __PYX_ERR(2, 52, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "benderspostsolve") < 0)) __PYX_ERR(2, 52, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_solution = values[0]; __pyx_v_enfotype = values[1]; __pyx_v_mergecandidates = values[2]; __pyx_v_npriomergecands = values[3]; __pyx_v_checkint = values[4]; __pyx_v_infeasible = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("benderspostsolve", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 52, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Benders.benderspostsolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_22benderspostsolve(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), __pyx_v_solution, __pyx_v_enfotype, __pyx_v_mergecandidates, __pyx_v_npriomergecands, __pyx_v_checkint, __pyx_v_infeasible); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_22benderspostsolve(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_enfotype, CYTHON_UNUSED PyObject *__pyx_v_mergecandidates, CYTHON_UNUSED PyObject *__pyx_v_npriomergecands, CYTHON_UNUSED PyObject *__pyx_v_checkint, CYTHON_UNUSED PyObject *__pyx_v_infeasible) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("benderspostsolve", 0); /* "src/pyscipopt/benders.pxi":54 * def benderspostsolve(self, solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible): * '''sets post-solve callback of Benders decomposition ''' * return {} # <<<<<<<<<<<<<< * * def bendersfreesub(self, probnumber): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":52 * return {} * * def benderspostsolve(self, solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible): # <<<<<<<<<<<<<< * '''sets post-solve callback of Benders decomposition ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.benderspostsolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":56 * return {} * * def bendersfreesub(self, probnumber): # <<<<<<<<<<<<<< * '''frees the subproblems''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_25bendersfreesub(PyObject *__pyx_v_self, PyObject *__pyx_v_probnumber); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_24bendersfreesub[] = "frees the subproblems"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_25bendersfreesub(PyObject *__pyx_v_self, PyObject *__pyx_v_probnumber) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersfreesub (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_24bendersfreesub(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), ((PyObject *)__pyx_v_probnumber)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_24bendersfreesub(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_probnumber) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersfreesub", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":60 * pass * * def bendersgetvar(self, variable, probnumber): # <<<<<<<<<<<<<< * '''Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems. ''' * print("python error in bendersgetvar: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_27bendersgetvar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Benders_26bendersgetvar[] = "Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems. "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_27bendersgetvar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_variable = 0; CYTHON_UNUSED PyObject *__pyx_v_probnumber = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bendersgetvar (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_probnumber,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variable)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("bendersgetvar", 1, 2, 2, 1); __PYX_ERR(2, 60, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bendersgetvar") < 0)) __PYX_ERR(2, 60, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_variable = values[0]; __pyx_v_probnumber = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("bendersgetvar", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 60, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Benders.bendersgetvar", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_26bendersgetvar(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), __pyx_v_variable, __pyx_v_probnumber); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_26bendersgetvar(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_variable, CYTHON_UNUSED PyObject *__pyx_v_probnumber) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bendersgetvar", 0); /* "src/pyscipopt/benders.pxi":62 * def bendersgetvar(self, variable, probnumber): * '''Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems. ''' * print("python error in bendersgetvar: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":63 * '''Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems. ''' * print("python error in bendersgetvar: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * # local helper functions for the interface */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":60 * pass * * def bendersgetvar(self, variable, probnumber): # <<<<<<<<<<<<<< * '''Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems. ''' * print("python error in bendersgetvar: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.bendersgetvar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":4 * #@brief Base class of the Benders decomposition Plugin * cdef class Benders: * cdef public Model model # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7Benders_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7Benders_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7Benders_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(2, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7Benders_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7Benders_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7Benders_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":5 * cdef class Benders: * cdef public Model model * cdef public str name # <<<<<<<<<<<<<< * * def bendersfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7Benders_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7Benders_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7Benders_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7Benders_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7Benders_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7Benders_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_28__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_28__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Benders, (type(self), 0xecd383d, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Benders, (type(self), 0xecd383d, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Benders, (type(self), 0xecd383d, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Benders, (type(self), 0xecd383d, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Benders); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Benders, (type(self), 0xecd383d, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Benders, (type(self), 0xecd383d, None), state * else: * return __pyx_unpickle_Benders, (type(self), 0xecd383d, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Benders__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Benders); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Benders.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Benders, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Benders__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Benders_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Benders_30__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Benders_30__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Benders, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Benders__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Benders__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Benders, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Benders__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benders.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":66 * * # local helper functions for the interface * cdef Variable getPyVar(SCIP_VAR* var): # <<<<<<<<<<<<<< * cdef SCIP_VARDATA* vardata * vardata = SCIPvarGetData(var) */ static struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_f_9pyscipopt_4scip_getPyVar(SCIP_VAR *__pyx_v_var) { SCIP_VARDATA *__pyx_v_vardata; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPyVar", 0); /* "src/pyscipopt/benders.pxi":68 * cdef Variable getPyVar(SCIP_VAR* var): * cdef SCIP_VARDATA* vardata * vardata = SCIPvarGetData(var) # <<<<<<<<<<<<<< * return <Variable>vardata * */ __pyx_v_vardata = SCIPvarGetData(__pyx_v_var); /* "src/pyscipopt/benders.pxi":69 * cdef SCIP_VARDATA* vardata * vardata = SCIPvarGetData(var) * return <Variable>vardata # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_vardata))); __pyx_r = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_vardata); goto __pyx_L0; /* "src/pyscipopt/benders.pxi":66 * * # local helper functions for the interface * cdef Variable getPyVar(SCIP_VAR* var): # <<<<<<<<<<<<<< * cdef SCIP_VARDATA* vardata * vardata = SCIPvarGetData(var) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":72 * * * cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_BENDERS *__pyx_v_benders) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyBendersCopy", 0); /* "src/pyscipopt/benders.pxi":73 * * cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":72 * * * cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":75 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersFree", 0); /* "src/pyscipopt/benders.pxi":77 * cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersfree() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":78 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersfree() * Py_DECREF(PyBenders) */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":79 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersfree() # <<<<<<<<<<<<<< * Py_DECREF(PyBenders) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":80 * PyBenders = <Benders>bendersdata * PyBenders.bendersfree() * Py_DECREF(PyBenders) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyBenders)); /* "src/pyscipopt/benders.pxi":81 * PyBenders.bendersfree() * Py_DECREF(PyBenders) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":75 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":83 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersInit", 0); /* "src/pyscipopt/benders.pxi":85 * cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersinit() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":86 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":87 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":88 * PyBenders = <Benders>bendersdata * PyBenders.bendersinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":83 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":90 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersExit", 0); /* "src/pyscipopt/benders.pxi":92 * cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersexit() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":93 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":94 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":95 * PyBenders = <Benders>bendersdata * PyBenders.bendersexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":90 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":97 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersInitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersInitpre", 0); /* "src/pyscipopt/benders.pxi":99 * cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersinitpre() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":100 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersinitpre() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":101 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersinitpre() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersinitpre); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":102 * PyBenders = <Benders>bendersdata * PyBenders.bendersinitpre() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":97 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersInitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":104 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersExitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersExitpre", 0); /* "src/pyscipopt/benders.pxi":106 * cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersexitpre() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":107 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersexitpre() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":108 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersexitpre() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersexitpre); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":109 * PyBenders = <Benders>bendersdata * PyBenders.bendersexitpre() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":104 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersExitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":111 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersInitsol", 0); /* "src/pyscipopt/benders.pxi":113 * cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersinitsol() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":114 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":115 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":116 * PyBenders = <Benders>bendersdata * PyBenders.bendersinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":111 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":118 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersExitsol", 0); /* "src/pyscipopt/benders.pxi":120 * cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersexitsol() */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":121 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":122 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":123 * PyBenders = <Benders>bendersdata * PyBenders.bendersexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":118 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":125 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersCreatesub(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, int __pyx_v_probnumber) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersCreatesub", 0); /* "src/pyscipopt/benders.pxi":127 * cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.benderscreatesub(probnumber) */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":128 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.benderscreatesub(probnumber) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":129 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.benderscreatesub(probnumber) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_benderscreatesub); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_probnumber); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":130 * PyBenders = <Benders>bendersdata * PyBenders.benderscreatesub(probnumber) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* skipsolve, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":125 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersCreatesub", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":132 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* skipsolve, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersPresubsolve(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, SCIP_SOL *__pyx_v_sol, SCIP_BENDERSENFOTYPE __pyx_v_type, SCIP_Bool __pyx_v_checkint, SCIP_Bool *__pyx_v_skipsolve, SCIP_RESULT *__pyx_v_result) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; PyObject *__pyx_v_solution = NULL; SCIP_BENDERSENFOTYPE __pyx_v_enfotype; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; SCIP_Bool __pyx_t_9; SCIP_RESULT __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersPresubsolve", 0); /* "src/pyscipopt/benders.pxi":134 * cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* skipsolve, SCIP_RESULT* result): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * if sol == NULL: */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":135 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * if sol == NULL: * solution = None */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":136 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ __pyx_t_2 = ((__pyx_v_sol == NULL) != 0); if (__pyx_t_2) { /* "src/pyscipopt/benders.pxi":137 * PyBenders = <Benders>bendersdata * if sol == NULL: * solution = None # <<<<<<<<<<<<<< * else: * solution = Solution.create(sol) */ __Pyx_INCREF(Py_None); __pyx_v_solution = Py_None; /* "src/pyscipopt/benders.pxi":136 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ goto __pyx_L3; } /* "src/pyscipopt/benders.pxi":139 * solution = None * else: * solution = Solution.create(sol) # <<<<<<<<<<<<<< * enfotype = type * result_dict = PyBenders.benderspresubsolve(solution, enfotype, checkint) */ /*else*/ { __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(__pyx_v_sol); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/benders.pxi":140 * else: * solution = Solution.create(sol) * enfotype = type # <<<<<<<<<<<<<< * result_dict = PyBenders.benderspresubsolve(solution, enfotype, checkint) * skipsolve[0] = result_dict.get("skipsolve", False) */ __pyx_v_enfotype = __pyx_v_type; /* "src/pyscipopt/benders.pxi":141 * solution = Solution.create(sol) * enfotype = type * result_dict = PyBenders.benderspresubsolve(solution, enfotype, checkint) # <<<<<<<<<<<<<< * skipsolve[0] = result_dict.get("skipsolve", False) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_benderspresubsolve); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(__pyx_v_enfotype); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_checkint); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_solution, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_solution, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_solution); __Pyx_GIVEREF(__pyx_v_solution); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_solution); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":142 * enfotype = type * result_dict = PyBenders.benderspresubsolve(solution, enfotype, checkint) * skipsolve[0] = result_dict.get("skipsolve", False) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_skipsolve[0]) = __pyx_t_9; /* "src/pyscipopt/benders.pxi":143 * result_dict = PyBenders.benderspresubsolve(solution, enfotype, checkint) * skipsolve[0] = result_dict.get("skipsolve", False) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_result[0]) = __pyx_t_10; /* "src/pyscipopt/benders.pxi":144 * skipsolve[0] = result_dict.get("skipsolve", False) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":132 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* skipsolve, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersPresubsolve", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_XDECREF(__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":146 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersSolvesubconvex(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, SCIP_SOL *__pyx_v_sol, int __pyx_v_probnumber, SCIP_Bool __pyx_v_onlyconvex, SCIP_Real *__pyx_v_objective, SCIP_RESULT *__pyx_v_result) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; PyObject *__pyx_v_solution = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; SCIP_Real __pyx_t_9; SCIP_RESULT __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersSolvesubconvex", 0); /* "src/pyscipopt/benders.pxi":148 * cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * if sol == NULL: */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":149 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * if sol == NULL: * solution = None */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":150 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ __pyx_t_2 = ((__pyx_v_sol == NULL) != 0); if (__pyx_t_2) { /* "src/pyscipopt/benders.pxi":151 * PyBenders = <Benders>bendersdata * if sol == NULL: * solution = None # <<<<<<<<<<<<<< * else: * solution = Solution.create(sol) */ __Pyx_INCREF(Py_None); __pyx_v_solution = Py_None; /* "src/pyscipopt/benders.pxi":150 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ goto __pyx_L3; } /* "src/pyscipopt/benders.pxi":153 * solution = None * else: * solution = Solution.create(sol) # <<<<<<<<<<<<<< * result_dict = PyBenders.benderssolvesubconvex(solution, probnumber, onlyconvex) * objective[0] = result_dict.get("objective", 1e+20) */ /*else*/ { __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(__pyx_v_sol); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/benders.pxi":154 * else: * solution = Solution.create(sol) * result_dict = PyBenders.benderssolvesubconvex(solution, probnumber, onlyconvex) # <<<<<<<<<<<<<< * objective[0] = result_dict.get("objective", 1e+20) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_benderssolvesubconvex); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_probnumber); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_onlyconvex); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_solution, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_solution, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_solution); __Pyx_GIVEREF(__pyx_v_solution); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_solution); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":155 * solution = Solution.create(sol) * result_dict = PyBenders.benderssolvesubconvex(solution, probnumber, onlyconvex) * objective[0] = result_dict.get("objective", 1e+20) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(2, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_objective[0]) = __pyx_t_9; /* "src/pyscipopt/benders.pxi":156 * result_dict = PyBenders.benderssolvesubconvex(solution, probnumber, onlyconvex) * objective[0] = result_dict.get("objective", 1e+20) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_result[0]) = __pyx_t_10; /* "src/pyscipopt/benders.pxi":157 * objective[0] = result_dict.get("objective", 1e+20) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":146 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersSolvesubconvex", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_XDECREF(__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":159 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersSolvesub(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, SCIP_SOL *__pyx_v_sol, int __pyx_v_probnumber, SCIP_Real *__pyx_v_objective, SCIP_RESULT *__pyx_v_result) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; PyObject *__pyx_v_solution = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; SCIP_Real __pyx_t_8; SCIP_RESULT __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersSolvesub", 0); /* "src/pyscipopt/benders.pxi":161 * cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * if sol == NULL: */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":162 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * if sol == NULL: * solution = None */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":163 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ __pyx_t_2 = ((__pyx_v_sol == NULL) != 0); if (__pyx_t_2) { /* "src/pyscipopt/benders.pxi":164 * PyBenders = <Benders>bendersdata * if sol == NULL: * solution = None # <<<<<<<<<<<<<< * else: * solution = Solution.create(sol) */ __Pyx_INCREF(Py_None); __pyx_v_solution = Py_None; /* "src/pyscipopt/benders.pxi":163 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ goto __pyx_L3; } /* "src/pyscipopt/benders.pxi":166 * solution = None * else: * solution = Solution.create(sol) # <<<<<<<<<<<<<< * result_dict = PyBenders.benderssolvesub(solution, probnumber) * objective[0] = result_dict.get("objective", 1e+20) */ /*else*/ { __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(__pyx_v_sol); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/benders.pxi":167 * else: * solution = Solution.create(sol) * result_dict = PyBenders.benderssolvesub(solution, probnumber) # <<<<<<<<<<<<<< * objective[0] = result_dict.get("objective", 1e+20) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_benderssolvesub); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_probnumber); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_solution, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_solution, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_solution); __Pyx_GIVEREF(__pyx_v_solution); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_solution); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":168 * solution = Solution.create(sol) * result_dict = PyBenders.benderssolvesub(solution, probnumber) * objective[0] = result_dict.get("objective", 1e+20) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(2, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_objective[0]) = __pyx_t_8; /* "src/pyscipopt/benders.pxi":169 * result_dict = PyBenders.benderssolvesub(solution, probnumber) * objective[0] = result_dict.get("objective", 1e+20) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_7}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_7}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_result[0]) = __pyx_t_9; /* "src/pyscipopt/benders.pxi":170 * objective[0] = result_dict.get("objective", 1e+20) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":159 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersSolvesub", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_XDECREF(__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":172 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, # <<<<<<<<<<<<<< * SCIP_BENDERSENFOTYPE type, int* mergecands, int npriomergecands, int nmergecands, SCIP_Bool checkint, * SCIP_Bool infeasible, SCIP_Bool* merged): */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersPostsolve(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, SCIP_SOL *__pyx_v_sol, SCIP_BENDERSENFOTYPE __pyx_v_type, int *__pyx_v_mergecands, int __pyx_v_npriomergecands, int __pyx_v_nmergecands, SCIP_Bool __pyx_v_checkint, SCIP_Bool __pyx_v_infeasible, SCIP_Bool *__pyx_v_merged) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; PyObject *__pyx_v_solution = NULL; SCIP_BENDERSENFOTYPE __pyx_v_enfotype; PyObject *__pyx_v_mergecandidates = NULL; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; SCIP_Bool __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersPostsolve", 0); /* "src/pyscipopt/benders.pxi":176 * SCIP_Bool infeasible, SCIP_Bool* merged): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * if sol == NULL: */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":177 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * if sol == NULL: * solution = None */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":178 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ __pyx_t_2 = ((__pyx_v_sol == NULL) != 0); if (__pyx_t_2) { /* "src/pyscipopt/benders.pxi":179 * PyBenders = <Benders>bendersdata * if sol == NULL: * solution = None # <<<<<<<<<<<<<< * else: * solution = Solution.create(sol) */ __Pyx_INCREF(Py_None); __pyx_v_solution = Py_None; /* "src/pyscipopt/benders.pxi":178 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ goto __pyx_L3; } /* "src/pyscipopt/benders.pxi":181 * solution = None * else: * solution = Solution.create(sol) # <<<<<<<<<<<<<< * enfotype = type * mergecandidates = [] */ /*else*/ { __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(__pyx_v_sol); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/benders.pxi":182 * else: * solution = Solution.create(sol) * enfotype = type # <<<<<<<<<<<<<< * mergecandidates = [] * for i in range(nmergecands): */ __pyx_v_enfotype = __pyx_v_type; /* "src/pyscipopt/benders.pxi":183 * solution = Solution.create(sol) * enfotype = type * mergecandidates = [] # <<<<<<<<<<<<<< * for i in range(nmergecands): * mergecandidates.append(mergecands[i]) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mergecandidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":184 * enfotype = type * mergecandidates = [] * for i in range(nmergecands): # <<<<<<<<<<<<<< * mergecandidates.append(mergecands[i]) * result_dict = PyBenders.benderspostsolve(solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible) */ __pyx_t_3 = __pyx_v_nmergecands; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "src/pyscipopt/benders.pxi":185 * mergecandidates = [] * for i in range(nmergecands): * mergecandidates.append(mergecands[i]) # <<<<<<<<<<<<<< * result_dict = PyBenders.benderspostsolve(solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible) * merged[0] = result_dict.get("merged", False) */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_mergecands[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_mergecandidates, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/benders.pxi":186 * for i in range(nmergecands): * mergecandidates.append(mergecands[i]) * result_dict = PyBenders.benderspostsolve(solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible) # <<<<<<<<<<<<<< * merged[0] = result_dict.get("merged", False) * return SCIP_OKAY */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_benderspostsolve); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(__pyx_v_enfotype); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_npriomergecands); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_v_checkint); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_3 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_3 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_12, __pyx_v_solution, __pyx_t_8, __pyx_v_mergecandidates, __pyx_t_9, __pyx_t_10, __pyx_t_11}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_3, 6+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_12, __pyx_v_solution, __pyx_t_8, __pyx_v_mergecandidates, __pyx_t_9, __pyx_t_10, __pyx_t_11}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_3, 6+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_13 = PyTuple_New(6+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_v_solution); __Pyx_GIVEREF(__pyx_v_solution); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_3, __pyx_v_solution); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_v_mergecandidates); __Pyx_GIVEREF(__pyx_v_mergecandidates); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_3, __pyx_v_mergecandidates); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 4+__pyx_t_3, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 5+__pyx_t_3, __pyx_t_11); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":187 * mergecandidates.append(mergecands[i]) * result_dict = PyBenders.benderspostsolve(solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible) * merged[0] = result_dict.get("merged", False) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; (__pyx_v_merged[0]) = __pyx_t_14; /* "src/pyscipopt/benders.pxi":188 * result_dict = PyBenders.benderspostsolve(solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible) * merged[0] = result_dict.get("merged", False) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":172 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, # <<<<<<<<<<<<<< * SCIP_BENDERSENFOTYPE type, int* mergecands, int npriomergecands, int nmergecands, SCIP_Bool checkint, * SCIP_Bool infeasible, SCIP_Bool* merged): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersPostsolve", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_XDECREF(__pyx_v_solution); __Pyx_XDECREF(__pyx_v_mergecandidates); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":190 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersFreesub(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, int __pyx_v_probnumber) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersFreesub", 0); /* "src/pyscipopt/benders.pxi":192 * cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyBenders.bendersfreesub(probnumber) */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":193 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyBenders.bendersfreesub(probnumber) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":194 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyBenders.bendersfreesub(probnumber) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersfreesub); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_probnumber); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":195 * PyBenders = <Benders>bendersdata * PyBenders.bendersfreesub(probnumber) * return SCIP_OKAY # <<<<<<<<<<<<<< * * #TODO: Really need to ask about the passing and returning of variables */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":190 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersFreesub", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benders.pxi":198 * * #TODO: Really need to ask about the passing and returning of variables * cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBendersGetvar(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERS *__pyx_v_benders, SCIP_VAR *__pyx_v_var, SCIP_VAR **__pyx_v_mappedvar, int __pyx_v_probnumber) { SCIP_BENDERSDATA *__pyx_v_bendersdata; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_PyBenders = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_PyVar = NULL; PyObject *__pyx_v_result_dict = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_mappedvariable = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; SCIP_VAR *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBendersGetvar", 0); /* "src/pyscipopt/benders.pxi":200 * cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber): * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) # <<<<<<<<<<<<<< * PyBenders = <Benders>bendersdata * PyVar = getPyVar(var) */ __pyx_v_bendersdata = SCIPbendersGetData(__pyx_v_benders); /* "src/pyscipopt/benders.pxi":201 * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata # <<<<<<<<<<<<<< * PyVar = getPyVar(var) * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) */ __pyx_t_1 = ((PyObject *)__pyx_v_bendersdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":202 * bendersdata = SCIPbendersGetData(benders) * PyBenders = <Benders>bendersdata * PyVar = getPyVar(var) # <<<<<<<<<<<<<< * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyVar(__pyx_v_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyVar = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":203 * PyBenders = <Benders>bendersdata * PyVar = getPyVar(var) * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) # <<<<<<<<<<<<<< * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) * if mappedvariable is None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenders), __pyx_n_s_bendersgetvar); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_probnumber); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_PyVar), __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_PyVar), __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_PyVar)); __Pyx_GIVEREF(((PyObject *)__pyx_v_PyVar)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_PyVar)); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":204 * PyVar = getPyVar(var) * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) # <<<<<<<<<<<<<< * if mappedvariable is None: * mappedvar[0] = NULL */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_mappedvariable = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benders.pxi":205 * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) * if mappedvariable is None: # <<<<<<<<<<<<<< * mappedvar[0] = NULL * else: */ __pyx_t_7 = (((PyObject *)__pyx_v_mappedvariable) == Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "src/pyscipopt/benders.pxi":206 * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) * if mappedvariable is None: * mappedvar[0] = NULL # <<<<<<<<<<<<<< * else: * mappedvar[0] = mappedvariable.scip_var */ (__pyx_v_mappedvar[0]) = NULL; /* "src/pyscipopt/benders.pxi":205 * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) * if mappedvariable is None: # <<<<<<<<<<<<<< * mappedvar[0] = NULL * else: */ goto __pyx_L3; } /* "src/pyscipopt/benders.pxi":208 * mappedvar[0] = NULL * else: * mappedvar[0] = mappedvariable.scip_var # <<<<<<<<<<<<<< * return SCIP_OKAY */ /*else*/ { __pyx_t_9 = __pyx_v_mappedvariable->scip_var; (__pyx_v_mappedvar[0]) = __pyx_t_9; } __pyx_L3:; /* "src/pyscipopt/benders.pxi":209 * else: * mappedvar[0] = mappedvariable.scip_var * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benders.pxi":198 * * #TODO: Really need to ask about the passing and returning of variables * cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSDATA* bendersdata * bendersdata = SCIPbendersGetData(benders) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyBendersGetvar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenders); __Pyx_XDECREF((PyObject *)__pyx_v_PyVar); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_XDECREF((PyObject *)__pyx_v_mappedvariable); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":8 * cdef public str name * * def benderscutfree(self): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_1benderscutfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_1benderscutfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_benderscutfree(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_benderscutfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":11 * pass * * def benderscutinit(self): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_3benderscutinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_3benderscutinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_2benderscutinit(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_2benderscutinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":14 * pass * * def benderscutexit(self): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_5benderscutexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_5benderscutexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_4benderscutexit(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_4benderscutexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":17 * pass * * def benderscutinitsol(self): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_7benderscutinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_7benderscutinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_6benderscutinitsol(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_6benderscutinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":20 * pass * * def benderscutexitsol(self): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_9benderscutexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_9benderscutexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_8benderscutexitsol(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_8benderscutexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":23 * pass * * def benderscutexec(self, solution, probnumber, enfotype): # <<<<<<<<<<<<<< * print("python error in benderscutexec: this method needs to be implemented") * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_11benderscutexec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_11benderscutexec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_probnumber = 0; CYTHON_UNUSED PyObject *__pyx_v_enfotype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("benderscutexec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_probnumber,&__pyx_n_s_enfotype,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderscutexec", 1, 3, 3, 1); __PYX_ERR(5, 23, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enfotype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("benderscutexec", 1, 3, 3, 2); __PYX_ERR(5, 23, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "benderscutexec") < 0)) __PYX_ERR(5, 23, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_solution = values[0]; __pyx_v_probnumber = values[1]; __pyx_v_enfotype = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("benderscutexec", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 23, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Benderscut.benderscutexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_10benderscutexec(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self), __pyx_v_solution, __pyx_v_probnumber, __pyx_v_enfotype); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_10benderscutexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_probnumber, CYTHON_UNUSED PyObject *__pyx_v_enfotype) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("benderscutexec", 0); /* "src/pyscipopt/benderscut.pxi":24 * * def benderscutexec(self, solution, probnumber, enfotype): * print("python error in benderscutexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":25 * def benderscutexec(self, solution, probnumber, enfotype): * print("python error in benderscutexec: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":23 * pass * * def benderscutexec(self, solution, probnumber, enfotype): # <<<<<<<<<<<<<< * print("python error in benderscutexec: this method needs to be implemented") * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benderscut.benderscutexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":4 * #@brief Base class of the Benderscut Plugin * cdef class Benderscut: * cdef public Model model # <<<<<<<<<<<<<< * cdef public Benders benders * cdef public str name */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Benderscut_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(5, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benderscut.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Benderscut_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":5 * cdef class Benderscut: * cdef public Model model * cdef public Benders benders # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders___get__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_7benders___get__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->benders)); __pyx_r = ((PyObject *)__pyx_v_self->benders); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Benders))))) __PYX_ERR(5, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->benders); __Pyx_DECREF(((PyObject *)__pyx_v_self->benders)); __pyx_v_self->benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benderscut.benders.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Benderscut_7benders_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->benders); __Pyx_DECREF(((PyObject *)__pyx_v_self->benders)); __pyx_v_self->benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":6 * cdef public Model model * cdef public Benders benders * cdef public str name # <<<<<<<<<<<<<< * * def benderscutfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Benderscut_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(5, 6, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benderscut.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Benderscut_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_12__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.benders, self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->benders)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->benders)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->benders)); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.benders, self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.benders, self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.benders is not None or self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.benders, self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.benders is not None or self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->benders) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_5 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.benders is not None or self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.benders is not None or self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Benderscut); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_267356384); __Pyx_GIVEREF(__pyx_int_267356384); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_267356384); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.benders is not None or self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, None), state * else: * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Benderscut__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Benderscut); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_267356384); __Pyx_GIVEREF(__pyx_int_267356384); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_267356384); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Benderscut.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Benderscut__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Benderscut_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Benderscut_14__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Benderscut_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Benderscut__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Benderscut__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Benderscut, (type(self), 0xfef88e0, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Benderscut__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Benderscut.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":27 * return {} * * cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_BENDERS *__pyx_v_benders, CYTHON_UNUSED SCIP_BENDERSCUT *__pyx_v_benderscut) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyBenderscutCopy", 0); /* "src/pyscipopt/benderscut.pxi":28 * * cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":27 * return {} * * cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":30 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERSCUT *__pyx_v_benderscut) { SCIP_BENDERSCUTDATA *__pyx_v_benderscutdata; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_PyBenderscut = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBenderscutFree", 0); /* "src/pyscipopt/benderscut.pxi":32 * cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut): * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) # <<<<<<<<<<<<<< * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutfree() */ __pyx_v_benderscutdata = SCIPbenderscutGetData(__pyx_v_benderscut); /* "src/pyscipopt/benderscut.pxi":33 * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata # <<<<<<<<<<<<<< * PyBenderscut.benderscutfree() * Py_DECREF(PyBenderscut) */ __pyx_t_1 = ((PyObject *)__pyx_v_benderscutdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":34 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutfree() # <<<<<<<<<<<<<< * Py_DECREF(PyBenderscut) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenderscut), __pyx_n_s_benderscutfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":35 * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutfree() * Py_DECREF(PyBenderscut) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyBenderscut)); /* "src/pyscipopt/benderscut.pxi":36 * PyBenderscut.benderscutfree() * Py_DECREF(PyBenderscut) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":30 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBenderscutFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenderscut); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":38 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERSCUT *__pyx_v_benderscut) { SCIP_BENDERSCUTDATA *__pyx_v_benderscutdata; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_PyBenderscut = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBenderscutInit", 0); /* "src/pyscipopt/benderscut.pxi":40 * cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut): * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) # <<<<<<<<<<<<<< * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutinit() */ __pyx_v_benderscutdata = SCIPbenderscutGetData(__pyx_v_benderscut); /* "src/pyscipopt/benderscut.pxi":41 * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata # <<<<<<<<<<<<<< * PyBenderscut.benderscutinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_benderscutdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":42 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenderscut), __pyx_n_s_benderscutinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":43 * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":38 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBenderscutInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenderscut); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":45 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERSCUT *__pyx_v_benderscut) { SCIP_BENDERSCUTDATA *__pyx_v_benderscutdata; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_PyBenderscut = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBenderscutExit", 0); /* "src/pyscipopt/benderscut.pxi":47 * cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut): * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) # <<<<<<<<<<<<<< * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutexit() */ __pyx_v_benderscutdata = SCIPbenderscutGetData(__pyx_v_benderscut); /* "src/pyscipopt/benderscut.pxi":48 * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata # <<<<<<<<<<<<<< * PyBenderscut.benderscutexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_benderscutdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":49 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenderscut), __pyx_n_s_benderscutexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":50 * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":45 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBenderscutExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenderscut); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":52 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERSCUT *__pyx_v_benderscut) { SCIP_BENDERSCUTDATA *__pyx_v_benderscutdata; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_PyBenderscut = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBenderscutInitsol", 0); /* "src/pyscipopt/benderscut.pxi":54 * cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) # <<<<<<<<<<<<<< * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutinitsol() */ __pyx_v_benderscutdata = SCIPbenderscutGetData(__pyx_v_benderscut); /* "src/pyscipopt/benderscut.pxi":55 * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata # <<<<<<<<<<<<<< * PyBenderscut.benderscutinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_benderscutdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":56 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenderscut), __pyx_n_s_benderscutinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":57 * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":52 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBenderscutInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenderscut); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":59 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BENDERSCUT *__pyx_v_benderscut) { SCIP_BENDERSCUTDATA *__pyx_v_benderscutdata; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_PyBenderscut = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBenderscutExitsol", 0); /* "src/pyscipopt/benderscut.pxi":61 * cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) # <<<<<<<<<<<<<< * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutexitsol() */ __pyx_v_benderscutdata = SCIPbenderscutGetData(__pyx_v_benderscut); /* "src/pyscipopt/benderscut.pxi":62 * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata # <<<<<<<<<<<<<< * PyBenderscut.benderscutexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_benderscutdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":63 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenderscut), __pyx_n_s_benderscutexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":64 * PyBenderscut = <Benderscut>benderscutdata * PyBenderscut.benderscutexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":59 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBenderscutExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenderscut); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/benderscut.pxi":66 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBenderscutExec(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_BENDERS *__pyx_v_benders, SCIP_BENDERSCUT *__pyx_v_benderscut, SCIP_SOL *__pyx_v_sol, int __pyx_v_probnumber, SCIP_BENDERSENFOTYPE __pyx_v_type, SCIP_RESULT *__pyx_v_result) { SCIP_BENDERSCUTDATA *__pyx_v_benderscutdata; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_PyBenderscut = NULL; PyObject *__pyx_v_solution = NULL; SCIP_BENDERSENFOTYPE __pyx_v_enfotype; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; SCIP_RESULT __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBenderscutExec", 0); /* "src/pyscipopt/benderscut.pxi":68 * cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result): * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) # <<<<<<<<<<<<<< * PyBenderscut = <Benderscut>benderscutdata * if sol == NULL: */ __pyx_v_benderscutdata = SCIPbenderscutGetData(__pyx_v_benderscut); /* "src/pyscipopt/benderscut.pxi":69 * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata # <<<<<<<<<<<<<< * if sol == NULL: * solution = None */ __pyx_t_1 = ((PyObject *)__pyx_v_benderscutdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBenderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":70 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ __pyx_t_2 = ((__pyx_v_sol == NULL) != 0); if (__pyx_t_2) { /* "src/pyscipopt/benderscut.pxi":71 * PyBenderscut = <Benderscut>benderscutdata * if sol == NULL: * solution = None # <<<<<<<<<<<<<< * else: * solution = Solution.create(sol) */ __Pyx_INCREF(Py_None); __pyx_v_solution = Py_None; /* "src/pyscipopt/benderscut.pxi":70 * benderscutdata = SCIPbenderscutGetData(benderscut) * PyBenderscut = <Benderscut>benderscutdata * if sol == NULL: # <<<<<<<<<<<<<< * solution = None * else: */ goto __pyx_L3; } /* "src/pyscipopt/benderscut.pxi":73 * solution = None * else: * solution = Solution.create(sol) # <<<<<<<<<<<<<< * enfotype = type * result_dict = PyBenderscut.benderscutexec(solution, probnumber, enfotype) */ /*else*/ { __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(__pyx_v_sol); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/benderscut.pxi":74 * else: * solution = Solution.create(sol) * enfotype = type # <<<<<<<<<<<<<< * result_dict = PyBenderscut.benderscutexec(solution, probnumber, enfotype) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_v_enfotype = __pyx_v_type; /* "src/pyscipopt/benderscut.pxi":75 * solution = Solution.create(sol) * enfotype = type * result_dict = PyBenderscut.benderscutexec(solution, probnumber, enfotype) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBenderscut), __pyx_n_s_benderscutexec); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_probnumber); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(__pyx_v_enfotype); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_solution, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_solution, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_solution); __Pyx_GIVEREF(__pyx_v_solution); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_solution); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/benderscut.pxi":76 * enfotype = type * result_dict = PyBenderscut.benderscutexec(solution, probnumber, enfotype) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_9; /* "src/pyscipopt/benderscut.pxi":77 * result_dict = PyBenderscut.benderscutexec(solution, probnumber, enfotype) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/benderscut.pxi":66 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BENDERSCUTDATA* benderscutdata * benderscutdata = SCIPbenderscutGetData(benderscut) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("pyscipopt.scip.PyBenderscutExec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBenderscut); __Pyx_XDECREF(__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":6 * cdef public Model model * * def branchfree(self): # <<<<<<<<<<<<<< * '''frees memory of branching rule''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_1branchfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_branchfree[] = "frees memory of branching rule"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_1branchfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_branchfree(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_branchfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":10 * pass * * def branchinit(self): # <<<<<<<<<<<<<< * '''initializes branching rule''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_3branchinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_2branchinit[] = "initializes branching rule"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_3branchinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_2branchinit(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_2branchinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":14 * pass * * def branchexit(self): # <<<<<<<<<<<<<< * '''deinitializes branching rule''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_5branchexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_4branchexit[] = "deinitializes branching rule"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_5branchexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_4branchexit(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_4branchexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":18 * pass * * def branchinitsol(self): # <<<<<<<<<<<<<< * '''informs branching rule that the branch and bound process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_7branchinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_6branchinitsol[] = "informs branching rule that the branch and bound process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_7branchinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_6branchinitsol(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_6branchinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":22 * pass * * def branchexitsol(self): # <<<<<<<<<<<<<< * '''informs branching rule that the branch and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_9branchexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_8branchexitsol[] = "informs branching rule that the branch and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_9branchexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_8branchexitsol(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_8branchexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":26 * pass * * def branchexeclp(self, allowaddcons): # <<<<<<<<<<<<<< * '''executes branching rule for fractional LP solution''' * # this method needs to be implemented by the user */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_11branchexeclp(PyObject *__pyx_v_self, PyObject *__pyx_v_allowaddcons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_10branchexeclp[] = "executes branching rule for fractional LP solution"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_11branchexeclp(PyObject *__pyx_v_self, PyObject *__pyx_v_allowaddcons) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexeclp (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_10branchexeclp(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self), ((PyObject *)__pyx_v_allowaddcons)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_10branchexeclp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_allowaddcons) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("branchexeclp", 0); /* "src/pyscipopt/branchrule.pxi":29 * '''executes branching rule for fractional LP solution''' * # this method needs to be implemented by the user * return {} # <<<<<<<<<<<<<< * * def branchexecext(self, allowaddcons): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":26 * pass * * def branchexeclp(self, allowaddcons): # <<<<<<<<<<<<<< * '''executes branching rule for fractional LP solution''' * # this method needs to be implemented by the user */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Branchrule.branchexeclp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":31 * return {} * * def branchexecext(self, allowaddcons): # <<<<<<<<<<<<<< * '''executes branching rule for external branching candidates ''' * # this method needs to be implemented by the user */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_13branchexecext(PyObject *__pyx_v_self, PyObject *__pyx_v_allowaddcons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_12branchexecext[] = "executes branching rule for external branching candidates "; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_13branchexecext(PyObject *__pyx_v_self, PyObject *__pyx_v_allowaddcons) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexecext (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_12branchexecext(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self), ((PyObject *)__pyx_v_allowaddcons)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_12branchexecext(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_allowaddcons) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("branchexecext", 0); /* "src/pyscipopt/branchrule.pxi":34 * '''executes branching rule for external branching candidates ''' * # this method needs to be implemented by the user * return {} # <<<<<<<<<<<<<< * * def branchexecps(self, allowaddcons): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":31 * return {} * * def branchexecext(self, allowaddcons): # <<<<<<<<<<<<<< * '''executes branching rule for external branching candidates ''' * # this method needs to be implemented by the user */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Branchrule.branchexecext", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":36 * return {} * * def branchexecps(self, allowaddcons): # <<<<<<<<<<<<<< * '''executes branching rule for not completely fixed pseudo solution ''' * # this method needs to be implemented by the user */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_15branchexecps(PyObject *__pyx_v_self, PyObject *__pyx_v_allowaddcons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Branchrule_14branchexecps[] = "executes branching rule for not completely fixed pseudo solution "; static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_15branchexecps(PyObject *__pyx_v_self, PyObject *__pyx_v_allowaddcons) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchexecps (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_14branchexecps(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self), ((PyObject *)__pyx_v_allowaddcons)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_14branchexecps(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_allowaddcons) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("branchexecps", 0); /* "src/pyscipopt/branchrule.pxi":39 * '''executes branching rule for not completely fixed pseudo solution ''' * # this method needs to be implemented by the user * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":36 * return {} * * def branchexecps(self, allowaddcons): # <<<<<<<<<<<<<< * '''executes branching rule for not completely fixed pseudo solution ''' * # this method needs to be implemented by the user */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Branchrule.branchexecps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":4 * #@brief Base class of the Branchrule Plugin * cdef class Branchrule: * cdef public Model model # <<<<<<<<<<<<<< * * def branchfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Branchrule_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(6, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Branchrule.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Branchrule_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_16__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_16__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, None), state */ /*else*/ { __pyx_t_3 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None * if use_setstate: * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Branchrule); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, None), state * else: * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Branchrule__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Branchrule); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Branchrule.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Branchrule__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Branchrule_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Branchrule_18__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Branchrule_18__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Branchrule__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Branchrule__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Branchrule, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Branchrule__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Branchrule.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":43 * * * cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_BRANCHRULE *__pyx_v_branchrule) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyBranchruleCopy", 0); /* "src/pyscipopt/branchrule.pxi":44 * * cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":43 * * * cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":46 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleFree", 0); /* "src/pyscipopt/branchrule.pxi":48 * cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchfree() */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":49 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * PyBranchrule.branchfree() * Py_DECREF(PyBranchrule) */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":50 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchfree() # <<<<<<<<<<<<<< * Py_DECREF(PyBranchrule) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":51 * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchfree() * Py_DECREF(PyBranchrule) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyBranchrule)); /* "src/pyscipopt/branchrule.pxi":52 * PyBranchrule.branchfree() * Py_DECREF(PyBranchrule) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":46 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":54 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleInit", 0); /* "src/pyscipopt/branchrule.pxi":56 * cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchinit() */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":57 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * PyBranchrule.branchinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":58 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":59 * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":54 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":61 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleExit", 0); /* "src/pyscipopt/branchrule.pxi":63 * cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchexit() */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":64 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * PyBranchrule.branchexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":65 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":66 * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":61 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":68 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleInitsol", 0); /* "src/pyscipopt/branchrule.pxi":70 * cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchinitsol() */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":71 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * PyBranchrule.branchinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":72 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":73 * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":68 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":75 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleExitsol", 0); /* "src/pyscipopt/branchrule.pxi":77 * cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchexitsol() */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":78 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * PyBranchrule.branchexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":79 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":80 * PyBranchrule = <Branchrule>branchruledata * PyBranchrule.branchexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":75 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":82 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExeclp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule, SCIP_Bool __pyx_v_allowaddcons, SCIP_RESULT *__pyx_v_result) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleExeclp", 0); /* "src/pyscipopt/branchrule.pxi":84 * cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexeclp(allowaddcons) */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":85 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * result_dict = PyBranchrule.branchexeclp(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":86 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexeclp(allowaddcons) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchexeclp); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_allowaddcons); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":87 * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexeclp(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/branchrule.pxi":88 * result_dict = PyBranchrule.branchexeclp(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":82 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleExeclp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":90 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExecext(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule, SCIP_Bool __pyx_v_allowaddcons, SCIP_RESULT *__pyx_v_result) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleExecext", 0); /* "src/pyscipopt/branchrule.pxi":92 * cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexecext(allowaddcons) */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":93 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * result_dict = PyBranchrule.branchexecext(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":94 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexecext(allowaddcons) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchexecext); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_allowaddcons); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":95 * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexecext(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/branchrule.pxi":96 * result_dict = PyBranchrule.branchexecext(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":90 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleExecext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/branchrule.pxi":98 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyBranchruleExecps(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_BRANCHRULE *__pyx_v_branchrule, SCIP_Bool __pyx_v_allowaddcons, SCIP_RESULT *__pyx_v_result) { SCIP_BRANCHRULEDATA *__pyx_v_branchruledata; struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_PyBranchrule = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyBranchruleExecps", 0); /* "src/pyscipopt/branchrule.pxi":100 * cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) # <<<<<<<<<<<<<< * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexecps(allowaddcons) */ __pyx_v_branchruledata = SCIPbranchruleGetData(__pyx_v_branchrule); /* "src/pyscipopt/branchrule.pxi":101 * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata # <<<<<<<<<<<<<< * result_dict = PyBranchrule.branchexecps(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_branchruledata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyBranchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":102 * branchruledata = SCIPbranchruleGetData(branchrule) * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexecps(allowaddcons) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyBranchrule), __pyx_n_s_branchexecps); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_allowaddcons); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/branchrule.pxi":103 * PyBranchrule = <Branchrule>branchruledata * result_dict = PyBranchrule.branchexecps(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/branchrule.pxi":104 * result_dict = PyBranchrule.branchexecps(allowaddcons) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/branchrule.pxi":98 * return SCIP_OKAY * * cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULEDATA* branchruledata * branchruledata = SCIPbranchruleGetData(branchrule) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyBranchruleExecps", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyBranchrule); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":8 * cdef public str name * * def consfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_1consfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_consfree[] = "calls destructor and frees memory of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_1consfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_consfree(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_consfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":12 * pass * * def consinit(self, constraints): # <<<<<<<<<<<<<< * '''calls initialization method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_3consinit(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_2consinit[] = "calls initialization method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_3consinit(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_2consinit(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_2consinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":16 * pass * * def consexit(self, constraints): # <<<<<<<<<<<<<< * '''calls exit method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_5consexit(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_4consexit[] = "calls exit method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_5consexit(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_4consexit(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_4consexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":20 * pass * * def consinitpre(self, constraints): # <<<<<<<<<<<<<< * '''informs constraint handler that the presolving process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_7consinitpre(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_6consinitpre[] = "informs constraint handler that the presolving process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_7consinitpre(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_6consinitpre(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_6consinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":24 * pass * * def consexitpre(self, constraints): # <<<<<<<<<<<<<< * '''informs constraint handler that the presolving is finished ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_9consexitpre(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_8consexitpre[] = "informs constraint handler that the presolving is finished "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_9consexitpre(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consexitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_8consexitpre(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_8consexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consexitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":28 * pass * * def consinitsol(self, constraints): # <<<<<<<<<<<<<< * '''informs constraint handler that the branch and bound process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_11consinitsol(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_10consinitsol[] = "informs constraint handler that the branch and bound process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_11consinitsol(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_10consinitsol(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_10consinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":32 * pass * * def consexitsol(self, constraints, restart): # <<<<<<<<<<<<<< * '''informs constraint handler that the branch and bound process data is being freed ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_13consexitsol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_12consexitsol[] = "informs constraint handler that the branch and bound process data is being freed "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_13consexitsol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_restart = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consexitsol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_restart,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restart)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consexitsol", 1, 2, 2, 1); __PYX_ERR(7, 32, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "consexitsol") < 0)) __PYX_ERR(7, 32, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_constraints = values[0]; __pyx_v_restart = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("consexitsol", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 32, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consexitsol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_12consexitsol(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_restart); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_12consexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_restart) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":36 * pass * * def consdelete(self, constraint): # <<<<<<<<<<<<<< * '''sets method of constraint handler to free specific constraint data ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_15consdelete(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_14consdelete[] = "sets method of constraint handler to free specific constraint data "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_15consdelete(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdelete (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_14consdelete(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_14consdelete(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdelete", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":40 * pass * * def constrans(self, sourceconstraint): # <<<<<<<<<<<<<< * '''sets method of constraint handler to transform constraint data into data belonging to the transformed problem ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_17constrans(PyObject *__pyx_v_self, PyObject *__pyx_v_sourceconstraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_16constrans[] = "sets method of constraint handler to transform constraint data into data belonging to the transformed problem "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_17constrans(PyObject *__pyx_v_self, PyObject *__pyx_v_sourceconstraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("constrans (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_16constrans(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_sourceconstraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_16constrans(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_sourceconstraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("constrans", 0); /* "src/pyscipopt/conshdlr.pxi":42 * def constrans(self, sourceconstraint): * '''sets method of constraint handler to transform constraint data into data belonging to the transformed problem ''' * return {} # <<<<<<<<<<<<<< * * def consinitlp(self, constraints): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":40 * pass * * def constrans(self, sourceconstraint): # <<<<<<<<<<<<<< * '''sets method of constraint handler to transform constraint data into data belonging to the transformed problem ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.constrans", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":44 * return {} * * def consinitlp(self, constraints): # <<<<<<<<<<<<<< * '''calls LP initialization method of constraint handler to separate all initial active constraints ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_19consinitlp(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_18consinitlp[] = "calls LP initialization method of constraint handler to separate all initial active constraints "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_19consinitlp(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consinitlp (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_18consinitlp(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_18consinitlp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consinitlp", 0); /* "src/pyscipopt/conshdlr.pxi":46 * def consinitlp(self, constraints): * '''calls LP initialization method of constraint handler to separate all initial active constraints ''' * return {} # <<<<<<<<<<<<<< * * def conssepalp(self, constraints, nusefulconss): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":44 * return {} * * def consinitlp(self, constraints): # <<<<<<<<<<<<<< * '''calls LP initialization method of constraint handler to separate all initial active constraints ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consinitlp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":48 * return {} * * def conssepalp(self, constraints, nusefulconss): # <<<<<<<<<<<<<< * '''calls separator method of constraint handler to separate LP solution ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_21conssepalp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_20conssepalp[] = "calls separator method of constraint handler to separate LP solution "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_21conssepalp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nusefulconss = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conssepalp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_nusefulconss,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nusefulconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conssepalp", 1, 2, 2, 1); __PYX_ERR(7, 48, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conssepalp") < 0)) __PYX_ERR(7, 48, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_constraints = values[0]; __pyx_v_nusefulconss = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("conssepalp", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conssepalp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_20conssepalp(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_nusefulconss); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_20conssepalp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("conssepalp", 0); /* "src/pyscipopt/conshdlr.pxi":50 * def conssepalp(self, constraints, nusefulconss): * '''calls separator method of constraint handler to separate LP solution ''' * return {} # <<<<<<<<<<<<<< * * def conssepasol(self, constraints, nusefulconss, solution): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":48 * return {} * * def conssepalp(self, constraints, nusefulconss): # <<<<<<<<<<<<<< * '''calls separator method of constraint handler to separate LP solution ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conssepalp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":52 * return {} * * def conssepasol(self, constraints, nusefulconss, solution): # <<<<<<<<<<<<<< * '''calls separator method of constraint handler to separate given primal solution ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_23conssepasol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_22conssepasol[] = "calls separator method of constraint handler to separate given primal solution "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_23conssepasol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nusefulconss = 0; CYTHON_UNUSED PyObject *__pyx_v_solution = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conssepasol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_nusefulconss,&__pyx_n_s_solution,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nusefulconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conssepasol", 1, 3, 3, 1); __PYX_ERR(7, 52, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conssepasol", 1, 3, 3, 2); __PYX_ERR(7, 52, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conssepasol") < 0)) __PYX_ERR(7, 52, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_constraints = values[0]; __pyx_v_nusefulconss = values[1]; __pyx_v_solution = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("conssepasol", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 52, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conssepasol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_22conssepasol(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_nusefulconss, __pyx_v_solution); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_22conssepasol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solution) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("conssepasol", 0); /* "src/pyscipopt/conshdlr.pxi":54 * def conssepasol(self, constraints, nusefulconss, solution): * '''calls separator method of constraint handler to separate given primal solution ''' * return {} # <<<<<<<<<<<<<< * * def consenfolp(self, constraints, nusefulconss, solinfeasible): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":52 * return {} * * def conssepasol(self, constraints, nusefulconss, solution): # <<<<<<<<<<<<<< * '''calls separator method of constraint handler to separate given primal solution ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conssepasol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":56 * return {} * * def consenfolp(self, constraints, nusefulconss, solinfeasible): # <<<<<<<<<<<<<< * '''calls enforcing method of constraint handler for LP solution for all constraints added''' * print("python error in consenfolp: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_25consenfolp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_24consenfolp[] = "calls enforcing method of constraint handler for LP solution for all constraints added"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_25consenfolp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nusefulconss = 0; CYTHON_UNUSED PyObject *__pyx_v_solinfeasible = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consenfolp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_nusefulconss,&__pyx_n_s_solinfeasible,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nusefulconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenfolp", 1, 3, 3, 1); __PYX_ERR(7, 56, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solinfeasible)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenfolp", 1, 3, 3, 2); __PYX_ERR(7, 56, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "consenfolp") < 0)) __PYX_ERR(7, 56, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_constraints = values[0]; __pyx_v_nusefulconss = values[1]; __pyx_v_solinfeasible = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("consenfolp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 56, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consenfolp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_24consenfolp(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_nusefulconss, __pyx_v_solinfeasible); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_24consenfolp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solinfeasible) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consenfolp", 0); /* "src/pyscipopt/conshdlr.pxi":58 * def consenfolp(self, constraints, nusefulconss, solinfeasible): * '''calls enforcing method of constraint handler for LP solution for all constraints added''' * print("python error in consenfolp: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":59 * '''calls enforcing method of constraint handler for LP solution for all constraints added''' * print("python error in consenfolp: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def consenforelax(self, solution, constraints, nusefulconss, solinfeasible): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":56 * return {} * * def consenfolp(self, constraints, nusefulconss, solinfeasible): # <<<<<<<<<<<<<< * '''calls enforcing method of constraint handler for LP solution for all constraints added''' * print("python error in consenfolp: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consenfolp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":61 * return {} * * def consenforelax(self, solution, constraints, nusefulconss, solinfeasible): # <<<<<<<<<<<<<< * '''calls enforcing method of constraint handler for a relaxation solution for all constraints added''' * print("python error in consenforelax: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_27consenforelax(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_26consenforelax[] = "calls enforcing method of constraint handler for a relaxation solution for all constraints added"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_27consenforelax(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nusefulconss = 0; CYTHON_UNUSED PyObject *__pyx_v_solinfeasible = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consenforelax (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_constraints,&__pyx_n_s_nusefulconss,&__pyx_n_s_solinfeasible,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenforelax", 1, 4, 4, 1); __PYX_ERR(7, 61, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nusefulconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenforelax", 1, 4, 4, 2); __PYX_ERR(7, 61, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solinfeasible)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenforelax", 1, 4, 4, 3); __PYX_ERR(7, 61, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "consenforelax") < 0)) __PYX_ERR(7, 61, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_solution = values[0]; __pyx_v_constraints = values[1]; __pyx_v_nusefulconss = values[2]; __pyx_v_solinfeasible = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("consenforelax", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 61, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consenforelax", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_26consenforelax(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_solution, __pyx_v_constraints, __pyx_v_nusefulconss, __pyx_v_solinfeasible); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_26consenforelax(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solinfeasible) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consenforelax", 0); /* "src/pyscipopt/conshdlr.pxi":63 * def consenforelax(self, solution, constraints, nusefulconss, solinfeasible): * '''calls enforcing method of constraint handler for a relaxation solution for all constraints added''' * print("python error in consenforelax: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":64 * '''calls enforcing method of constraint handler for a relaxation solution for all constraints added''' * print("python error in consenforelax: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def consenfops(self, constraints, nusefulconss, solinfeasible, objinfeasible): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":61 * return {} * * def consenforelax(self, solution, constraints, nusefulconss, solinfeasible): # <<<<<<<<<<<<<< * '''calls enforcing method of constraint handler for a relaxation solution for all constraints added''' * print("python error in consenforelax: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consenforelax", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":66 * return {} * * def consenfops(self, constraints, nusefulconss, solinfeasible, objinfeasible): # <<<<<<<<<<<<<< * '''calls enforcing method of constraint handler for pseudo solution for all constraints added''' * print("python error in consenfops: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_29consenfops(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_28consenfops[] = "calls enforcing method of constraint handler for pseudo solution for all constraints added"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_29consenfops(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nusefulconss = 0; CYTHON_UNUSED PyObject *__pyx_v_solinfeasible = 0; CYTHON_UNUSED PyObject *__pyx_v_objinfeasible = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consenfops (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_nusefulconss,&__pyx_n_s_solinfeasible,&__pyx_n_s_objinfeasible,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nusefulconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenfops", 1, 4, 4, 1); __PYX_ERR(7, 66, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solinfeasible)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenfops", 1, 4, 4, 2); __PYX_ERR(7, 66, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_objinfeasible)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consenfops", 1, 4, 4, 3); __PYX_ERR(7, 66, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "consenfops") < 0)) __PYX_ERR(7, 66, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_constraints = values[0]; __pyx_v_nusefulconss = values[1]; __pyx_v_solinfeasible = values[2]; __pyx_v_objinfeasible = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("consenfops", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 66, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consenfops", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_28consenfops(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_nusefulconss, __pyx_v_solinfeasible, __pyx_v_objinfeasible); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_28consenfops(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_solinfeasible, CYTHON_UNUSED PyObject *__pyx_v_objinfeasible) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consenfops", 0); /* "src/pyscipopt/conshdlr.pxi":68 * def consenfops(self, constraints, nusefulconss, solinfeasible, objinfeasible): * '''calls enforcing method of constraint handler for pseudo solution for all constraints added''' * print("python error in consenfops: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":69 * '''calls enforcing method of constraint handler for pseudo solution for all constraints added''' * print("python error in consenfops: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":66 * return {} * * def consenfops(self, constraints, nusefulconss, solinfeasible, objinfeasible): # <<<<<<<<<<<<<< * '''calls enforcing method of constraint handler for pseudo solution for all constraints added''' * print("python error in consenfops: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consenfops", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":71 * return {} * * def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely): # <<<<<<<<<<<<<< * '''calls feasibility check method of constraint handler ''' * print("python error in conscheck: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_31conscheck(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_30conscheck[] = "calls feasibility check method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_31conscheck(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_solution = 0; CYTHON_UNUSED PyObject *__pyx_v_checkintegrality = 0; CYTHON_UNUSED PyObject *__pyx_v_checklprows = 0; CYTHON_UNUSED PyObject *__pyx_v_printreason = 0; CYTHON_UNUSED PyObject *__pyx_v_completely = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conscheck (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_solution,&__pyx_n_s_checkintegrality,&__pyx_n_s_checklprows,&__pyx_n_s_printreason,&__pyx_n_s_completely,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conscheck", 1, 6, 6, 1); __PYX_ERR(7, 71, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkintegrality)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conscheck", 1, 6, 6, 2); __PYX_ERR(7, 71, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checklprows)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conscheck", 1, 6, 6, 3); __PYX_ERR(7, 71, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printreason)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conscheck", 1, 6, 6, 4); __PYX_ERR(7, 71, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_completely)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conscheck", 1, 6, 6, 5); __PYX_ERR(7, 71, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conscheck") < 0)) __PYX_ERR(7, 71, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_constraints = values[0]; __pyx_v_solution = values[1]; __pyx_v_checkintegrality = values[2]; __pyx_v_checklprows = values[3]; __pyx_v_printreason = values[4]; __pyx_v_completely = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("conscheck", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 71, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conscheck", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_30conscheck(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_solution, __pyx_v_checkintegrality, __pyx_v_checklprows, __pyx_v_printreason, __pyx_v_completely); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_30conscheck(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_solution, CYTHON_UNUSED PyObject *__pyx_v_checkintegrality, CYTHON_UNUSED PyObject *__pyx_v_checklprows, CYTHON_UNUSED PyObject *__pyx_v_printreason, CYTHON_UNUSED PyObject *__pyx_v_completely) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("conscheck", 0); /* "src/pyscipopt/conshdlr.pxi":73 * def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely): * '''calls feasibility check method of constraint handler ''' * print("python error in conscheck: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":74 * '''calls feasibility check method of constraint handler ''' * print("python error in conscheck: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":71 * return {} * * def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely): # <<<<<<<<<<<<<< * '''calls feasibility check method of constraint handler ''' * print("python error in conscheck: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conscheck", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":76 * return {} * * def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming): # <<<<<<<<<<<<<< * '''calls propagation method of constraint handler ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_33consprop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_32consprop[] = "calls propagation method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_33consprop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nusefulconss = 0; CYTHON_UNUSED PyObject *__pyx_v_nmarkedconss = 0; CYTHON_UNUSED PyObject *__pyx_v_proptiming = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consprop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_nusefulconss,&__pyx_n_s_nmarkedconss,&__pyx_n_s_proptiming,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nusefulconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consprop", 1, 4, 4, 1); __PYX_ERR(7, 76, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nmarkedconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consprop", 1, 4, 4, 2); __PYX_ERR(7, 76, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proptiming)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("consprop", 1, 4, 4, 3); __PYX_ERR(7, 76, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "consprop") < 0)) __PYX_ERR(7, 76, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_constraints = values[0]; __pyx_v_nusefulconss = values[1]; __pyx_v_nmarkedconss = values[2]; __pyx_v_proptiming = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("consprop", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 76, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consprop", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_32consprop(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_nusefulconss, __pyx_v_nmarkedconss, __pyx_v_proptiming); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_32consprop(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nusefulconss, CYTHON_UNUSED PyObject *__pyx_v_nmarkedconss, CYTHON_UNUSED PyObject *__pyx_v_proptiming) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consprop", 0); /* "src/pyscipopt/conshdlr.pxi":78 * def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming): * '''calls propagation method of constraint handler ''' * return {} # <<<<<<<<<<<<<< * * def conspresol(self, constraints, nrounds, presoltiming, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":76 * return {} * * def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming): # <<<<<<<<<<<<<< * '''calls propagation method of constraint handler ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consprop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":80 * return {} * * def conspresol(self, constraints, nrounds, presoltiming, # <<<<<<<<<<<<<< * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_35conspresol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_34conspresol[] = "calls presolving method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_35conspresol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraints = 0; CYTHON_UNUSED PyObject *__pyx_v_nrounds = 0; CYTHON_UNUSED PyObject *__pyx_v_presoltiming = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewfixedvars = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewaggrvars = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewchgvartypes = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewchgbds = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewholes = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewdelconss = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewaddconss = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewupgdconss = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewchgcoefs = 0; CYTHON_UNUSED PyObject *__pyx_v_nnewchgsides = 0; PyObject *__pyx_v_result_dict = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conspresol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraints,&__pyx_n_s_nrounds,&__pyx_n_s_presoltiming,&__pyx_n_s_nnewfixedvars,&__pyx_n_s_nnewaggrvars,&__pyx_n_s_nnewchgvartypes,&__pyx_n_s_nnewchgbds,&__pyx_n_s_nnewholes,&__pyx_n_s_nnewdelconss,&__pyx_n_s_nnewaddconss,&__pyx_n_s_nnewupgdconss,&__pyx_n_s_nnewchgcoefs,&__pyx_n_s_nnewchgsides,&__pyx_n_s_result_dict,0}; PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); CYTHON_FALLTHROUGH; case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraints)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nrounds)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 1); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presoltiming)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 2); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewfixedvars)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 3); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewaggrvars)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 4); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewchgvartypes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 5); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewchgbds)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 6); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewholes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 7); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 8: if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewdelconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 8); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 9: if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewaddconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 9); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 10: if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewupgdconss)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 10); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 11: if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewchgcoefs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 11); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 12: if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnewchgsides)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 12); __PYX_ERR(7, 80, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 13: if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result_dict)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, 13); __PYX_ERR(7, 80, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conspresol") < 0)) __PYX_ERR(7, 80, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 14) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); values[9] = PyTuple_GET_ITEM(__pyx_args, 9); values[10] = PyTuple_GET_ITEM(__pyx_args, 10); values[11] = PyTuple_GET_ITEM(__pyx_args, 11); values[12] = PyTuple_GET_ITEM(__pyx_args, 12); values[13] = PyTuple_GET_ITEM(__pyx_args, 13); } __pyx_v_constraints = values[0]; __pyx_v_nrounds = values[1]; __pyx_v_presoltiming = values[2]; __pyx_v_nnewfixedvars = values[3]; __pyx_v_nnewaggrvars = values[4]; __pyx_v_nnewchgvartypes = values[5]; __pyx_v_nnewchgbds = values[6]; __pyx_v_nnewholes = values[7]; __pyx_v_nnewdelconss = values[8]; __pyx_v_nnewaddconss = values[9]; __pyx_v_nnewupgdconss = values[10]; __pyx_v_nnewchgcoefs = values[11]; __pyx_v_nnewchgsides = values[12]; __pyx_v_result_dict = values[13]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("conspresol", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 80, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conspresol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_34conspresol(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraints, __pyx_v_nrounds, __pyx_v_presoltiming, __pyx_v_nnewfixedvars, __pyx_v_nnewaggrvars, __pyx_v_nnewchgvartypes, __pyx_v_nnewchgbds, __pyx_v_nnewholes, __pyx_v_nnewdelconss, __pyx_v_nnewaddconss, __pyx_v_nnewupgdconss, __pyx_v_nnewchgcoefs, __pyx_v_nnewchgsides, __pyx_v_result_dict); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_34conspresol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints, CYTHON_UNUSED PyObject *__pyx_v_nrounds, CYTHON_UNUSED PyObject *__pyx_v_presoltiming, CYTHON_UNUSED PyObject *__pyx_v_nnewfixedvars, CYTHON_UNUSED PyObject *__pyx_v_nnewaggrvars, CYTHON_UNUSED PyObject *__pyx_v_nnewchgvartypes, CYTHON_UNUSED PyObject *__pyx_v_nnewchgbds, CYTHON_UNUSED PyObject *__pyx_v_nnewholes, CYTHON_UNUSED PyObject *__pyx_v_nnewdelconss, CYTHON_UNUSED PyObject *__pyx_v_nnewaddconss, CYTHON_UNUSED PyObject *__pyx_v_nnewupgdconss, CYTHON_UNUSED PyObject *__pyx_v_nnewchgcoefs, CYTHON_UNUSED PyObject *__pyx_v_nnewchgsides, PyObject *__pyx_v_result_dict) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conspresol", 0); /* "src/pyscipopt/conshdlr.pxi":84 * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict): * '''calls presolving method of constraint handler ''' * return result_dict # <<<<<<<<<<<<<< * * def consresprop(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result_dict); __pyx_r = __pyx_v_result_dict; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":80 * return {} * * def conspresol(self, constraints, nrounds, presoltiming, # <<<<<<<<<<<<<< * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict): */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":86 * return result_dict * * def consresprop(self): # <<<<<<<<<<<<<< * '''sets propagation conflict resolving method of constraint handler ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_37consresprop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_36consresprop[] = "sets propagation conflict resolving method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_37consresprop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consresprop (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_36consresprop(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_36consresprop(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consresprop", 0); /* "src/pyscipopt/conshdlr.pxi":88 * def consresprop(self): * '''sets propagation conflict resolving method of constraint handler ''' * return {} # <<<<<<<<<<<<<< * * def conslock(self, constraint, locktype, nlockspos, nlocksneg): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":86 * return result_dict * * def consresprop(self): # <<<<<<<<<<<<<< * '''sets propagation conflict resolving method of constraint handler ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consresprop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":90 * return {} * * def conslock(self, constraint, locktype, nlockspos, nlocksneg): # <<<<<<<<<<<<<< * '''variable rounding lock method of constraint handler''' * print("python error in conslock: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_39conslock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_38conslock[] = "variable rounding lock method of constraint handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_39conslock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_constraint = 0; CYTHON_UNUSED PyObject *__pyx_v_locktype = 0; CYTHON_UNUSED PyObject *__pyx_v_nlockspos = 0; CYTHON_UNUSED PyObject *__pyx_v_nlocksneg = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conslock (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_constraint,&__pyx_n_s_locktype,&__pyx_n_s_nlockspos,&__pyx_n_s_nlocksneg,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constraint)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_locktype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conslock", 1, 4, 4, 1); __PYX_ERR(7, 90, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nlockspos)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conslock", 1, 4, 4, 2); __PYX_ERR(7, 90, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nlocksneg)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("conslock", 1, 4, 4, 3); __PYX_ERR(7, 90, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conslock") < 0)) __PYX_ERR(7, 90, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_constraint = values[0]; __pyx_v_locktype = values[1]; __pyx_v_nlockspos = values[2]; __pyx_v_nlocksneg = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("conslock", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 90, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conslock", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_38conslock(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), __pyx_v_constraint, __pyx_v_locktype, __pyx_v_nlockspos, __pyx_v_nlocksneg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_38conslock(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint, CYTHON_UNUSED PyObject *__pyx_v_locktype, CYTHON_UNUSED PyObject *__pyx_v_nlockspos, CYTHON_UNUSED PyObject *__pyx_v_nlocksneg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("conslock", 0); /* "src/pyscipopt/conshdlr.pxi":92 * def conslock(self, constraint, locktype, nlockspos, nlocksneg): * '''variable rounding lock method of constraint handler''' * print("python error in conslock: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":93 * '''variable rounding lock method of constraint handler''' * print("python error in conslock: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def consactive(self, constraint): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":90 * return {} * * def conslock(self, constraint, locktype, nlockspos, nlocksneg): # <<<<<<<<<<<<<< * '''variable rounding lock method of constraint handler''' * print("python error in conslock: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.conslock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":95 * return {} * * def consactive(self, constraint): # <<<<<<<<<<<<<< * '''sets activation notification method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_41consactive(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_40consactive[] = "sets activation notification method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_41consactive(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consactive (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_40consactive(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_40consactive(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consactive", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":99 * pass * * def consdeactive(self, constraint): # <<<<<<<<<<<<<< * '''sets deactivation notification method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_43consdeactive(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_42consdeactive[] = "sets deactivation notification method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_43consdeactive(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdeactive (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_42consdeactive(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_42consdeactive(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdeactive", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":103 * pass * * def consenable(self, constraint): # <<<<<<<<<<<<<< * '''sets enabling notification method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_45consenable(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_44consenable[] = "sets enabling notification method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_45consenable(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consenable (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_44consenable(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_44consenable(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consenable", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":107 * pass * * def consdisable(self, constraint): # <<<<<<<<<<<<<< * '''sets disabling notification method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_47consdisable(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_46consdisable[] = "sets disabling notification method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_47consdisable(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdisable (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_46consdisable(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_46consdisable(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdisable", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":111 * pass * * def consdelvars(self, constraints): # <<<<<<<<<<<<<< * '''calls variable deletion method of constraint handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_49consdelvars(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_48consdelvars[] = "calls variable deletion method of constraint handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_49consdelvars(PyObject *__pyx_v_self, PyObject *__pyx_v_constraints) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdelvars (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_48consdelvars(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraints)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_48consdelvars(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraints) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consdelvars", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":115 * pass * * def consprint(self, constraint): # <<<<<<<<<<<<<< * '''sets constraint display method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_51consprint(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_50consprint[] = "sets constraint display method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_51consprint(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consprint (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_50consprint(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_50consprint(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consprint", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":119 * pass * * def conscopy(self): # <<<<<<<<<<<<<< * '''sets copy method of both the constraint handler and each associated constraint''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_53conscopy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_52conscopy[] = "sets copy method of both the constraint handler and each associated constraint"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_53conscopy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conscopy (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_52conscopy(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_52conscopy(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("conscopy", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":123 * pass * * def consparse(self): # <<<<<<<<<<<<<< * '''sets constraint parsing method of constraint handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_55consparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_54consparse[] = "sets constraint parsing method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_55consparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consparse (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_54consparse(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_54consparse(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consparse", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":127 * pass * * def consgetvars(self, constraint): # <<<<<<<<<<<<<< * '''sets constraint variable getter method of constraint handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_57consgetvars(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_56consgetvars[] = "sets constraint variable getter method of constraint handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_57consgetvars(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consgetvars (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_56consgetvars(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_56consgetvars(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consgetvars", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":131 * pass * * def consgetnvars(self, constraint): # <<<<<<<<<<<<<< * '''sets constraint variable number getter method of constraint handler ''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_59consgetnvars(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_58consgetnvars[] = "sets constraint variable number getter method of constraint handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_59consgetnvars(PyObject *__pyx_v_self, PyObject *__pyx_v_constraint) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consgetnvars (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_58consgetnvars(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_constraint)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_58consgetnvars(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_constraint) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consgetnvars", 0); /* "src/pyscipopt/conshdlr.pxi":133 * def consgetnvars(self, constraint): * '''sets constraint variable number getter method of constraint handler ''' * return {} # <<<<<<<<<<<<<< * * def consgetdivebdchgs(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":131 * pass * * def consgetnvars(self, constraint): # <<<<<<<<<<<<<< * '''sets constraint variable number getter method of constraint handler ''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.consgetnvars", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":135 * return {} * * def consgetdivebdchgs(self): # <<<<<<<<<<<<<< * '''calls diving solution enforcement callback of constraint handler, if it exists ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_61consgetdivebdchgs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Conshdlr_60consgetdivebdchgs[] = "calls diving solution enforcement callback of constraint handler, if it exists "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_61consgetdivebdchgs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consgetdivebdchgs (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_60consgetdivebdchgs(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_60consgetdivebdchgs(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consgetdivebdchgs", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":5 * * cdef class Conshdlr: * cdef public Model model # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(7, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":6 * cdef class Conshdlr: * cdef public Model model * cdef public str name # <<<<<<<<<<<<<< * * def consfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(7, 6, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Conshdlr_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_63__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_63__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_62__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_62__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Conshdlr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, None), state * else: * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Conshdlr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Conshdlr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Conshdlr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_65__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Conshdlr_65__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Conshdlr_64__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Conshdlr_64__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Conshdlr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Conshdlr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Conshdlr, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Conshdlr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Conshdlr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":141 * * # local helper functions for the interface * cdef Conshdlr getPyConshdlr(SCIP_CONSHDLR* conshdlr): # <<<<<<<<<<<<<< * cdef SCIP_CONSHDLRDATA* conshdlrdata * conshdlrdata = SCIPconshdlrGetData(conshdlr) */ static struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_f_9pyscipopt_4scip_getPyConshdlr(SCIP_CONSHDLR *__pyx_v_conshdlr) { SCIP_CONSHDLRDATA *__pyx_v_conshdlrdata; struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPyConshdlr", 0); /* "src/pyscipopt/conshdlr.pxi":143 * cdef Conshdlr getPyConshdlr(SCIP_CONSHDLR* conshdlr): * cdef SCIP_CONSHDLRDATA* conshdlrdata * conshdlrdata = SCIPconshdlrGetData(conshdlr) # <<<<<<<<<<<<<< * return <Conshdlr>conshdlrdata * */ __pyx_v_conshdlrdata = SCIPconshdlrGetData(__pyx_v_conshdlr); /* "src/pyscipopt/conshdlr.pxi":144 * cdef SCIP_CONSHDLRDATA* conshdlrdata * conshdlrdata = SCIPconshdlrGetData(conshdlr) * return <Conshdlr>conshdlrdata # <<<<<<<<<<<<<< * * cdef Constraint getPyCons(SCIP_CONS* cons): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_conshdlrdata))); __pyx_r = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v_conshdlrdata); goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":141 * * # local helper functions for the interface * cdef Conshdlr getPyConshdlr(SCIP_CONSHDLR* conshdlr): # <<<<<<<<<<<<<< * cdef SCIP_CONSHDLRDATA* conshdlrdata * conshdlrdata = SCIPconshdlrGetData(conshdlr) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":146 * return <Conshdlr>conshdlrdata * * cdef Constraint getPyCons(SCIP_CONS* cons): # <<<<<<<<<<<<<< * cdef SCIP_CONSDATA* consdata * consdata = SCIPconsGetData(cons) */ static struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_f_9pyscipopt_4scip_getPyCons(SCIP_CONS *__pyx_v_cons) { SCIP_CONSDATA *__pyx_v_consdata; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPyCons", 0); /* "src/pyscipopt/conshdlr.pxi":148 * cdef Constraint getPyCons(SCIP_CONS* cons): * cdef SCIP_CONSDATA* consdata * consdata = SCIPconsGetData(cons) # <<<<<<<<<<<<<< * return <Constraint>consdata * */ __pyx_v_consdata = SCIPconsGetData(__pyx_v_cons); /* "src/pyscipopt/conshdlr.pxi":149 * cdef SCIP_CONSDATA* consdata * consdata = SCIPconsGetData(cons) * return <Constraint>consdata # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_consdata))); __pyx_r = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_consdata); goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":146 * return <Conshdlr>conshdlrdata * * cdef Constraint getPyCons(SCIP_CONS* cons): # <<<<<<<<<<<<<< * cdef SCIP_CONSDATA* consdata * consdata = SCIPconsGetData(cons) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":153 * * * cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConshdlrCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_CONSHDLR *__pyx_v_conshdlr, CYTHON_UNUSED SCIP_Bool *__pyx_v_valid) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyConshdlrCopy", 0); /* "src/pyscipopt/conshdlr.pxi":154 * * cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":153 * * * cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":156 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consfree() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsFree", 0); /* "src/pyscipopt/conshdlr.pxi":157 * * cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyConshdlr.consfree() * Py_DECREF(PyConshdlr) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":158 * cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr): * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consfree() # <<<<<<<<<<<<<< * Py_DECREF(PyConshdlr) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":159 * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consfree() * Py_DECREF(PyConshdlr) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyConshdlr)); /* "src/pyscipopt/conshdlr.pxi":160 * PyConshdlr.consfree() * Py_DECREF(PyConshdlr) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":156 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consfree() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":162 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsInit", 0); /* "src/pyscipopt/conshdlr.pxi":163 * * cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":164 * cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":165 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinit(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":166 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consinit(constraints) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":167 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinit(constraints) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consinit); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":168 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinit(constraints) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":162 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":170 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsExit", 0); /* "src/pyscipopt/conshdlr.pxi":171 * * cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":172 * cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":173 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexit(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":174 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consexit(constraints) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":175 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexit(constraints) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consexit); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":176 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexit(constraints) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":170 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":178 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsInitpre", 0); /* "src/pyscipopt/conshdlr.pxi":179 * * cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":180 * cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":181 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinitpre(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":182 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consinitpre(constraints) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":183 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinitpre(constraints) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consinitpre); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":184 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinitpre(constraints) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":178 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsInitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":186 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsExitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsExitpre", 0); /* "src/pyscipopt/conshdlr.pxi":187 * * cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":188 * cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":189 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexitpre(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":190 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consexitpre(constraints) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":191 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexitpre(constraints) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consexitpre); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":192 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexitpre(constraints) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":186 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsExitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":194 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsInitsol", 0); /* "src/pyscipopt/conshdlr.pxi":195 * * cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":196 * cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":197 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinitsol(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":198 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consinitsol(constraints) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":199 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinitsol(constraints) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consinitsol); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":200 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consinitsol(constraints) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":194 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":202 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, SCIP_Bool __pyx_v_restart) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsExitsol", 0); /* "src/pyscipopt/conshdlr.pxi":203 * * cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":204 * cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":205 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexitsol(constraints, restart) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":206 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consexitsol(constraints, restart) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":207 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexitsol(constraints, restart) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consexitsol); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_restart); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_constraints, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 207, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_constraints, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 207, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":208 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consexitsol(constraints, restart) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":202 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":210 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDelete(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons, SCIP_CONSDATA **__pyx_v_consdata) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsDelete", 0); /* "src/pyscipopt/conshdlr.pxi":211 * * cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * assert <Constraint>consdata[0] == PyCons */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":212 * cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * assert <Constraint>consdata[0] == PyCons * PyConshdlr.consdelete(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":213 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * assert <Constraint>consdata[0] == PyCons # <<<<<<<<<<<<<< * PyConshdlr.consdelete(PyCons) * consdata[0] = NULL */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = PyObject_RichCompare(((PyObject *)(__pyx_v_consdata[0])), ((PyObject *)__pyx_v_PyCons), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 213, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(7, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(7, 213, __pyx_L1_error) } } #endif /* "src/pyscipopt/conshdlr.pxi":214 * PyCons = getPyCons(cons) * assert <Constraint>consdata[0] == PyCons * PyConshdlr.consdelete(PyCons) # <<<<<<<<<<<<<< * consdata[0] = NULL * Py_DECREF(PyCons) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consdelete); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":215 * assert <Constraint>consdata[0] == PyCons * PyConshdlr.consdelete(PyCons) * consdata[0] = NULL # <<<<<<<<<<<<<< * Py_DECREF(PyCons) * return SCIP_OKAY */ (__pyx_v_consdata[0]) = NULL; /* "src/pyscipopt/conshdlr.pxi":216 * PyConshdlr.consdelete(PyCons) * consdata[0] = NULL * Py_DECREF(PyCons) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyCons)); /* "src/pyscipopt/conshdlr.pxi":217 * consdata[0] = NULL * Py_DECREF(PyCons) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":210 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsDelete", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":219 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons): # <<<<<<<<<<<<<< * cdef Constraint PyTargetCons * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsTrans(SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_sourcecons, SCIP_CONS **__pyx_v_targetcons) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyTargetCons = 0; struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PySourceCons = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; SCIP_CONS *__pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; char const *__pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; SCIP_Bool __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsTrans", 0); /* "src/pyscipopt/conshdlr.pxi":221 * cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons): * cdef Constraint PyTargetCons * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PySourceCons = getPyCons(sourcecons) * result_dict = PyConshdlr.constrans(PySourceCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":222 * cdef Constraint PyTargetCons * PyConshdlr = getPyConshdlr(conshdlr) * PySourceCons = getPyCons(sourcecons) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.constrans(PySourceCons) * */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_sourcecons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PySourceCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":223 * PyConshdlr = getPyConshdlr(conshdlr) * PySourceCons = getPyCons(sourcecons) * result_dict = PyConshdlr.constrans(PySourceCons) # <<<<<<<<<<<<<< * * # create target (transform) constraint: if user doesn't return a constraint, copy PySourceCons */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_constrans); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PySourceCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PySourceCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":227 * # create target (transform) constraint: if user doesn't return a constraint, copy PySourceCons * # otherwise use the created cons * if "targetcons" in result_dict: # <<<<<<<<<<<<<< * PyTargetCons = result_dict.get("targetcons") * targetcons[0] = PyTargetCons.scip_cons */ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_targetcons, __pyx_v_result_dict, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(7, 227, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "src/pyscipopt/conshdlr.pxi":228 * # otherwise use the created cons * if "targetcons" in result_dict: * PyTargetCons = result_dict.get("targetcons") # <<<<<<<<<<<<<< * targetcons[0] = PyTargetCons.scip_cons * Py_INCREF(PyTargetCons) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_targetcons) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_targetcons); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Constraint))))) __PYX_ERR(7, 228, __pyx_L1_error) __pyx_v_PyTargetCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":229 * if "targetcons" in result_dict: * PyTargetCons = result_dict.get("targetcons") * targetcons[0] = PyTargetCons.scip_cons # <<<<<<<<<<<<<< * Py_INCREF(PyTargetCons) * else: */ __pyx_t_6 = __pyx_v_PyTargetCons->scip_cons; (__pyx_v_targetcons[0]) = __pyx_t_6; /* "src/pyscipopt/conshdlr.pxi":230 * PyTargetCons = result_dict.get("targetcons") * targetcons[0] = PyTargetCons.scip_cons * Py_INCREF(PyTargetCons) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPcreateCons(scip, targetcons, str_conversion(PySourceCons.name), conshdlr, <SCIP_CONSDATA*>PySourceCons, */ Py_INCREF(((PyObject *)__pyx_v_PyTargetCons)); /* "src/pyscipopt/conshdlr.pxi":227 * # create target (transform) constraint: if user doesn't return a constraint, copy PySourceCons * # otherwise use the created cons * if "targetcons" in result_dict: # <<<<<<<<<<<<<< * PyTargetCons = result_dict.get("targetcons") * targetcons[0] = PyTargetCons.scip_cons */ goto __pyx_L3; } /* "src/pyscipopt/conshdlr.pxi":232 * Py_INCREF(PyTargetCons) * else: * PY_SCIP_CALL(SCIPcreateCons(scip, targetcons, str_conversion(PySourceCons.name), conshdlr, <SCIP_CONSDATA*>PySourceCons, # <<<<<<<<<<<<<< * PySourceCons.isInitial(), PySourceCons.isSeparated(), PySourceCons.isEnforced(), PySourceCons.isChecked(), * PySourceCons.isPropagated(), PySourceCons.isLocal(), PySourceCons.isModifiable(), PySourceCons.isDynamic(), */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(7, 232, __pyx_L1_error) /* "src/pyscipopt/conshdlr.pxi":233 * else: * PY_SCIP_CALL(SCIPcreateCons(scip, targetcons, str_conversion(PySourceCons.name), conshdlr, <SCIP_CONSDATA*>PySourceCons, * PySourceCons.isInitial(), PySourceCons.isSeparated(), PySourceCons.isEnforced(), PySourceCons.isChecked(), # <<<<<<<<<<<<<< * PySourceCons.isPropagated(), PySourceCons.isLocal(), PySourceCons.isModifiable(), PySourceCons.isDynamic(), * PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isInitial); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isSeparated); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isEnforced); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isChecked); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/pyscipopt/conshdlr.pxi":234 * PY_SCIP_CALL(SCIPcreateCons(scip, targetcons, str_conversion(PySourceCons.name), conshdlr, <SCIP_CONSDATA*>PySourceCons, * PySourceCons.isInitial(), PySourceCons.isSeparated(), PySourceCons.isEnforced(), PySourceCons.isChecked(), * PySourceCons.isPropagated(), PySourceCons.isLocal(), PySourceCons.isModifiable(), PySourceCons.isDynamic(), # <<<<<<<<<<<<<< * PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) * return SCIP_OKAY */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isPropagated); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isLocal); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isModifiable); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isDynamic); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/pyscipopt/conshdlr.pxi":235 * PySourceCons.isInitial(), PySourceCons.isSeparated(), PySourceCons.isEnforced(), PySourceCons.isChecked(), * PySourceCons.isPropagated(), PySourceCons.isLocal(), PySourceCons.isModifiable(), PySourceCons.isDynamic(), * PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isRemovable); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySourceCons), __pyx_n_s_isStickingAtNode); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/pyscipopt/conshdlr.pxi":232 * Py_INCREF(PyTargetCons) * else: * PY_SCIP_CALL(SCIPcreateCons(scip, targetcons, str_conversion(PySourceCons.name), conshdlr, <SCIP_CONSDATA*>PySourceCons, # <<<<<<<<<<<<<< * PySourceCons.isInitial(), PySourceCons.isSeparated(), PySourceCons.isEnforced(), PySourceCons.isChecked(), * PySourceCons.isPropagated(), PySourceCons.isLocal(), PySourceCons.isModifiable(), PySourceCons.isDynamic(), */ __pyx_t_7 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateCons(__pyx_v_scip, __pyx_v_targetcons, __pyx_t_10, __pyx_v_conshdlr, ((SCIP_CONSDATA *)__pyx_v_PySourceCons), __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20)); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/conshdlr.pxi":236 * PySourceCons.isPropagated(), PySourceCons.isLocal(), PySourceCons.isModifiable(), PySourceCons.isDynamic(), * PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":219 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons): # <<<<<<<<<<<<<< * cdef Constraint PyTargetCons * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsTrans", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyTargetCons); __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PySourceCons); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":238 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsInitlp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, SCIP_Bool *__pyx_v_infeasible) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; SCIP_Bool __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsInitlp", 0); /* "src/pyscipopt/conshdlr.pxi":239 * * cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":240 * cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":241 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consinitlp(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":242 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.consinitlp(constraints) * infeasible[0] = result_dict.get("infeasible", infeasible[0]) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":243 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consinitlp(constraints) # <<<<<<<<<<<<<< * infeasible[0] = result_dict.get("infeasible", infeasible[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consinitlp); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":244 * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consinitlp(constraints) * infeasible[0] = result_dict.get("infeasible", infeasible[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyBool_FromLong((__pyx_v_infeasible[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_infeasible, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_infeasible, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_n_u_infeasible); __Pyx_GIVEREF(__pyx_n_u_infeasible); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_n_u_infeasible); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_infeasible[0]) = __pyx_t_10; /* "src/pyscipopt/conshdlr.pxi":245 * result_dict = PyConshdlr.consinitlp(constraints) * infeasible[0] = result_dict.get("infeasible", infeasible[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":238 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsInitlp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":247 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsSepalp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nusefulconss, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; SCIP_RESULT __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsSepalp", 0); /* "src/pyscipopt/conshdlr.pxi":248 * * cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":249 * cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":250 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.conssepalp(constraints, nusefulconss) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":251 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.conssepalp(constraints, nusefulconss) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":252 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.conssepalp(constraints, nusefulconss) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conssepalp); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nusefulconss); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_constraints, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 252, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_constraints, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 252, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":253 * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.conssepalp(constraints, nusefulconss) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_result, __pyx_t_9}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_result, __pyx_t_9}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_10; /* "src/pyscipopt/conshdlr.pxi":254 * result_dict = PyConshdlr.conssepalp(constraints, nusefulconss) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":247 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsSepalp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":256 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, # <<<<<<<<<<<<<< * SCIP_SOL* sol, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsSepasol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nusefulconss, SCIP_SOL *__pyx_v_sol, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; SCIP_RESULT __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsSepasol", 0); /* "src/pyscipopt/conshdlr.pxi":258 * cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, * SCIP_SOL* sol, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":259 * SCIP_SOL* sol, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":260 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * solution = Solution() */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":261 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * solution = Solution() * solution.sol = sol */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":262 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * solution = Solution() # <<<<<<<<<<<<<< * solution.sol = sol * result_dict = PyConshdlr.conssepasol(constraints, nusefulconss, solution) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Solution)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":263 * constraints.append(getPyCons(conss[i])) * solution = Solution() * solution.sol = sol # <<<<<<<<<<<<<< * result_dict = PyConshdlr.conssepasol(constraints, nusefulconss, solution) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_v_solution->sol = __pyx_v_sol; /* "src/pyscipopt/conshdlr.pxi":264 * solution = Solution() * solution.sol = sol * result_dict = PyConshdlr.conssepasol(constraints, nusefulconss, solution) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conssepasol); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nusefulconss); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_constraints, __pyx_t_7, ((PyObject *)__pyx_v_solution)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 3+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 264, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_constraints, __pyx_t_7, ((PyObject *)__pyx_v_solution)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 3+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 264, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(3+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_solution)); __Pyx_GIVEREF(((PyObject *)__pyx_v_solution)); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_2, ((PyObject *)__pyx_v_solution)); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":265 * solution.sol = sol * result_dict = PyConshdlr.conssepasol(constraints, nusefulconss, solution) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_result, __pyx_t_9}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_result, __pyx_t_9}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_10; /* "src/pyscipopt/conshdlr.pxi":266 * result_dict = PyConshdlr.conssepasol(constraints, nusefulconss, solution) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":256 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, # <<<<<<<<<<<<<< * SCIP_SOL* sol, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsSepasol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF((PyObject *)__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":268 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, # <<<<<<<<<<<<<< * SCIP_Bool solinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnfolp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nusefulconss, SCIP_Bool __pyx_v_solinfeasible, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; SCIP_RESULT __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsEnfolp", 0); /* "src/pyscipopt/conshdlr.pxi":270 * cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, * SCIP_Bool solinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":271 * SCIP_Bool solinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":272 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consenfolp(constraints, nusefulconss, solinfeasible) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":273 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.consenfolp(constraints, nusefulconss, solinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":274 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consenfolp(constraints, nusefulconss, solinfeasible) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consenfolp); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nusefulconss); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_solinfeasible); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_constraints, __pyx_t_7, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 3+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_constraints, __pyx_t_7, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 3+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_10 = PyTuple_New(3+__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_2, __pyx_t_8); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":275 * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consenfolp(constraints, nusefulconss, solinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_result, __pyx_t_10}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_result, __pyx_t_10}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_2, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_11; /* "src/pyscipopt/conshdlr.pxi":276 * result_dict = PyConshdlr.consenfolp(constraints, nusefulconss, solinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":268 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, # <<<<<<<<<<<<<< * SCIP_Bool solinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsEnfolp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":278 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnforelax(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SOL *__pyx_v_sol, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nusefulconss, SCIP_Bool __pyx_v_solinfeasible, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; SCIP_RESULT __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsEnforelax", 0); /* "src/pyscipopt/conshdlr.pxi":279 * * cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":280 * cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":281 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * solution = Solution() */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":282 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * solution = Solution() * solution.sol = sol */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":283 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * solution = Solution() # <<<<<<<<<<<<<< * solution.sol = sol * result_dict = PyConshdlr.consenforelax(solution, constraints, nusefulconss, solinfeasible) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Solution)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":284 * constraints.append(getPyCons(conss[i])) * solution = Solution() * solution.sol = sol # <<<<<<<<<<<<<< * result_dict = PyConshdlr.consenforelax(solution, constraints, nusefulconss, solinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_v_solution->sol = __pyx_v_sol; /* "src/pyscipopt/conshdlr.pxi":285 * solution = Solution() * solution.sol = sol * result_dict = PyConshdlr.consenforelax(solution, constraints, nusefulconss, solinfeasible) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consenforelax); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nusefulconss); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_solinfeasible); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_9, ((PyObject *)__pyx_v_solution), __pyx_v_constraints, __pyx_t_7, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_9, ((PyObject *)__pyx_v_solution), __pyx_v_constraints, __pyx_t_7, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_10 = PyTuple_New(4+__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_solution)); __Pyx_GIVEREF(((PyObject *)__pyx_v_solution)); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_2, ((PyObject *)__pyx_v_solution)); __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_2, __pyx_t_8); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":286 * solution.sol = sol * result_dict = PyConshdlr.consenforelax(solution, constraints, nusefulconss, solinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_result, __pyx_t_10}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_n_u_result, __pyx_t_10}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_2, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_11; /* "src/pyscipopt/conshdlr.pxi":287 * result_dict = PyConshdlr.consenforelax(solution, constraints, nusefulconss, solinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":278 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsEnforelax", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF((PyObject *)__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":289 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, # <<<<<<<<<<<<<< * SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnfops(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nusefulconss, SCIP_Bool __pyx_v_solinfeasible, SCIP_Bool __pyx_v_objinfeasible, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; SCIP_RESULT __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsEnfops", 0); /* "src/pyscipopt/conshdlr.pxi":291 * cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, * SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":292 * SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":293 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consenfops(constraints, nusefulconss, solinfeasible, objinfeasible) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":294 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.consenfops(constraints, nusefulconss, solinfeasible, objinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":295 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consenfops(constraints, nusefulconss, solinfeasible, objinfeasible) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consenfops); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nusefulconss); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_solinfeasible); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_objinfeasible); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_constraints, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_constraints, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_11 = PyTuple_New(4+__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_2, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":296 * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consenfops(constraints, nusefulconss, solinfeasible, objinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_result, __pyx_t_11}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_result, __pyx_t_11}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_12; /* "src/pyscipopt/conshdlr.pxi":297 * result_dict = PyConshdlr.consenfops(constraints, nusefulconss, solinfeasible, objinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":289 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, # <<<<<<<<<<<<<< * SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsEnfops", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":299 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, # <<<<<<<<<<<<<< * SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsCheck(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, SCIP_SOL *__pyx_v_sol, SCIP_Bool __pyx_v_checkintegrality, SCIP_Bool __pyx_v_checklprows, SCIP_Bool __pyx_v_printreason, SCIP_Bool __pyx_v_completely, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; SCIP_RESULT __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsCheck", 0); /* "src/pyscipopt/conshdlr.pxi":301 * cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, * SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":302 * SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":303 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * solution = Solution() */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":304 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * solution = Solution() * solution.sol = sol */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":305 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * solution = Solution() # <<<<<<<<<<<<<< * solution.sol = sol * result_dict = PyConshdlr.conscheck(constraints, solution, checkintegrality, checklprows, printreason, completely) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Solution)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":306 * constraints.append(getPyCons(conss[i])) * solution = Solution() * solution.sol = sol # <<<<<<<<<<<<<< * result_dict = PyConshdlr.conscheck(constraints, solution, checkintegrality, checklprows, printreason, completely) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_v_solution->sol = __pyx_v_sol; /* "src/pyscipopt/conshdlr.pxi":307 * solution = Solution() * solution.sol = sol * result_dict = PyConshdlr.conscheck(constraints, solution, checkintegrality, checklprows, printreason, completely) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conscheck); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_checkintegrality); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_checklprows); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_printreason); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_v_completely); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[7] = {__pyx_t_11, __pyx_v_constraints, ((PyObject *)__pyx_v_solution), __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 6+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[7] = {__pyx_t_11, __pyx_v_constraints, ((PyObject *)__pyx_v_solution), __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 6+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_12 = PyTuple_New(6+__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_INCREF(((PyObject *)__pyx_v_solution)); __Pyx_GIVEREF(((PyObject *)__pyx_v_solution)); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_2, ((PyObject *)__pyx_v_solution)); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 4+__pyx_t_2, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 5+__pyx_t_2, __pyx_t_10); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":308 * solution.sol = sol * result_dict = PyConshdlr.conscheck(constraints, solution, checkintegrality, checklprows, printreason, completely) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_n_u_result, __pyx_t_12}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_n_u_result, __pyx_t_12}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_13; /* "src/pyscipopt/conshdlr.pxi":309 * result_dict = PyConshdlr.conscheck(constraints, solution, checkintegrality, checklprows, printreason, completely) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":299 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, # <<<<<<<<<<<<<< * SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsCheck", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF((PyObject *)__pyx_v_solution); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":311 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, # <<<<<<<<<<<<<< * SCIP_PROPTIMING proptiming, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsProp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nusefulconss, int __pyx_v_nmarkedconss, SCIP_PROPTIMING __pyx_v_proptiming, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; SCIP_RESULT __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsProp", 0); /* "src/pyscipopt/conshdlr.pxi":313 * cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, * SCIP_PROPTIMING proptiming, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":314 * SCIP_PROPTIMING proptiming, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":315 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consprop(constraints, nusefulconss, nmarkedconss, proptiming) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":316 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.consprop(constraints, nusefulconss, nmarkedconss, proptiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":317 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consprop(constraints, nusefulconss, nmarkedconss, proptiming) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consprop); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nusefulconss); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_nmarkedconss); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_SCIP_PROPTIMING(__pyx_v_proptiming); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_constraints, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_constraints, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_11 = PyTuple_New(4+__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_2, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":318 * constraints.append(getPyCons(conss[i])) * result_dict = PyConshdlr.consprop(constraints, nusefulconss, nmarkedconss, proptiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_result, __pyx_t_11}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_result, __pyx_t_11}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_12; /* "src/pyscipopt/conshdlr.pxi":319 * result_dict = PyConshdlr.consprop(constraints, nusefulconss, nmarkedconss, proptiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nrounds, SCIP_PRESOLTIMING presoltiming, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":311 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, # <<<<<<<<<<<<<< * SCIP_PROPTIMING proptiming, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsProp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":321 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nrounds, SCIP_PRESOLTIMING presoltiming, # <<<<<<<<<<<<<< * int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, * int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsPresol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss, int __pyx_v_nrounds, SCIP_PRESOLTIMING __pyx_v_presoltiming, int __pyx_v_nnewfixedvars, int __pyx_v_nnewaggrvars, int __pyx_v_nnewchgvartypes, int __pyx_v_nnewchgbds, int __pyx_v_nnewholes, int __pyx_v_nnewdelconss, int __pyx_v_nnewaddconss, int __pyx_v_nnewupgdconss, int __pyx_v_nnewchgcoefs, int __pyx_v_nnewchgsides, int *__pyx_v_nfixedvars, int *__pyx_v_naggrvars, int *__pyx_v_nchgvartypes, int *__pyx_v_nchgbds, int *__pyx_v_naddholes, int *__pyx_v_ndelconss, int *__pyx_v_naddconss, int *__pyx_v_nupgdconss, int *__pyx_v_nchgcoefs, int *__pyx_v_nchgsides, SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; SCIP_RESULT __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsPresol", 0); /* "src/pyscipopt/conshdlr.pxi":326 * int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, * int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":327 * int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":328 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * # dictionary for input/output parameters */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":329 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * # dictionary for input/output parameters * result_dict = {} */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":331 * constraints.append(getPyCons(conss[i])) * # dictionary for input/output parameters * result_dict = {} # <<<<<<<<<<<<<< * result_dict["nfixedvars"] = nfixedvars[0] * result_dict["naggrvars"] = naggrvars[0] */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":332 * # dictionary for input/output parameters * result_dict = {} * result_dict["nfixedvars"] = nfixedvars[0] # <<<<<<<<<<<<<< * result_dict["naggrvars"] = naggrvars[0] * result_dict["nchgvartypes"] = nchgvartypes[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nfixedvars[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nfixedvars, __pyx_t_1) < 0)) __PYX_ERR(7, 332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":333 * result_dict = {} * result_dict["nfixedvars"] = nfixedvars[0] * result_dict["naggrvars"] = naggrvars[0] # <<<<<<<<<<<<<< * result_dict["nchgvartypes"] = nchgvartypes[0] * result_dict["nchgbds"] = nchgbds[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naggrvars[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_naggrvars, __pyx_t_1) < 0)) __PYX_ERR(7, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":334 * result_dict["nfixedvars"] = nfixedvars[0] * result_dict["naggrvars"] = naggrvars[0] * result_dict["nchgvartypes"] = nchgvartypes[0] # <<<<<<<<<<<<<< * result_dict["nchgbds"] = nchgbds[0] * result_dict["naddholes"] = naddholes[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgvartypes[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgvartypes, __pyx_t_1) < 0)) __PYX_ERR(7, 334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":335 * result_dict["naggrvars"] = naggrvars[0] * result_dict["nchgvartypes"] = nchgvartypes[0] * result_dict["nchgbds"] = nchgbds[0] # <<<<<<<<<<<<<< * result_dict["naddholes"] = naddholes[0] * result_dict["ndelconss"] = ndelconss[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgbds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgbds, __pyx_t_1) < 0)) __PYX_ERR(7, 335, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":336 * result_dict["nchgvartypes"] = nchgvartypes[0] * result_dict["nchgbds"] = nchgbds[0] * result_dict["naddholes"] = naddholes[0] # <<<<<<<<<<<<<< * result_dict["ndelconss"] = ndelconss[0] * result_dict["naddconss"] = naddconss[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naddholes[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_naddholes, __pyx_t_1) < 0)) __PYX_ERR(7, 336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":337 * result_dict["nchgbds"] = nchgbds[0] * result_dict["naddholes"] = naddholes[0] * result_dict["ndelconss"] = ndelconss[0] # <<<<<<<<<<<<<< * result_dict["naddconss"] = naddconss[0] * result_dict["nupgdconss"] = nupgdconss[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_ndelconss[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_ndelconss, __pyx_t_1) < 0)) __PYX_ERR(7, 337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":338 * result_dict["naddholes"] = naddholes[0] * result_dict["ndelconss"] = ndelconss[0] * result_dict["naddconss"] = naddconss[0] # <<<<<<<<<<<<<< * result_dict["nupgdconss"] = nupgdconss[0] * result_dict["nchgcoefs"] = nchgcoefs[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naddconss[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_naddconss, __pyx_t_1) < 0)) __PYX_ERR(7, 338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":339 * result_dict["ndelconss"] = ndelconss[0] * result_dict["naddconss"] = naddconss[0] * result_dict["nupgdconss"] = nupgdconss[0] # <<<<<<<<<<<<<< * result_dict["nchgcoefs"] = nchgcoefs[0] * result_dict["nchgsides"] = nchgsides[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nupgdconss[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nupgdconss, __pyx_t_1) < 0)) __PYX_ERR(7, 339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":340 * result_dict["naddconss"] = naddconss[0] * result_dict["nupgdconss"] = nupgdconss[0] * result_dict["nchgcoefs"] = nchgcoefs[0] # <<<<<<<<<<<<<< * result_dict["nchgsides"] = nchgsides[0] * result_dict["result"] = result[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgcoefs[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgcoefs, __pyx_t_1) < 0)) __PYX_ERR(7, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":341 * result_dict["nupgdconss"] = nupgdconss[0] * result_dict["nchgcoefs"] = nchgcoefs[0] * result_dict["nchgsides"] = nchgsides[0] # <<<<<<<<<<<<<< * result_dict["result"] = result[0] * PyConshdlr.conspresol(constraints, nrounds, presoltiming, */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgsides[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgsides, __pyx_t_1) < 0)) __PYX_ERR(7, 341, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":342 * result_dict["nchgcoefs"] = nchgcoefs[0] * result_dict["nchgsides"] = nchgsides[0] * result_dict["result"] = result[0] # <<<<<<<<<<<<<< * PyConshdlr.conspresol(constraints, nrounds, presoltiming, * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_RESULT((__pyx_v_result[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_result, __pyx_t_1) < 0)) __PYX_ERR(7, 342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":343 * result_dict["nchgsides"] = nchgsides[0] * result_dict["result"] = result[0] * PyConshdlr.conspresol(constraints, nrounds, presoltiming, # <<<<<<<<<<<<<< * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conspresol); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nrounds); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(__pyx_v_presoltiming); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "src/pyscipopt/conshdlr.pxi":344 * result_dict["result"] = result[0] * PyConshdlr.conspresol(constraints, nrounds, presoltiming, * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, # <<<<<<<<<<<<<< * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) * result[0] = result_dict["result"] */ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_nnewfixedvars); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_nnewaggrvars); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_nnewchgvartypes); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_nnewchgbds); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_nnewholes); if (unlikely(!__pyx_t_13)) __PYX_ERR(7, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); /* "src/pyscipopt/conshdlr.pxi":345 * PyConshdlr.conspresol(constraints, nrounds, presoltiming, * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) # <<<<<<<<<<<<<< * result[0] = result_dict["result"] * nfixedvars[0] = result_dict["nfixedvars"] */ __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_nnewdelconss); if (unlikely(!__pyx_t_14)) __PYX_ERR(7, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_nnewaddconss); if (unlikely(!__pyx_t_15)) __PYX_ERR(7, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_nnewupgdconss); if (unlikely(!__pyx_t_16)) __PYX_ERR(7, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_nnewchgcoefs); if (unlikely(!__pyx_t_17)) __PYX_ERR(7, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_nnewchgsides); if (unlikely(!__pyx_t_18)) __PYX_ERR(7, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_19)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[15] = {__pyx_t_19, __pyx_v_constraints, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_result_dict}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 14+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[15] = {__pyx_t_19, __pyx_v_constraints, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_result_dict}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 14+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else #endif { __pyx_t_20 = PyTuple_New(14+__pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); if (__pyx_t_19) { __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19); __pyx_t_19 = NULL; } __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_2, __pyx_v_constraints); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_2, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_2, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_20, 6+__pyx_t_2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_20, 7+__pyx_t_2, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_20, 8+__pyx_t_2, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_20, 9+__pyx_t_2, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_20, 10+__pyx_t_2, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_20, 11+__pyx_t_2, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 12+__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_v_result_dict); __Pyx_GIVEREF(__pyx_v_result_dict); PyTuple_SET_ITEM(__pyx_t_20, 13+__pyx_t_2, __pyx_v_result_dict); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":346 * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) * result[0] = result_dict["result"] # <<<<<<<<<<<<<< * nfixedvars[0] = result_dict["nfixedvars"] * naggrvars[0] = result_dict["naggrvars"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_21 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_21; /* "src/pyscipopt/conshdlr.pxi":347 * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) * result[0] = result_dict["result"] * nfixedvars[0] = result_dict["nfixedvars"] # <<<<<<<<<<<<<< * naggrvars[0] = result_dict["naggrvars"] * nchgvartypes[0] = result_dict["nchgvartypes"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nfixedvars); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nfixedvars[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":348 * result[0] = result_dict["result"] * nfixedvars[0] = result_dict["nfixedvars"] * naggrvars[0] = result_dict["naggrvars"] # <<<<<<<<<<<<<< * nchgvartypes[0] = result_dict["nchgvartypes"] * nchgbds[0] = result_dict["nchgbds"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_naggrvars); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_naggrvars[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":349 * nfixedvars[0] = result_dict["nfixedvars"] * naggrvars[0] = result_dict["naggrvars"] * nchgvartypes[0] = result_dict["nchgvartypes"] # <<<<<<<<<<<<<< * nchgbds[0] = result_dict["nchgbds"] * naddholes[0] = result_dict["naddholes"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgvartypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgvartypes[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":350 * naggrvars[0] = result_dict["naggrvars"] * nchgvartypes[0] = result_dict["nchgvartypes"] * nchgbds[0] = result_dict["nchgbds"] # <<<<<<<<<<<<<< * naddholes[0] = result_dict["naddholes"] * ndelconss[0] = result_dict["ndelconss"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgbds); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgbds[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":351 * nchgvartypes[0] = result_dict["nchgvartypes"] * nchgbds[0] = result_dict["nchgbds"] * naddholes[0] = result_dict["naddholes"] # <<<<<<<<<<<<<< * ndelconss[0] = result_dict["ndelconss"] * naddconss[0] = result_dict["naddconss"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_naddholes); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_naddholes[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":352 * nchgbds[0] = result_dict["nchgbds"] * naddholes[0] = result_dict["naddholes"] * ndelconss[0] = result_dict["ndelconss"] # <<<<<<<<<<<<<< * naddconss[0] = result_dict["naddconss"] * nupgdconss[0] = result_dict["nupgdconss"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_ndelconss); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_ndelconss[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":353 * naddholes[0] = result_dict["naddholes"] * ndelconss[0] = result_dict["ndelconss"] * naddconss[0] = result_dict["naddconss"] # <<<<<<<<<<<<<< * nupgdconss[0] = result_dict["nupgdconss"] * nchgcoefs[0] = result_dict["nchgcoefs"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_naddconss); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_naddconss[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":354 * ndelconss[0] = result_dict["ndelconss"] * naddconss[0] = result_dict["naddconss"] * nupgdconss[0] = result_dict["nupgdconss"] # <<<<<<<<<<<<<< * nchgcoefs[0] = result_dict["nchgcoefs"] * nchgsides[0] = result_dict["nchgsides"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nupgdconss); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nupgdconss[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":355 * naddconss[0] = result_dict["naddconss"] * nupgdconss[0] = result_dict["nupgdconss"] * nchgcoefs[0] = result_dict["nchgcoefs"] # <<<<<<<<<<<<<< * nchgsides[0] = result_dict["nchgsides"] * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgcoefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 355, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgcoefs[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":356 * nupgdconss[0] = result_dict["nupgdconss"] * nchgcoefs[0] = result_dict["nchgcoefs"] * nchgsides[0] = result_dict["nchgsides"] # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgsides); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgsides[0]) = __pyx_t_2; /* "src/pyscipopt/conshdlr.pxi":357 * nchgcoefs[0] = result_dict["nchgcoefs"] * nchgsides[0] = result_dict["nchgsides"] * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":321 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nrounds, SCIP_PRESOLTIMING presoltiming, # <<<<<<<<<<<<<< * int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, * int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsPresol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":359 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, # <<<<<<<<<<<<<< * SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsResprop(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, CYTHON_UNUSED SCIP_CONS *__pyx_v_cons, CYTHON_UNUSED SCIP_VAR *__pyx_v_infervar, CYTHON_UNUSED int __pyx_v_inferinfo, CYTHON_UNUSED SCIP_BOUNDTYPE __pyx_v_boundtype, CYTHON_UNUSED SCIP_BDCHGIDX *__pyx_v_bdchgidx, CYTHON_UNUSED SCIP_Real __pyx_v_relaxedbd, CYTHON_UNUSED SCIP_RESULT *__pyx_v_result) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsResprop", 0); /* "src/pyscipopt/conshdlr.pxi":361 * cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, * SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyConshdlr.consresprop() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":362 * SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consresprop() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consresprop); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":363 * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consresprop() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":359 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, # <<<<<<<<<<<<<< * SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result): * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsResprop", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":365 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * if cons == NULL: */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsLock(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons, SCIP_LOCKTYPE __pyx_v_locktype, int __pyx_v_nlockspos, int __pyx_v_nlocksneg) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsLock", 0); /* "src/pyscipopt/conshdlr.pxi":366 * * cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * if cons == NULL: * PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":367 * cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg): * PyConshdlr = getPyConshdlr(conshdlr) * if cons == NULL: # <<<<<<<<<<<<<< * PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) * else: */ __pyx_t_2 = ((__pyx_v_cons == NULL) != 0); if (__pyx_t_2) { /* "src/pyscipopt/conshdlr.pxi":368 * PyConshdlr = getPyConshdlr(conshdlr) * if cons == NULL: * PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) # <<<<<<<<<<<<<< * else: * PyCons = getPyCons(cons) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conslock); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_LOCKTYPE(__pyx_v_locktype); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nlockspos); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nlocksneg); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_7, Py_None, __pyx_t_4, __pyx_t_5, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_7, Py_None, __pyx_t_4, __pyx_t_5, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, Py_None); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":367 * cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg): * PyConshdlr = getPyConshdlr(conshdlr) * if cons == NULL: # <<<<<<<<<<<<<< * PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) * else: */ goto __pyx_L3; } /* "src/pyscipopt/conshdlr.pxi":370 * PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) * else: * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * PyConshdlr.conslock(PyCons, locktype, nlockspos, nlocksneg) * return SCIP_OKAY */ /*else*/ { __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":371 * else: * PyCons = getPyCons(cons) * PyConshdlr.conslock(PyCons, locktype, nlockspos, nlocksneg) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conslock); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyInt_From_SCIP_LOCKTYPE(__pyx_v_locktype); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nlockspos); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nlocksneg); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_4, ((PyObject *)__pyx_v_PyCons), __pyx_t_9, __pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_4, ((PyObject *)__pyx_v_PyCons), __pyx_t_9, __pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_PyCons)); __Pyx_GIVEREF(((PyObject *)__pyx_v_PyCons)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, ((PyObject *)__pyx_v_PyCons)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_8, __pyx_t_5); __pyx_t_9 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "src/pyscipopt/conshdlr.pxi":372 * PyCons = getPyCons(cons) * PyConshdlr.conslock(PyCons, locktype, nlockspos, nlocksneg) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":365 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * if cons == NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsLock", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":374 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsActive(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsActive", 0); /* "src/pyscipopt/conshdlr.pxi":375 * * cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * PyConshdlr.consactive(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":376 * cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * PyConshdlr.consactive(PyCons) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":377 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * PyConshdlr.consactive(PyCons) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consactive); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":378 * PyCons = getPyCons(cons) * PyConshdlr.consactive(PyCons) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":374 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsActive", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":380 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDeactive(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsDeactive", 0); /* "src/pyscipopt/conshdlr.pxi":381 * * cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * PyConshdlr.consdeactive(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":382 * cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * PyConshdlr.consdeactive(PyCons) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":383 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * PyConshdlr.consdeactive(PyCons) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consdeactive); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":384 * PyCons = getPyCons(cons) * PyConshdlr.consdeactive(PyCons) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":380 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsDeactive", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":386 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsEnable(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsEnable", 0); /* "src/pyscipopt/conshdlr.pxi":387 * * cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * PyConshdlr.consenable(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":388 * cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * PyConshdlr.consenable(PyCons) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":389 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * PyConshdlr.consenable(PyCons) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consenable); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":390 * PyCons = getPyCons(cons) * PyConshdlr.consenable(PyCons) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":386 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsEnable", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":392 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDisable(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsDisable", 0); /* "src/pyscipopt/conshdlr.pxi":393 * * cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * PyConshdlr.consdisable(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":394 * cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * PyConshdlr.consdisable(PyCons) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":395 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * PyConshdlr.consdisable(PyCons) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consdisable); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":396 * PyCons = getPyCons(cons) * PyConshdlr.consdisable(PyCons) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":392 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsDisable", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":398 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsDelvars(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS **__pyx_v_conss, int __pyx_v_nconss) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; PyObject *__pyx_v_constraints = 0; int __pyx_v_i; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsDelvars", 0); /* "src/pyscipopt/conshdlr.pxi":399 * * cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * cdef constraints = [] * for i in range(nconss): */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":400 * cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] # <<<<<<<<<<<<<< * for i in range(nconss): * constraints.append(getPyCons(conss[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":401 * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] * for i in range(nconss): # <<<<<<<<<<<<<< * constraints.append(getPyCons(conss[i])) * PyConshdlr.consdelvars(constraints) */ __pyx_t_2 = __pyx_v_nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":402 * cdef constraints = [] * for i in range(nconss): * constraints.append(getPyCons(conss[i])) # <<<<<<<<<<<<<< * PyConshdlr.consdelvars(constraints) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons((__pyx_v_conss[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_constraints, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "src/pyscipopt/conshdlr.pxi":403 * for i in range(nconss): * constraints.append(getPyCons(conss[i])) * PyConshdlr.consdelvars(constraints) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consdelvars); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_constraints) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_constraints); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":404 * constraints.append(getPyCons(conss[i])) * PyConshdlr.consdelvars(constraints) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":398 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * cdef constraints = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsDelvars", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF(__pyx_v_constraints); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":406 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsPrint(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons, CYTHON_UNUSED FILE *__pyx_v_file) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsPrint", 0); /* "src/pyscipopt/conshdlr.pxi":407 * * cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * # TODO: pass file */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":408 * cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * # TODO: pass file * PyConshdlr.consprint(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":410 * PyCons = getPyCons(cons) * # TODO: pass file * PyConshdlr.consprint(PyCons) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consprint); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":411 * # TODO: pass file * PyConshdlr.consprint(PyCons) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SCIP* sourcescip, SCIP_CONSHDLR* sourceconshdlr, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":406 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsPrint", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":413 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SCIP* sourcescip, SCIP_CONSHDLR* sourceconshdlr, # <<<<<<<<<<<<<< * SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_Bool initial, * SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_CONS **__pyx_v_cons, CYTHON_UNUSED char const *__pyx_v_name, CYTHON_UNUSED SCIP *__pyx_v_sourcescip, SCIP_CONSHDLR *__pyx_v_sourceconshdlr, CYTHON_UNUSED SCIP_CONS *__pyx_v_sourcecons, CYTHON_UNUSED SCIP_HASHMAP *__pyx_v_varmap, CYTHON_UNUSED SCIP_HASHMAP *__pyx_v_consmap, CYTHON_UNUSED SCIP_Bool __pyx_v_initial, CYTHON_UNUSED SCIP_Bool __pyx_v_separate, CYTHON_UNUSED SCIP_Bool __pyx_v_enforce, CYTHON_UNUSED SCIP_Bool __pyx_v_check, CYTHON_UNUSED SCIP_Bool __pyx_v_propagate, CYTHON_UNUSED SCIP_Bool __pyx_v_local, CYTHON_UNUSED SCIP_Bool __pyx_v_modifiable, CYTHON_UNUSED SCIP_Bool __pyx_v_dynamic, CYTHON_UNUSED SCIP_Bool __pyx_v_removable, CYTHON_UNUSED SCIP_Bool __pyx_v_stickingatnode, CYTHON_UNUSED SCIP_Bool __pyx_v_isglobal, SCIP_Bool *__pyx_v_valid) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsCopy", 0); /* "src/pyscipopt/conshdlr.pxi":419 * SCIP_Bool isglobal, SCIP_Bool* valid): * # TODO everything! * PyConshdlr = getPyConshdlr(sourceconshdlr) # <<<<<<<<<<<<<< * PyConshdlr.conscopy() * valid[0] = False */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_sourceconshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":420 * # TODO everything! * PyConshdlr = getPyConshdlr(sourceconshdlr) * PyConshdlr.conscopy() # <<<<<<<<<<<<<< * valid[0] = False * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_conscopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":421 * PyConshdlr = getPyConshdlr(sourceconshdlr) * PyConshdlr.conscopy() * valid[0] = False # <<<<<<<<<<<<<< * return SCIP_OKAY * */ (__pyx_v_valid[0]) = 0; /* "src/pyscipopt/conshdlr.pxi":422 * PyConshdlr.conscopy() * valid[0] = False * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsParse (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, const char* name, const char* str, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":413 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SCIP* sourcescip, SCIP_CONSHDLR* sourceconshdlr, # <<<<<<<<<<<<<< * SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_Bool initial, * SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsCopy", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":424 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsParse (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, const char* name, const char* str, # <<<<<<<<<<<<<< * SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, * SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsParse(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, CYTHON_UNUSED SCIP_CONS **__pyx_v_cons, CYTHON_UNUSED char const *__pyx_v_name, CYTHON_UNUSED char const *__pyx_v_str, CYTHON_UNUSED SCIP_Bool __pyx_v_initial, CYTHON_UNUSED SCIP_Bool __pyx_v_separate, CYTHON_UNUSED SCIP_Bool __pyx_v_enforce, CYTHON_UNUSED SCIP_Bool __pyx_v_check, CYTHON_UNUSED SCIP_Bool __pyx_v_propagate, CYTHON_UNUSED SCIP_Bool __pyx_v_local, CYTHON_UNUSED SCIP_Bool __pyx_v_modifiable, CYTHON_UNUSED SCIP_Bool __pyx_v_dynamic, CYTHON_UNUSED SCIP_Bool __pyx_v_removable, CYTHON_UNUSED SCIP_Bool __pyx_v_stickingatnode, SCIP_Bool *__pyx_v_success) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsParse", 0); /* "src/pyscipopt/conshdlr.pxi":429 * SCIP_Bool stickingatnode, SCIP_Bool* success): * # TODO everything! * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyConshdlr.consparse() * success[0] = False */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":430 * # TODO everything! * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consparse() # <<<<<<<<<<<<<< * success[0] = False * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":431 * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consparse() * success[0] = False # <<<<<<<<<<<<<< * return SCIP_OKAY * */ (__pyx_v_success[0]) = 0; /* "src/pyscipopt/conshdlr.pxi":432 * PyConshdlr.consparse() * success[0] = False * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":424 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsParse (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, const char* name, const char* str, # <<<<<<<<<<<<<< * SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, * SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsParse", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":434 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success): # <<<<<<<<<<<<<< * # TODO * PyConshdlr = getPyConshdlr(conshdlr) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsGetvars(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons, CYTHON_UNUSED SCIP_VAR **__pyx_v_vars, CYTHON_UNUSED int __pyx_v_varssize, SCIP_Bool *__pyx_v_success) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsGetvars", 0); /* "src/pyscipopt/conshdlr.pxi":436 * cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success): * # TODO * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * PyConshdlr.consgetvars(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":437 * # TODO * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * PyConshdlr.consgetvars(PyCons) * success[0] = False */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":438 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * PyConshdlr.consgetvars(PyCons) # <<<<<<<<<<<<<< * success[0] = False * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consgetvars); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":439 * PyCons = getPyCons(cons) * PyConshdlr.consgetvars(PyCons) * success[0] = False # <<<<<<<<<<<<<< * return SCIP_OKAY * */ (__pyx_v_success[0]) = 0; /* "src/pyscipopt/conshdlr.pxi":440 * PyConshdlr.consgetvars(PyCons) * success[0] = False * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":434 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success): # <<<<<<<<<<<<<< * # TODO * PyConshdlr = getPyConshdlr(conshdlr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsGetvars", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":442 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsGetnvars(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, SCIP_CONS *__pyx_v_cons, int *__pyx_v_nvars, SCIP_Bool *__pyx_v_success) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_PyCons = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; SCIP_Bool __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsGetnvars", 0); /* "src/pyscipopt/conshdlr.pxi":443 * * cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success): * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyCons = getPyCons(cons) * result_dict = PyConshdlr.consgetnvars(PyCons) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":444 * cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success): * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) # <<<<<<<<<<<<<< * result_dict = PyConshdlr.consgetnvars(PyCons) * nvars[0] = result_dict.get("nvars", 0) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyCons(__pyx_v_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":445 * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) * result_dict = PyConshdlr.consgetnvars(PyCons) # <<<<<<<<<<<<<< * nvars[0] = result_dict.get("nvars", 0) * success[0] = result_dict.get("success", False) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consgetnvars); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyCons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyCons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":446 * PyCons = getPyCons(cons) * result_dict = PyConshdlr.consgetnvars(PyCons) * nvars[0] = result_dict.get("nvars", 0) # <<<<<<<<<<<<<< * success[0] = result_dict.get("success", False) * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 446, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_nvars[0]) = __pyx_t_4; /* "src/pyscipopt/conshdlr.pxi":447 * result_dict = PyConshdlr.consgetnvars(PyCons) * nvars[0] = result_dict.get("nvars", 0) * success[0] = result_dict.get("success", False) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(7, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_success[0]) = __pyx_t_5; /* "src/pyscipopt/conshdlr.pxi":448 * nvars[0] = result_dict.get("nvars", 0) * success[0] = result_dict.get("success", False) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyConsGetdivebdchgs (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":442 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success): # <<<<<<<<<<<<<< * PyConshdlr = getPyConshdlr(conshdlr) * PyCons = getPyCons(cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsGetnvars", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyCons); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/conshdlr.pxi":450 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsGetdivebdchgs (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, # <<<<<<<<<<<<<< * SCIP_Bool* success, SCIP_Bool* infeasible): * # TODO */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyConsGetdivebdchgs(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_CONSHDLR *__pyx_v_conshdlr, CYTHON_UNUSED SCIP_DIVESET *__pyx_v_diveset, CYTHON_UNUSED SCIP_SOL *__pyx_v_sol, SCIP_Bool *__pyx_v_success, SCIP_Bool *__pyx_v_infeasible) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_PyConshdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyConsGetdivebdchgs", 0); /* "src/pyscipopt/conshdlr.pxi":453 * SCIP_Bool* success, SCIP_Bool* infeasible): * # TODO * PyConshdlr = getPyConshdlr(conshdlr) # <<<<<<<<<<<<<< * PyConshdlr.consgetdivebdchgs() * success[0] = False */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyConshdlr(__pyx_v_conshdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyConshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":454 * # TODO * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consgetdivebdchgs() # <<<<<<<<<<<<<< * success[0] = False * infeasible[0] = False */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyConshdlr), __pyx_n_s_consgetdivebdchgs); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/conshdlr.pxi":455 * PyConshdlr = getPyConshdlr(conshdlr) * PyConshdlr.consgetdivebdchgs() * success[0] = False # <<<<<<<<<<<<<< * infeasible[0] = False * return SCIP_OKAY */ (__pyx_v_success[0]) = 0; /* "src/pyscipopt/conshdlr.pxi":456 * PyConshdlr.consgetdivebdchgs() * success[0] = False * infeasible[0] = False # <<<<<<<<<<<<<< * return SCIP_OKAY */ (__pyx_v_infeasible[0]) = 0; /* "src/pyscipopt/conshdlr.pxi":457 * success[0] = False * infeasible[0] = False * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/conshdlr.pxi":450 * return SCIP_OKAY * * cdef SCIP_RETCODE PyConsGetdivebdchgs (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, # <<<<<<<<<<<<<< * SCIP_Bool* success, SCIP_Bool* infeasible): * # TODO */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyConsGetdivebdchgs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyConshdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":7 * cdef public str name * * def eventcopy(self): # <<<<<<<<<<<<<< * '''sets copy callback for all events of this event handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_1eventcopy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_eventcopy[] = "sets copy callback for all events of this event handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_1eventcopy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventcopy (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_eventcopy(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_eventcopy(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventcopy", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":11 * pass * * def eventfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of event handler ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_3eventfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_2eventfree[] = "calls destructor and frees memory of event handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_3eventfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_2eventfree(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_2eventfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":15 * pass * * def eventinit(self): # <<<<<<<<<<<<<< * '''initializes event handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_5eventinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_4eventinit[] = "initializes event handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_5eventinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4eventinit(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_4eventinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":19 * pass * * def eventexit(self): # <<<<<<<<<<<<<< * '''calls exit method of event handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_7eventexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_6eventexit[] = "calls exit method of event handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_7eventexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_6eventexit(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_6eventexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":23 * pass * * def eventinitsol(self): # <<<<<<<<<<<<<< * '''informs event handler that the branch and bound process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_9eventinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_8eventinitsol[] = "informs event handler that the branch and bound process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_9eventinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_8eventinitsol(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_8eventinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":27 * pass * * def eventexitsol(self): # <<<<<<<<<<<<<< * '''informs event handler that the branch and bound process data is being freed ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_11eventexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_10eventexitsol[] = "informs event handler that the branch and bound process data is being freed "; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_11eventexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_10eventexitsol(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_10eventexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":31 * pass * * def eventdelete(self): # <<<<<<<<<<<<<< * '''sets callback to free specific event data''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_13eventdelete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_12eventdelete[] = "sets callback to free specific event data"; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_13eventdelete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventdelete (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_12eventdelete(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_12eventdelete(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventdelete", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":35 * pass * * def eventexec(self, event): # <<<<<<<<<<<<<< * '''calls execution method of event handler ''' * print("python error in eventexec: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_15eventexec(PyObject *__pyx_v_self, PyObject *__pyx_v_event); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_9Eventhdlr_14eventexec[] = "calls execution method of event handler "; static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_15eventexec(PyObject *__pyx_v_self, PyObject *__pyx_v_event) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("eventexec (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_14eventexec(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self), ((PyObject *)__pyx_v_event)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_14eventexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_event) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("eventexec", 0); /* "src/pyscipopt/event.pxi":37 * def eventexec(self, event): * '''calls execution method of event handler ''' * print("python error in eventexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":38 * '''calls execution method of event handler ''' * print("python error in eventexec: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/event.pxi":35 * pass * * def eventexec(self, event): # <<<<<<<<<<<<<< * '''calls execution method of event handler ''' * print("python error in eventexec: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Eventhdlr.eventexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":4 * #@brief Base class of the Event Handler Plugin * cdef class Eventhdlr: * cdef public Model model # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(8, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Eventhdlr.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":5 * cdef class Eventhdlr: * cdef public Model model * cdef public str name # <<<<<<<<<<<<<< * * def eventcopy(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(8, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Eventhdlr.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_9Eventhdlr_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_16__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_16__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Eventhdlr); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, None), state * else: * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Eventhdlr__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Eventhdlr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Eventhdlr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Eventhdlr__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_9Eventhdlr_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_9Eventhdlr_18__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_9Eventhdlr_18__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Eventhdlr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Eventhdlr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Eventhdlr, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Eventhdlr__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Eventhdlr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":42 * * # local helper functions for the interface * cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * cdef SCIP_EVENTHDLRDATA* eventhdlrdata * eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) */ static struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_f_9pyscipopt_4scip_getPyEventhdlr(SCIP_EVENTHDLR *__pyx_v_eventhdlr) { SCIP_EVENTHDLRDATA *__pyx_v_eventhdlrdata; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPyEventhdlr", 0); /* "src/pyscipopt/event.pxi":44 * cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr): * cdef SCIP_EVENTHDLRDATA* eventhdlrdata * eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) # <<<<<<<<<<<<<< * return <Eventhdlr>eventhdlrdata * */ __pyx_v_eventhdlrdata = SCIPeventhdlrGetData(__pyx_v_eventhdlr); /* "src/pyscipopt/event.pxi":45 * cdef SCIP_EVENTHDLRDATA* eventhdlrdata * eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) * return <Eventhdlr>eventhdlrdata # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_eventhdlrdata))); __pyx_r = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v_eventhdlrdata); goto __pyx_L0; /* "src/pyscipopt/event.pxi":42 * * # local helper functions for the interface * cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * cdef SCIP_EVENTHDLRDATA* eventhdlrdata * eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":47 * return <Eventhdlr>eventhdlrdata * * cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventcopy() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventCopy", 0); /* "src/pyscipopt/event.pxi":48 * * cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventcopy() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":49 * cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventcopy() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":50 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventcopy() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":47 * return <Eventhdlr>eventhdlrdata * * cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventcopy() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventCopy", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":52 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventfree() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventFree", 0); /* "src/pyscipopt/event.pxi":53 * * cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventfree() * Py_DECREF(PyEventhdlr) */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":54 * cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventfree() # <<<<<<<<<<<<<< * Py_DECREF(PyEventhdlr) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":55 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventfree() * Py_DECREF(PyEventhdlr) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyEventhdlr)); /* "src/pyscipopt/event.pxi":56 * PyEventhdlr.eventfree() * Py_DECREF(PyEventhdlr) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":52 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventfree() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":58 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinit() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventInit", 0); /* "src/pyscipopt/event.pxi":59 * * cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":60 * cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":61 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":58 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinit() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":63 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexit() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventExit", 0); /* "src/pyscipopt/event.pxi":64 * * cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":65 * cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":66 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":63 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexit() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":68 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinitsol() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventInitsol", 0); /* "src/pyscipopt/event.pxi":69 * * cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":70 * cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":71 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":68 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventinitsol() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":73 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexitsol() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventExitsol", 0); /* "src/pyscipopt/event.pxi":74 * * cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":75 * cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":76 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":73 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventexitsol() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":78 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventdelete() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventDelete(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr, CYTHON_UNUSED SCIP_EVENTDATA **__pyx_v_eventdata) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventDelete", 0); /* "src/pyscipopt/event.pxi":79 * * cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEventhdlr.eventdelete() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":80 * cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventdelete() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventdelete); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":81 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventdelete() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":78 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEventhdlr.eventdelete() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventDelete", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/event.pxi":83 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEvent = Event() */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyEventExec(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_EVENTHDLR *__pyx_v_eventhdlr, SCIP_EVENT *__pyx_v_event, CYTHON_UNUSED SCIP_EVENTDATA *__pyx_v_eventdata) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_PyEventhdlr = NULL; struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_PyEvent = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyEventExec", 0); /* "src/pyscipopt/event.pxi":84 * * cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata): * PyEventhdlr = getPyEventhdlr(eventhdlr) # <<<<<<<<<<<<<< * PyEvent = Event() * PyEvent.event = event */ __pyx_t_1 = ((PyObject *)__pyx_f_9pyscipopt_4scip_getPyEventhdlr(__pyx_v_eventhdlr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":85 * cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata): * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEvent = Event() # <<<<<<<<<<<<<< * PyEvent.event = event * PyEventhdlr.eventexec(PyEvent) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Event)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyEvent = ((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":86 * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEvent = Event() * PyEvent.event = event # <<<<<<<<<<<<<< * PyEventhdlr.eventexec(PyEvent) * return SCIP_OKAY */ __pyx_v_PyEvent->event = __pyx_v_event; /* "src/pyscipopt/event.pxi":87 * PyEvent = Event() * PyEvent.event = event * PyEventhdlr.eventexec(PyEvent) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyEventhdlr), __pyx_n_s_eventexec); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_PyEvent)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_PyEvent)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/event.pxi":88 * PyEvent.event = event * PyEventhdlr.eventexec(PyEvent) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/event.pxi":83 * return SCIP_OKAY * * cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata): # <<<<<<<<<<<<<< * PyEventhdlr = getPyEventhdlr(eventhdlr) * PyEvent = Event() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyEventExec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyEventhdlr); __Pyx_XDECREF((PyObject *)__pyx_v_PyEvent); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":7 * cdef public str name * * def heurfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of primal heuristic''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_1heurfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Heur_heurfree[] = "calls destructor and frees memory of primal heuristic"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_1heurfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_heurfree(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_heurfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":11 * pass * * def heurinit(self): # <<<<<<<<<<<<<< * '''initializes primal heuristic''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_3heurinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Heur_2heurinit[] = "initializes primal heuristic"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_3heurinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_2heurinit(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_2heurinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":15 * pass * * def heurexit(self): # <<<<<<<<<<<<<< * '''calls exit method of primal heuristic''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_5heurexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Heur_4heurexit[] = "calls exit method of primal heuristic"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_5heurexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_4heurexit(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_4heurexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":19 * pass * * def heurinitsol(self): # <<<<<<<<<<<<<< * '''informs primal heuristic that the branch and bound process is being started''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_7heurinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Heur_6heurinitsol[] = "informs primal heuristic that the branch and bound process is being started"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_7heurinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_6heurinitsol(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_6heurinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":23 * pass * * def heurexitsol(self): # <<<<<<<<<<<<<< * '''informs primal heuristic that the branch and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_9heurexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Heur_8heurexitsol[] = "informs primal heuristic that the branch and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_9heurexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_8heurexitsol(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_8heurexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":27 * pass * * def heurexec(self, heurtiming, nodeinfeasible): # <<<<<<<<<<<<<< * '''should the heuristic the executed at the given depth, frequency, timing,...''' * print("python error in heurexec: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_11heurexec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Heur_10heurexec[] = "should the heuristic the executed at the given depth, frequency, timing,..."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_11heurexec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_heurtiming = 0; CYTHON_UNUSED PyObject *__pyx_v_nodeinfeasible = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("heurexec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_heurtiming,&__pyx_n_s_nodeinfeasible,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_heurtiming)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeinfeasible)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("heurexec", 1, 2, 2, 1); __PYX_ERR(9, 27, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "heurexec") < 0)) __PYX_ERR(9, 27, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_heurtiming = values[0]; __pyx_v_nodeinfeasible = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("heurexec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 27, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Heur.heurexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_10heurexec(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self), __pyx_v_heurtiming, __pyx_v_nodeinfeasible); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_10heurexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_heurtiming, CYTHON_UNUSED PyObject *__pyx_v_nodeinfeasible) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("heurexec", 0); /* "src/pyscipopt/heuristic.pxi":29 * def heurexec(self, heurtiming, nodeinfeasible): * '''should the heuristic the executed at the given depth, frequency, timing,...''' * print("python error in heurexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":30 * '''should the heuristic the executed at the given depth, frequency, timing,...''' * print("python error in heurexec: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":27 * pass * * def heurexec(self, heurtiming, nodeinfeasible): # <<<<<<<<<<<<<< * '''should the heuristic the executed at the given depth, frequency, timing,...''' * print("python error in heurexec: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Heur.heurexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":4 * #@brief Base class of the Heuristics Plugin * cdef class Heur: * cdef public Model model # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Heur_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Heur_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Heur_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(9, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Heur.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Heur_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Heur_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Heur_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":5 * cdef class Heur: * cdef public Model model * cdef public str name # <<<<<<<<<<<<<< * * def heurfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Heur_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Heur_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Heur_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(9, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Heur.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Heur_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Heur_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Heur_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_12__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Heur, (type(self), 0xecd383d, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Heur, (type(self), 0xecd383d, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Heur, (type(self), 0xecd383d, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Heur, (type(self), 0xecd383d, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Heur); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Heur, (type(self), 0xecd383d, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Heur, (type(self), 0xecd383d, None), state * else: * return __pyx_unpickle_Heur, (type(self), 0xecd383d, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Heur__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Heur); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Heur.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Heur, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Heur__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Heur_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Heur_14__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Heur_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Heur, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Heur__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Heur__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Heur, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Heur__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Heur.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":34 * * * cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_HEUR *__pyx_v_heur) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyHeurCopy", 0); /* "src/pyscipopt/heuristic.pxi":35 * * cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":34 * * * cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":37 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_HEUR *__pyx_v_heur) { SCIP_HEURDATA *__pyx_v_heurdata; struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_PyHeur = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyHeurFree", 0); /* "src/pyscipopt/heuristic.pxi":39 * cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur): * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) # <<<<<<<<<<<<<< * PyHeur = <Heur>heurdata * PyHeur.heurfree() */ __pyx_v_heurdata = SCIPheurGetData(__pyx_v_heur); /* "src/pyscipopt/heuristic.pxi":40 * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata # <<<<<<<<<<<<<< * PyHeur.heurfree() * Py_DECREF(PyHeur) */ __pyx_t_1 = ((PyObject *)__pyx_v_heurdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyHeur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":41 * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata * PyHeur.heurfree() # <<<<<<<<<<<<<< * Py_DECREF(PyHeur) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyHeur), __pyx_n_s_heurfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":42 * PyHeur = <Heur>heurdata * PyHeur.heurfree() * Py_DECREF(PyHeur) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyHeur)); /* "src/pyscipopt/heuristic.pxi":43 * PyHeur.heurfree() * Py_DECREF(PyHeur) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":37 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyHeurFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyHeur); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":45 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_HEUR *__pyx_v_heur) { SCIP_HEURDATA *__pyx_v_heurdata; struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_PyHeur = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyHeurInit", 0); /* "src/pyscipopt/heuristic.pxi":47 * cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur): * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) # <<<<<<<<<<<<<< * PyHeur = <Heur>heurdata * PyHeur.heurinit() */ __pyx_v_heurdata = SCIPheurGetData(__pyx_v_heur); /* "src/pyscipopt/heuristic.pxi":48 * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata # <<<<<<<<<<<<<< * PyHeur.heurinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_heurdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyHeur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":49 * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata * PyHeur.heurinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyHeur), __pyx_n_s_heurinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":50 * PyHeur = <Heur>heurdata * PyHeur.heurinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":45 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyHeurInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyHeur); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":52 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_HEUR *__pyx_v_heur) { SCIP_HEURDATA *__pyx_v_heurdata; struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_PyHeur = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyHeurExit", 0); /* "src/pyscipopt/heuristic.pxi":54 * cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur): * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) # <<<<<<<<<<<<<< * PyHeur = <Heur>heurdata * PyHeur.heurexit() */ __pyx_v_heurdata = SCIPheurGetData(__pyx_v_heur); /* "src/pyscipopt/heuristic.pxi":55 * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata # <<<<<<<<<<<<<< * PyHeur.heurexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_heurdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyHeur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":56 * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata * PyHeur.heurexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyHeur), __pyx_n_s_heurexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":57 * PyHeur = <Heur>heurdata * PyHeur.heurexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":52 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyHeurExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyHeur); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":59 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_HEUR *__pyx_v_heur) { SCIP_HEURDATA *__pyx_v_heurdata; struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_PyHeur = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyHeurInitsol", 0); /* "src/pyscipopt/heuristic.pxi":61 * cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur): * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) # <<<<<<<<<<<<<< * PyHeur = <Heur>heurdata * PyHeur.heurinitsol() */ __pyx_v_heurdata = SCIPheurGetData(__pyx_v_heur); /* "src/pyscipopt/heuristic.pxi":62 * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata # <<<<<<<<<<<<<< * PyHeur.heurinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_heurdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyHeur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":63 * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata * PyHeur.heurinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyHeur), __pyx_n_s_heurinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":64 * PyHeur = <Heur>heurdata * PyHeur.heurinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":59 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyHeurInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyHeur); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":66 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_HEUR *__pyx_v_heur) { SCIP_HEURDATA *__pyx_v_heurdata; struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_PyHeur = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyHeurExitsol", 0); /* "src/pyscipopt/heuristic.pxi":68 * cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur): * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) # <<<<<<<<<<<<<< * PyHeur = <Heur>heurdata * PyHeur.heurexitsol() */ __pyx_v_heurdata = SCIPheurGetData(__pyx_v_heur); /* "src/pyscipopt/heuristic.pxi":69 * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata # <<<<<<<<<<<<<< * PyHeur.heurexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_heurdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyHeur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":70 * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata * PyHeur.heurexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyHeur), __pyx_n_s_heurexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":71 * PyHeur = <Heur>heurdata * PyHeur.heurexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":66 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyHeurExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyHeur); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/heuristic.pxi":73 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyHeurExec(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_HEUR *__pyx_v_heur, SCIP_HEURTIMING __pyx_v_heurtiming, SCIP_Bool __pyx_v_nodeinfeasible, SCIP_RESULT *__pyx_v_result) { SCIP_HEURDATA *__pyx_v_heurdata; struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_PyHeur = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; SCIP_RESULT __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyHeurExec", 0); /* "src/pyscipopt/heuristic.pxi":75 * cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result): * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) # <<<<<<<<<<<<<< * PyHeur = <Heur>heurdata * result_dict = PyHeur.heurexec(heurtiming, nodeinfeasible) */ __pyx_v_heurdata = SCIPheurGetData(__pyx_v_heur); /* "src/pyscipopt/heuristic.pxi":76 * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata # <<<<<<<<<<<<<< * result_dict = PyHeur.heurexec(heurtiming, nodeinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_heurdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyHeur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":77 * heurdata = SCIPheurGetData(heur) * PyHeur = <Heur>heurdata * result_dict = PyHeur.heurexec(heurtiming, nodeinfeasible) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyHeur), __pyx_n_s_heurexec); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_HEURTIMING(__pyx_v_heurtiming); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_nodeinfeasible); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/heuristic.pxi":78 * PyHeur = <Heur>heurdata * result_dict = PyHeur.heurexec(heurtiming, nodeinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_8; /* "src/pyscipopt/heuristic.pxi":79 * result_dict = PyHeur.heurexec(heurtiming, nodeinfeasible) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/heuristic.pxi":73 * return SCIP_OKAY * * cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_HEURDATA* heurdata * heurdata = SCIPheurGetData(heur) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyHeurExec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyHeur); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":6 * cdef public Model model * * def presolfree(self): # <<<<<<<<<<<<<< * '''frees memory of presolver''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_1presolfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Presol_presolfree[] = "frees memory of presolver"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_1presolfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_presolfree(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_presolfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":10 * pass * * def presolinit(self): # <<<<<<<<<<<<<< * '''initializes presolver''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_3presolinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Presol_2presolinit[] = "initializes presolver"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_3presolinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_2presolinit(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_2presolinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":14 * pass * * def presolexit(self): # <<<<<<<<<<<<<< * '''deinitializes presolver''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_5presolexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Presol_4presolexit[] = "deinitializes presolver"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_5presolexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_4presolexit(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_4presolexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":18 * pass * * def presolinitpre(self): # <<<<<<<<<<<<<< * '''informs presolver that the presolving process is being started''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_7presolinitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Presol_6presolinitpre[] = "informs presolver that the presolving process is being started"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_7presolinitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolinitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_6presolinitpre(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_6presolinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolinitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":22 * pass * * def presolexitpre(self): # <<<<<<<<<<<<<< * '''informs presolver that the presolving process is finished''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_9presolexitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Presol_8presolexitpre[] = "informs presolver that the presolving process is finished"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_9presolexitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolexitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_8presolexitpre(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_8presolexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolexitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":26 * pass * * def presolexec(self, nrounds, presoltiming): # <<<<<<<<<<<<<< * '''executes presolver''' * print("python error in presolexec: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_11presolexec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Presol_10presolexec[] = "executes presolver"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_11presolexec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_nrounds = 0; CYTHON_UNUSED PyObject *__pyx_v_presoltiming = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolexec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nrounds,&__pyx_n_s_presoltiming,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nrounds)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presoltiming)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("presolexec", 1, 2, 2, 1); __PYX_ERR(10, 26, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "presolexec") < 0)) __PYX_ERR(10, 26, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_nrounds = values[0]; __pyx_v_presoltiming = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("presolexec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 26, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Presol.presolexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_10presolexec(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self), __pyx_v_nrounds, __pyx_v_presoltiming); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_10presolexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_nrounds, CYTHON_UNUSED PyObject *__pyx_v_presoltiming) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("presolexec", 0); /* "src/pyscipopt/presol.pxi":28 * def presolexec(self, nrounds, presoltiming): * '''executes presolver''' * print("python error in presolexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":29 * '''executes presolver''' * print("python error in presolexec: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":26 * pass * * def presolexec(self, nrounds, presoltiming): # <<<<<<<<<<<<<< * '''executes presolver''' * print("python error in presolexec: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Presol.presolexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":4 * #@brief Base class of the Presolver Plugin * cdef class Presol: * cdef public Model model # <<<<<<<<<<<<<< * * def presolfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_6Presol_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_6Presol_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_6Presol_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(10, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Presol.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_6Presol_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_6Presol_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_6Presol_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_12__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, None), state */ /*else*/ { __pyx_t_3 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None * if use_setstate: * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Presol); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, None), state * else: * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Presol__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Presol); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Presol.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Presol__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Presol_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Presol_14__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Presol_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Presol__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Presol__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Presol, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Presol__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Presol.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":33 * * * cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_PRESOL *__pyx_v_presol) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyPresolCopy", 0); /* "src/pyscipopt/presol.pxi":34 * * cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":33 * * * cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":36 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRESOL *__pyx_v_presol) { SCIP_PRESOLDATA *__pyx_v_presoldata; struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_PyPresol = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPresolFree", 0); /* "src/pyscipopt/presol.pxi":38 * cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol): * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) # <<<<<<<<<<<<<< * PyPresol = <Presol>presoldata * PyPresol.presolfree() */ __pyx_v_presoldata = SCIPpresolGetData(__pyx_v_presol); /* "src/pyscipopt/presol.pxi":39 * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata # <<<<<<<<<<<<<< * PyPresol.presolfree() * Py_DECREF(PyPresol) */ __pyx_t_1 = ((PyObject *)__pyx_v_presoldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPresol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":40 * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata * PyPresol.presolfree() # <<<<<<<<<<<<<< * Py_DECREF(PyPresol) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPresol), __pyx_n_s_presolfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":41 * PyPresol = <Presol>presoldata * PyPresol.presolfree() * Py_DECREF(PyPresol) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyPresol)); /* "src/pyscipopt/presol.pxi":42 * PyPresol.presolfree() * Py_DECREF(PyPresol) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":36 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPresolFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPresol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":44 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRESOL *__pyx_v_presol) { SCIP_PRESOLDATA *__pyx_v_presoldata; struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_PyPresol = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPresolInit", 0); /* "src/pyscipopt/presol.pxi":46 * cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol): * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) # <<<<<<<<<<<<<< * PyPresol = <Presol>presoldata * PyPresol.presolinit() */ __pyx_v_presoldata = SCIPpresolGetData(__pyx_v_presol); /* "src/pyscipopt/presol.pxi":47 * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata # <<<<<<<<<<<<<< * PyPresol.presolinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_presoldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPresol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":48 * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata * PyPresol.presolinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPresol), __pyx_n_s_presolinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":49 * PyPresol = <Presol>presoldata * PyPresol.presolinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":44 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPresolInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPresol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":51 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRESOL *__pyx_v_presol) { SCIP_PRESOLDATA *__pyx_v_presoldata; struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_PyPresol = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPresolExit", 0); /* "src/pyscipopt/presol.pxi":53 * cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol): * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) # <<<<<<<<<<<<<< * PyPresol = <Presol>presoldata * PyPresol.presolexit() */ __pyx_v_presoldata = SCIPpresolGetData(__pyx_v_presol); /* "src/pyscipopt/presol.pxi":54 * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata # <<<<<<<<<<<<<< * PyPresol.presolexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_presoldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPresol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":55 * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata * PyPresol.presolexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPresol), __pyx_n_s_presolexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":56 * PyPresol = <Presol>presoldata * PyPresol.presolexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":51 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPresolExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPresol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":59 * * * cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolInitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRESOL *__pyx_v_presol) { SCIP_PRESOLDATA *__pyx_v_presoldata; struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_PyPresol = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPresolInitpre", 0); /* "src/pyscipopt/presol.pxi":61 * cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol): * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) # <<<<<<<<<<<<<< * PyPresol = <Presol>presoldata * PyPresol.presolinitpre() */ __pyx_v_presoldata = SCIPpresolGetData(__pyx_v_presol); /* "src/pyscipopt/presol.pxi":62 * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata # <<<<<<<<<<<<<< * PyPresol.presolinitpre() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_presoldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPresol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":63 * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata * PyPresol.presolinitpre() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPresol), __pyx_n_s_presolinitpre); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":64 * PyPresol = <Presol>presoldata * PyPresol.presolinitpre() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":59 * * * cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPresolInitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPresol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":66 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolExitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRESOL *__pyx_v_presol) { SCIP_PRESOLDATA *__pyx_v_presoldata; struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_PyPresol = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPresolExitpre", 0); /* "src/pyscipopt/presol.pxi":68 * cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol): * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) # <<<<<<<<<<<<<< * PyPresol = <Presol>presoldata * PyPresol.presolexitpre() */ __pyx_v_presoldata = SCIPpresolGetData(__pyx_v_presol); /* "src/pyscipopt/presol.pxi":69 * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata # <<<<<<<<<<<<<< * PyPresol.presolexitpre() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_presoldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPresol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":70 * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata * PyPresol.presolexitpre() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPresol), __pyx_n_s_presolexitpre); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":71 * PyPresol = <Presol>presoldata * PyPresol.presolexitpre() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPresolExec (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SCIP_PRESOLTIMING presoltiming, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":66 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol): # <<<<<<<<<<<<<< * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPresolExitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPresol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/presol.pxi":73 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolExec (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SCIP_PRESOLTIMING presoltiming, # <<<<<<<<<<<<<< * int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, * int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPresolExec(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRESOL *__pyx_v_presol, int __pyx_v_nrounds, SCIP_PRESOLTIMING __pyx_v_presoltiming, CYTHON_UNUSED int __pyx_v_nnewfixedvars, CYTHON_UNUSED int __pyx_v_nnewaggrvars, CYTHON_UNUSED int __pyx_v_nnewchgvartypes, CYTHON_UNUSED int __pyx_v_nnewchgbds, CYTHON_UNUSED int __pyx_v_nnewholes, CYTHON_UNUSED int __pyx_v_nnewdelconss, CYTHON_UNUSED int __pyx_v_nnewaddconss, CYTHON_UNUSED int __pyx_v_nnewupgdconss, CYTHON_UNUSED int __pyx_v_nnewchgcoefs, CYTHON_UNUSED int __pyx_v_nnewchgsides, int *__pyx_v_nfixedvars, int *__pyx_v_naggrvars, int *__pyx_v_nchgvartypes, int *__pyx_v_nchgbds, int *__pyx_v_naddholes, int *__pyx_v_ndelconss, int *__pyx_v_naddconss, int *__pyx_v_nupgdconss, int *__pyx_v_nchgcoefs, int *__pyx_v_nchgsides, SCIP_RESULT *__pyx_v_result) { SCIP_PRESOLDATA *__pyx_v_presoldata; struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_PyPresol = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; SCIP_RESULT __pyx_t_8; long __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPresolExec", 0); /* "src/pyscipopt/presol.pxi":79 * int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result): * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) # <<<<<<<<<<<<<< * PyPresol = <Presol>presoldata * result_dict = PyPresol.presolexec(nrounds, presoltiming) */ __pyx_v_presoldata = SCIPpresolGetData(__pyx_v_presol); /* "src/pyscipopt/presol.pxi":80 * cdef SCIP_PRESOLDATA* presoldata * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata # <<<<<<<<<<<<<< * result_dict = PyPresol.presolexec(nrounds, presoltiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_presoldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPresol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":81 * presoldata = SCIPpresolGetData(presol) * PyPresol = <Presol>presoldata * result_dict = PyPresol.presolexec(nrounds, presoltiming) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPresol), __pyx_n_s_presolexec); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrounds); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(__pyx_v_presoltiming); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/presol.pxi":82 * PyPresol = <Presol>presoldata * result_dict = PyPresol.presolexec(nrounds, presoltiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) * naggrvars[0] += result_dict.get("nnewaggrvars", 0) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_8; /* "src/pyscipopt/presol.pxi":83 * result_dict = PyPresol.presolexec(nrounds, presoltiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) # <<<<<<<<<<<<<< * naggrvars[0] += result_dict.get("nnewaggrvars", 0) * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) */ __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nfixedvars[__pyx_t_9])); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_nfixedvars[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":84 * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) * naggrvars[0] += result_dict.get("nnewaggrvars", 0) # <<<<<<<<<<<<<< * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) * nchgbds[0] += result_dict.get("nnewchgbds", 0) */ __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_naggrvars[__pyx_t_9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_naggrvars[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":85 * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) * naggrvars[0] += result_dict.get("nnewaggrvars", 0) * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) # <<<<<<<<<<<<<< * nchgbds[0] += result_dict.get("nnewchgbds", 0) * naddholes[0] += result_dict.get("nnewaddholes", 0) */ __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_nchgvartypes[__pyx_t_9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgvartypes[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":86 * naggrvars[0] += result_dict.get("nnewaggrvars", 0) * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) * nchgbds[0] += result_dict.get("nnewchgbds", 0) # <<<<<<<<<<<<<< * naddholes[0] += result_dict.get("nnewaddholes", 0) * ndelconss[0] += result_dict.get("nnewdelconss", 0) */ __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgbds[__pyx_t_9])); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_nchgbds[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":87 * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) * nchgbds[0] += result_dict.get("nnewchgbds", 0) * naddholes[0] += result_dict.get("nnewaddholes", 0) # <<<<<<<<<<<<<< * ndelconss[0] += result_dict.get("nnewdelconss", 0) * naddconss[0] += result_dict.get("nnewaddconss", 0) */ __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_naddholes[__pyx_t_9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_naddholes[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":88 * nchgbds[0] += result_dict.get("nnewchgbds", 0) * naddholes[0] += result_dict.get("nnewaddholes", 0) * ndelconss[0] += result_dict.get("nnewdelconss", 0) # <<<<<<<<<<<<<< * naddconss[0] += result_dict.get("nnewaddconss", 0) * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) */ __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_ndelconss[__pyx_t_9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_ndelconss[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":89 * naddholes[0] += result_dict.get("nnewaddholes", 0) * ndelconss[0] += result_dict.get("nnewdelconss", 0) * naddconss[0] += result_dict.get("nnewaddconss", 0) # <<<<<<<<<<<<<< * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) */ __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naddconss[__pyx_t_9])); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_naddconss[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":90 * ndelconss[0] += result_dict.get("nnewdelconss", 0) * naddconss[0] += result_dict.get("nnewaddconss", 0) * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) # <<<<<<<<<<<<<< * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) * nchgsides[0] += result_dict.get("nnewchgsides", 0) */ __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_nupgdconss[__pyx_t_9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_nupgdconss[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":91 * naddconss[0] += result_dict.get("nnewaddconss", 0) * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) # <<<<<<<<<<<<<< * nchgsides[0] += result_dict.get("nnewchgsides", 0) * return SCIP_OKAY */ __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_nchgcoefs[__pyx_t_9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgcoefs[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":92 * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) * nchgsides[0] += result_dict.get("nnewchgsides", 0) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgsides[__pyx_t_9])); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_nchgsides[__pyx_t_9]) = __pyx_t_6; /* "src/pyscipopt/presol.pxi":93 * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) * nchgsides[0] += result_dict.get("nnewchgsides", 0) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/presol.pxi":73 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPresolExec (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SCIP_PRESOLTIMING presoltiming, # <<<<<<<<<<<<<< * int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, * int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pyscipopt.scip.PyPresolExec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPresol); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":6 * cdef public Model model * * def pricerfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of variable pricer ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_1pricerfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_pricerfree[] = "calls destructor and frees memory of variable pricer "; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_1pricerfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_pricerfree(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_pricerfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":10 * pass * * def pricerinit(self): # <<<<<<<<<<<<<< * '''initializes variable pricer''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_3pricerinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_2pricerinit[] = "initializes variable pricer"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_3pricerinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_2pricerinit(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_2pricerinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":14 * pass * * def pricerexit(self): # <<<<<<<<<<<<<< * '''calls exit method of variable pricer''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_5pricerexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_4pricerexit[] = "calls exit method of variable pricer"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_5pricerexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_4pricerexit(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_4pricerexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":18 * pass * * def pricerinitsol(self): # <<<<<<<<<<<<<< * '''informs variable pricer that the branch and bound process is being started ''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_7pricerinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_6pricerinitsol[] = "informs variable pricer that the branch and bound process is being started "; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_7pricerinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_6pricerinitsol(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_6pricerinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":22 * pass * * def pricerexitsol(self): # <<<<<<<<<<<<<< * '''informs variable pricer that the branch and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_9pricerexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_8pricerexitsol[] = "informs variable pricer that the branch and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_9pricerexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_8pricerexitsol(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_8pricerexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":26 * pass * * def pricerredcost(self): # <<<<<<<<<<<<<< * '''calls reduced cost pricing method of variable pricer''' * print("python error in pricerredcost: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_11pricerredcost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_10pricerredcost[] = "calls reduced cost pricing method of variable pricer"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_11pricerredcost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerredcost (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_10pricerredcost(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_10pricerredcost(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pricerredcost", 0); /* "src/pyscipopt/pricer.pxi":28 * def pricerredcost(self): * '''calls reduced cost pricing method of variable pricer''' * print("python error in pricerredcost: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":29 * '''calls reduced cost pricing method of variable pricer''' * print("python error in pricerredcost: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def pricerfarkas(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":26 * pass * * def pricerredcost(self): # <<<<<<<<<<<<<< * '''calls reduced cost pricing method of variable pricer''' * print("python error in pricerredcost: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Pricer.pricerredcost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":31 * return {} * * def pricerfarkas(self): # <<<<<<<<<<<<<< * '''calls Farkas pricing method of variable pricer''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_13pricerfarkas(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Pricer_12pricerfarkas[] = "calls Farkas pricing method of variable pricer"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_13pricerfarkas(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pricerfarkas (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_12pricerfarkas(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_12pricerfarkas(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pricerfarkas", 0); /* "src/pyscipopt/pricer.pxi":33 * def pricerfarkas(self): * '''calls Farkas pricing method of variable pricer''' * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":31 * return {} * * def pricerfarkas(self): # <<<<<<<<<<<<<< * '''calls Farkas pricing method of variable pricer''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Pricer.pricerfarkas", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":4 * #@brief Base class of the Pricers Plugin * cdef class Pricer: * cdef public Model model # <<<<<<<<<<<<<< * * def pricerfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_6Pricer_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_6Pricer_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_6Pricer_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(11, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Pricer.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_6Pricer_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_6Pricer_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_6Pricer_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_14__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_14__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, None), state */ /*else*/ { __pyx_t_3 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None * if use_setstate: * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Pricer); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, None), state * else: * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Pricer__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Pricer); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Pricer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Pricer__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Pricer_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Pricer_16__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Pricer_16__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Pricer__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Pricer__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Pricer, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Pricer__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Pricer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":37 * * * cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_PRICER *__pyx_v_pricer, CYTHON_UNUSED SCIP_Bool *__pyx_v_valid) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyPricerCopy", 0); /* "src/pyscipopt/pricer.pxi":38 * * cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":37 * * * cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":40 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerFree", 0); /* "src/pyscipopt/pricer.pxi":42 * cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * PyPricer.pricerfree() */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":43 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * PyPricer.pricerfree() * Py_DECREF(PyPricer) */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":44 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * PyPricer.pricerfree() # <<<<<<<<<<<<<< * Py_DECREF(PyPricer) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":45 * PyPricer = <Pricer>pricerdata * PyPricer.pricerfree() * Py_DECREF(PyPricer) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyPricer)); /* "src/pyscipopt/pricer.pxi":46 * PyPricer.pricerfree() * Py_DECREF(PyPricer) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":40 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":48 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerInit", 0); /* "src/pyscipopt/pricer.pxi":50 * cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * PyPricer.pricerinit() */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":51 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * PyPricer.pricerinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":52 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * PyPricer.pricerinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":53 * PyPricer = <Pricer>pricerdata * PyPricer.pricerinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":48 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":55 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerExit", 0); /* "src/pyscipopt/pricer.pxi":57 * cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * PyPricer.pricerexit() */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":58 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * PyPricer.pricerexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":59 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * PyPricer.pricerexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":60 * PyPricer = <Pricer>pricerdata * PyPricer.pricerexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":55 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":62 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerInitsol", 0); /* "src/pyscipopt/pricer.pxi":64 * cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * PyPricer.pricerinitsol() */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":65 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * PyPricer.pricerinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":66 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * PyPricer.pricerinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":67 * PyPricer = <Pricer>pricerdata * PyPricer.pricerinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":62 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":69 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerExitsol", 0); /* "src/pyscipopt/pricer.pxi":71 * cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * PyPricer.pricerexitsol() */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":72 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * PyPricer.pricerexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":73 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * PyPricer.pricerexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":74 * PyPricer = <Pricer>pricerdata * PyPricer.pricerexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":69 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":76 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerRedcost(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer, SCIP_Real *__pyx_v_lowerbound, SCIP_Bool *__pyx_v_stopearly, SCIP_RESULT *__pyx_v_result) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; SCIP_Real __pyx_t_8; SCIP_Bool __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerRedcost", 0); /* "src/pyscipopt/pricer.pxi":78 * cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * result_dict = PyPricer.pricerredcost() */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":79 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * result_dict = PyPricer.pricerredcost() * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":80 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * result_dict = PyPricer.pricerredcost() # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * lowerbound[0] = result_dict.get("lowerbound", <SCIP_Real>lowerbound[0]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerredcost); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":81 * PyPricer = <Pricer>pricerdata * result_dict = PyPricer.pricerredcost() * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * lowerbound[0] = result_dict.get("lowerbound", <SCIP_Real>lowerbound[0]) * stopearly[0] = result_dict.get("stopearly", <SCIP_Bool>stopearly[0]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/pricer.pxi":82 * result_dict = PyPricer.pricerredcost() * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * lowerbound[0] = result_dict.get("lowerbound", <SCIP_Real>lowerbound[0]) # <<<<<<<<<<<<<< * stopearly[0] = result_dict.get("stopearly", <SCIP_Bool>stopearly[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyFloat_FromDouble(((SCIP_Real)(__pyx_v_lowerbound[0]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_u_lowerbound, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_u_lowerbound, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_n_u_lowerbound); __Pyx_GIVEREF(__pyx_n_u_lowerbound); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_n_u_lowerbound); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_lowerbound[0]) = __pyx_t_8; /* "src/pyscipopt/pricer.pxi":83 * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * lowerbound[0] = result_dict.get("lowerbound", <SCIP_Real>lowerbound[0]) * stopearly[0] = result_dict.get("stopearly", <SCIP_Bool>stopearly[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyBool_FromLong(((SCIP_Bool)(__pyx_v_stopearly[0]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_stopearly, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_stopearly, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_n_u_stopearly); __Pyx_GIVEREF(__pyx_n_u_stopearly); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_n_u_stopearly); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_stopearly[0]) = __pyx_t_9; /* "src/pyscipopt/pricer.pxi":84 * lowerbound[0] = result_dict.get("lowerbound", <SCIP_Real>lowerbound[0]) * stopearly[0] = result_dict.get("stopearly", <SCIP_Bool>stopearly[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":76 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerRedcost", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/pricer.pxi":86 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPricerFarkas(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PRICER *__pyx_v_pricer, SCIP_RESULT *__pyx_v_result) { SCIP_PRICERDATA *__pyx_v_pricerdata; struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_PyPricer = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPricerFarkas", 0); /* "src/pyscipopt/pricer.pxi":88 * cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result): * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) # <<<<<<<<<<<<<< * PyPricer = <Pricer>pricerdata * result[0] = PyPricer.pricerfarkas().get("result", <SCIP_RESULT>result[0]) */ __pyx_v_pricerdata = SCIPpricerGetData(__pyx_v_pricer); /* "src/pyscipopt/pricer.pxi":89 * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata # <<<<<<<<<<<<<< * result[0] = PyPricer.pricerfarkas().get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_pricerdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyPricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/pricer.pxi":90 * pricerdata = SCIPpricerGetData(pricer) * PyPricer = <Pricer>pricerdata * result[0] = PyPricer.pricerfarkas().get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyPricer), __pyx_n_s_pricerfarkas); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/pricer.pxi":91 * PyPricer = <Pricer>pricerdata * result[0] = PyPricer.pricerfarkas().get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/pricer.pxi":86 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_PRICERDATA* pricerdata * pricerdata = SCIPpricerGetData(pricer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyPricerFarkas", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyPricer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":6 * cdef public Model model * * def propfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of propagator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_1propfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_propfree[] = "calls destructor and frees memory of propagator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_1propfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_propfree(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_propfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":10 * pass * * def propinit(self): # <<<<<<<<<<<<<< * '''initializes propagator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_3propinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_2propinit[] = "initializes propagator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_3propinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_2propinit(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_2propinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":14 * pass * * def propexit(self): # <<<<<<<<<<<<<< * '''calls exit method of propagator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_5propexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_4propexit[] = "calls exit method of propagator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_5propexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_4propexit(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_4propexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":18 * pass * * def propinitsol(self): # <<<<<<<<<<<<<< * '''informs propagator that the prop and bound process is being started''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_7propinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_6propinitsol[] = "informs propagator that the prop and bound process is being started"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_7propinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_6propinitsol(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_6propinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":22 * pass * * def propexitsol(self, restart): # <<<<<<<<<<<<<< * '''informs propagator that the prop and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_9propexitsol(PyObject *__pyx_v_self, PyObject *__pyx_v_restart); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_8propexitsol[] = "informs propagator that the prop and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_9propexitsol(PyObject *__pyx_v_self, PyObject *__pyx_v_restart) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_8propexitsol(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self), ((PyObject *)__pyx_v_restart)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_8propexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_restart) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":26 * pass * * def propinitpre(self): # <<<<<<<<<<<<<< * '''informs propagator that the presolving process is being started''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_11propinitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_10propinitpre[] = "informs propagator that the presolving process is being started"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_11propinitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propinitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_10propinitpre(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_10propinitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propinitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":30 * pass * * def propexitpre(self): # <<<<<<<<<<<<<< * '''informs propagator that the presolving process is finished''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_13propexitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_12propexitpre[] = "informs propagator that the presolving process is finished"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_13propexitpre(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexitpre (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_12propexitpre(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_12propexitpre(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexitpre", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":34 * pass * * def proppresol(self, nrounds, presoltiming, result_dict): # <<<<<<<<<<<<<< * '''executes presolving method of propagator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_15proppresol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_14proppresol[] = "executes presolving method of propagator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_15proppresol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_nrounds = 0; CYTHON_UNUSED PyObject *__pyx_v_presoltiming = 0; CYTHON_UNUSED PyObject *__pyx_v_result_dict = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("proppresol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nrounds,&__pyx_n_s_presoltiming,&__pyx_n_s_result_dict,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nrounds)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presoltiming)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("proppresol", 1, 3, 3, 1); __PYX_ERR(12, 34, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result_dict)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("proppresol", 1, 3, 3, 2); __PYX_ERR(12, 34, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "proppresol") < 0)) __PYX_ERR(12, 34, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_nrounds = values[0]; __pyx_v_presoltiming = values[1]; __pyx_v_result_dict = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("proppresol", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 34, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Prop.proppresol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_14proppresol(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self), __pyx_v_nrounds, __pyx_v_presoltiming, __pyx_v_result_dict); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_14proppresol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_nrounds, CYTHON_UNUSED PyObject *__pyx_v_presoltiming, CYTHON_UNUSED PyObject *__pyx_v_result_dict) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("proppresol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":38 * pass * * def propexec(self, proptiming): # <<<<<<<<<<<<<< * '''calls execution method of propagator''' * print("python error in propexec: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_17propexec(PyObject *__pyx_v_self, PyObject *__pyx_v_proptiming); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_16propexec[] = "calls execution method of propagator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_17propexec(PyObject *__pyx_v_self, PyObject *__pyx_v_proptiming) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propexec (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_16propexec(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self), ((PyObject *)__pyx_v_proptiming)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_16propexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_proptiming) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("propexec", 0); /* "src/pyscipopt/propagator.pxi":40 * def propexec(self, proptiming): * '''calls execution method of propagator''' * print("python error in propexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":41 * '''calls execution method of propagator''' * print("python error in propexec: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * def propresprop(self, confvar, inferinfo, bdtype, relaxedbd): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":38 * pass * * def propexec(self, proptiming): # <<<<<<<<<<<<<< * '''calls execution method of propagator''' * print("python error in propexec: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Prop.propexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":43 * return {} * * def propresprop(self, confvar, inferinfo, bdtype, relaxedbd): # <<<<<<<<<<<<<< * '''resolves the given conflicting bound, that was reduced by the given propagator''' * print("python error in propresprop: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_19propresprop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Prop_18propresprop[] = "resolves the given conflicting bound, that was reduced by the given propagator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_19propresprop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_confvar = 0; CYTHON_UNUSED PyObject *__pyx_v_inferinfo = 0; CYTHON_UNUSED PyObject *__pyx_v_bdtype = 0; CYTHON_UNUSED PyObject *__pyx_v_relaxedbd = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("propresprop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_confvar,&__pyx_n_s_inferinfo,&__pyx_n_s_bdtype,&__pyx_n_s_relaxedbd,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_confvar)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inferinfo)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("propresprop", 1, 4, 4, 1); __PYX_ERR(12, 43, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bdtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("propresprop", 1, 4, 4, 2); __PYX_ERR(12, 43, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_relaxedbd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("propresprop", 1, 4, 4, 3); __PYX_ERR(12, 43, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "propresprop") < 0)) __PYX_ERR(12, 43, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_confvar = values[0]; __pyx_v_inferinfo = values[1]; __pyx_v_bdtype = values[2]; __pyx_v_relaxedbd = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("propresprop", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 43, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Prop.propresprop", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_18propresprop(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self), __pyx_v_confvar, __pyx_v_inferinfo, __pyx_v_bdtype, __pyx_v_relaxedbd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_18propresprop(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_confvar, CYTHON_UNUSED PyObject *__pyx_v_inferinfo, CYTHON_UNUSED PyObject *__pyx_v_bdtype, CYTHON_UNUSED PyObject *__pyx_v_relaxedbd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("propresprop", 0); /* "src/pyscipopt/propagator.pxi":45 * def propresprop(self, confvar, inferinfo, bdtype, relaxedbd): * '''resolves the given conflicting bound, that was reduced by the given propagator''' * print("python error in propresprop: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":46 * '''resolves the given conflicting bound, that was reduced by the given propagator''' * print("python error in propresprop: this method needs to be implemented") * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":43 * return {} * * def propresprop(self, confvar, inferinfo, bdtype, relaxedbd): # <<<<<<<<<<<<<< * '''resolves the given conflicting bound, that was reduced by the given propagator''' * print("python error in propresprop: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Prop.propresprop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":4 * #@brief Base class of the Propagators Plugin * cdef class Prop: * cdef public Model model # <<<<<<<<<<<<<< * * def propfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Prop_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Prop_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Prop_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(12, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Prop.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Prop_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Prop_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Prop_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_20__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_20__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, None), state */ /*else*/ { __pyx_t_3 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None * if use_setstate: * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Prop); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, None), state * else: * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Prop__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Prop); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Prop.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Prop__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Prop_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Prop_22__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Prop_22__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Prop__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Prop__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Prop, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Prop__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Prop.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":50 * * * cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_PROP *__pyx_v_prop) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyPropCopy", 0); /* "src/pyscipopt/propagator.pxi":51 * * cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":50 * * * cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":53 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropFree", 0); /* "src/pyscipopt/propagator.pxi":55 * cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propfree() */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":56 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propfree() * Py_DECREF(PyProp) */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":57 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propfree() # <<<<<<<<<<<<<< * Py_DECREF(PyProp) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":58 * PyProp = <Prop>propdata * PyProp.propfree() * Py_DECREF(PyProp) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyProp)); /* "src/pyscipopt/propagator.pxi":59 * PyProp.propfree() * Py_DECREF(PyProp) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":53 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":61 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropInit", 0); /* "src/pyscipopt/propagator.pxi":63 * cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propinit() */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":64 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":65 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":66 * PyProp = <Prop>propdata * PyProp.propinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":61 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":68 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropExit", 0); /* "src/pyscipopt/propagator.pxi":70 * cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propexit() */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":71 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":72 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":73 * PyProp = <Prop>propdata * PyProp.propexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":68 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":75 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropInitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropInitpre", 0); /* "src/pyscipopt/propagator.pxi":77 * cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propinitpre() */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":78 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propinitpre() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":79 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propinitpre() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propinitpre); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":80 * PyProp = <Prop>propdata * PyProp.propinitpre() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":75 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropInitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":82 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExitpre(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropExitpre", 0); /* "src/pyscipopt/propagator.pxi":84 * cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propexitpre() */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":85 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propexitpre() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":86 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propexitpre() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propexitpre); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":87 * PyProp = <Prop>propdata * PyProp.propexitpre() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":82 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropExitpre", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":89 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropInitsol", 0); /* "src/pyscipopt/propagator.pxi":91 * cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propinitsol() */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":92 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":93 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":94 * PyProp = <Prop>propdata * PyProp.propinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":89 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":96 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop, SCIP_Bool __pyx_v_restart) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropExitsol", 0); /* "src/pyscipopt/propagator.pxi":98 * cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * PyProp.propexitsol(restart) */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":99 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * PyProp.propexitsol(restart) * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":100 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * PyProp.propexitsol(restart) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_restart); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":101 * PyProp = <Prop>propdata * PyProp.propexitsol(restart) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_PRESOLTIMING presoltiming, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":96 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":103 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_PRESOLTIMING presoltiming, # <<<<<<<<<<<<<< * int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, * int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropPresol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop, int __pyx_v_nrounds, SCIP_PRESOLTIMING __pyx_v_presoltiming, int __pyx_v_nnewfixedvars, int __pyx_v_nnewaggrvars, int __pyx_v_nnewchgvartypes, int __pyx_v_nnewchgbds, int __pyx_v_nnewholes, int __pyx_v_nnewdelconss, int __pyx_v_nnewaddconss, int __pyx_v_nnewupgdconss, int __pyx_v_nnewchgcoefs, int __pyx_v_nnewchgsides, int *__pyx_v_nfixedvars, int *__pyx_v_naggrvars, int *__pyx_v_nchgvartypes, int *__pyx_v_nchgbds, int *__pyx_v_naddholes, int *__pyx_v_ndelconss, int *__pyx_v_naddconss, int *__pyx_v_nupgdconss, int *__pyx_v_nchgcoefs, int *__pyx_v_nchgsides, SCIP_RESULT *__pyx_v_result) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; PyObject *__pyx_t_17 = NULL; SCIP_RESULT __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropPresol", 0); /* "src/pyscipopt/propagator.pxi":109 * int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * # dictionary for input/output parameters */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":110 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * # dictionary for input/output parameters * result_dict = {} */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":112 * PyProp = <Prop>propdata * # dictionary for input/output parameters * result_dict = {} # <<<<<<<<<<<<<< * result_dict["nfixedvars"] = nfixedvars[0] * result_dict["naggrvars"] = naggrvars[0] */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":113 * # dictionary for input/output parameters * result_dict = {} * result_dict["nfixedvars"] = nfixedvars[0] # <<<<<<<<<<<<<< * result_dict["naggrvars"] = naggrvars[0] * result_dict["nchgvartypes"] = nchgvartypes[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nfixedvars[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nfixedvars, __pyx_t_1) < 0)) __PYX_ERR(12, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":114 * result_dict = {} * result_dict["nfixedvars"] = nfixedvars[0] * result_dict["naggrvars"] = naggrvars[0] # <<<<<<<<<<<<<< * result_dict["nchgvartypes"] = nchgvartypes[0] * result_dict["nchgbds"] = nchgbds[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naggrvars[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_naggrvars, __pyx_t_1) < 0)) __PYX_ERR(12, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":115 * result_dict["nfixedvars"] = nfixedvars[0] * result_dict["naggrvars"] = naggrvars[0] * result_dict["nchgvartypes"] = nchgvartypes[0] # <<<<<<<<<<<<<< * result_dict["nchgbds"] = nchgbds[0] * result_dict["naddholes"] = naddholes[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgvartypes[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgvartypes, __pyx_t_1) < 0)) __PYX_ERR(12, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":116 * result_dict["naggrvars"] = naggrvars[0] * result_dict["nchgvartypes"] = nchgvartypes[0] * result_dict["nchgbds"] = nchgbds[0] # <<<<<<<<<<<<<< * result_dict["naddholes"] = naddholes[0] * result_dict["ndelconss"] = ndelconss[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgbds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgbds, __pyx_t_1) < 0)) __PYX_ERR(12, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":117 * result_dict["nchgvartypes"] = nchgvartypes[0] * result_dict["nchgbds"] = nchgbds[0] * result_dict["naddholes"] = naddholes[0] # <<<<<<<<<<<<<< * result_dict["ndelconss"] = ndelconss[0] * result_dict["naddconss"] = naddconss[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naddholes[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_naddholes, __pyx_t_1) < 0)) __PYX_ERR(12, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":118 * result_dict["nchgbds"] = nchgbds[0] * result_dict["naddholes"] = naddholes[0] * result_dict["ndelconss"] = ndelconss[0] # <<<<<<<<<<<<<< * result_dict["naddconss"] = naddconss[0] * result_dict["nupgdconss"] = nupgdconss[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_ndelconss[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_ndelconss, __pyx_t_1) < 0)) __PYX_ERR(12, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":119 * result_dict["naddholes"] = naddholes[0] * result_dict["ndelconss"] = ndelconss[0] * result_dict["naddconss"] = naddconss[0] # <<<<<<<<<<<<<< * result_dict["nupgdconss"] = nupgdconss[0] * result_dict["nchgcoefs"] = nchgcoefs[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_naddconss[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_naddconss, __pyx_t_1) < 0)) __PYX_ERR(12, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":120 * result_dict["ndelconss"] = ndelconss[0] * result_dict["naddconss"] = naddconss[0] * result_dict["nupgdconss"] = nupgdconss[0] # <<<<<<<<<<<<<< * result_dict["nchgcoefs"] = nchgcoefs[0] * result_dict["nchgsides"] = nchgsides[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nupgdconss[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nupgdconss, __pyx_t_1) < 0)) __PYX_ERR(12, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":121 * result_dict["naddconss"] = naddconss[0] * result_dict["nupgdconss"] = nupgdconss[0] * result_dict["nchgcoefs"] = nchgcoefs[0] # <<<<<<<<<<<<<< * result_dict["nchgsides"] = nchgsides[0] * result_dict["result"] = result[0] */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgcoefs[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgcoefs, __pyx_t_1) < 0)) __PYX_ERR(12, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":122 * result_dict["nupgdconss"] = nupgdconss[0] * result_dict["nchgcoefs"] = nchgcoefs[0] * result_dict["nchgsides"] = nchgsides[0] # <<<<<<<<<<<<<< * result_dict["result"] = result[0] * PyProp.proppresol(nrounds, presoltiming, */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nchgsides[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_nchgsides, __pyx_t_1) < 0)) __PYX_ERR(12, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":123 * result_dict["nchgcoefs"] = nchgcoefs[0] * result_dict["nchgsides"] = nchgsides[0] * result_dict["result"] = result[0] # <<<<<<<<<<<<<< * PyProp.proppresol(nrounds, presoltiming, * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_RESULT((__pyx_v_result[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_result_dict, __pyx_n_u_result, __pyx_t_1) < 0)) __PYX_ERR(12, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":124 * result_dict["nchgsides"] = nchgsides[0] * result_dict["result"] = result[0] * PyProp.proppresol(nrounds, presoltiming, # <<<<<<<<<<<<<< * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_proppresol); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrounds); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(__pyx_v_presoltiming); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/pyscipopt/propagator.pxi":125 * result_dict["result"] = result[0] * PyProp.proppresol(nrounds, presoltiming, * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, # <<<<<<<<<<<<<< * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) * result[0] = result_dict["result"] */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nnewfixedvars); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nnewaggrvars); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_nnewchgvartypes); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_nnewchgbds); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_nnewholes); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "src/pyscipopt/propagator.pxi":126 * PyProp.proppresol(nrounds, presoltiming, * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) # <<<<<<<<<<<<<< * result[0] = result_dict["result"] * nfixedvars[0] = result_dict["nfixedvars"] */ __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_nnewdelconss); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_nnewaddconss); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_nnewupgdconss); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_nnewchgcoefs); if (unlikely(!__pyx_t_13)) __PYX_ERR(12, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_nnewchgsides); if (unlikely(!__pyx_t_14)) __PYX_ERR(12, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; __pyx_t_16 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_16 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[14] = {__pyx_t_15, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_v_result_dict}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 13+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[14] = {__pyx_t_15, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_v_result_dict}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 13+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif { __pyx_t_17 = PyTuple_New(13+__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_15); __pyx_t_15 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_16, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_16, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_16, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_17, 3+__pyx_t_16, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_17, 4+__pyx_t_16, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_17, 5+__pyx_t_16, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_17, 6+__pyx_t_16, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_17, 7+__pyx_t_16, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_17, 8+__pyx_t_16, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_17, 9+__pyx_t_16, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_17, 10+__pyx_t_16, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_17, 11+__pyx_t_16, __pyx_t_14); __Pyx_INCREF(__pyx_v_result_dict); __Pyx_GIVEREF(__pyx_v_result_dict); PyTuple_SET_ITEM(__pyx_t_17, 12+__pyx_t_16, __pyx_v_result_dict); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":127 * nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) * result[0] = result_dict["result"] # <<<<<<<<<<<<<< * nfixedvars[0] = result_dict["nfixedvars"] * naggrvars[0] = result_dict["naggrvars"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_18 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_18; /* "src/pyscipopt/propagator.pxi":128 * nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict) * result[0] = result_dict["result"] * nfixedvars[0] = result_dict["nfixedvars"] # <<<<<<<<<<<<<< * naggrvars[0] = result_dict["naggrvars"] * nchgvartypes[0] = result_dict["nchgvartypes"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nfixedvars); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nfixedvars[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":129 * result[0] = result_dict["result"] * nfixedvars[0] = result_dict["nfixedvars"] * naggrvars[0] = result_dict["naggrvars"] # <<<<<<<<<<<<<< * nchgvartypes[0] = result_dict["nchgvartypes"] * nchgbds[0] = result_dict["nchgbds"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_naggrvars); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_naggrvars[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":130 * nfixedvars[0] = result_dict["nfixedvars"] * naggrvars[0] = result_dict["naggrvars"] * nchgvartypes[0] = result_dict["nchgvartypes"] # <<<<<<<<<<<<<< * nchgbds[0] = result_dict["nchgbds"] * naddholes[0] = result_dict["naddholes"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgvartypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgvartypes[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":131 * naggrvars[0] = result_dict["naggrvars"] * nchgvartypes[0] = result_dict["nchgvartypes"] * nchgbds[0] = result_dict["nchgbds"] # <<<<<<<<<<<<<< * naddholes[0] = result_dict["naddholes"] * ndelconss[0] = result_dict["ndelconss"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgbds); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgbds[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":132 * nchgvartypes[0] = result_dict["nchgvartypes"] * nchgbds[0] = result_dict["nchgbds"] * naddholes[0] = result_dict["naddholes"] # <<<<<<<<<<<<<< * ndelconss[0] = result_dict["ndelconss"] * naddconss[0] = result_dict["naddconss"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_naddholes); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_naddholes[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":133 * nchgbds[0] = result_dict["nchgbds"] * naddholes[0] = result_dict["naddholes"] * ndelconss[0] = result_dict["ndelconss"] # <<<<<<<<<<<<<< * naddconss[0] = result_dict["naddconss"] * nupgdconss[0] = result_dict["nupgdconss"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_ndelconss); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_ndelconss[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":134 * naddholes[0] = result_dict["naddholes"] * ndelconss[0] = result_dict["ndelconss"] * naddconss[0] = result_dict["naddconss"] # <<<<<<<<<<<<<< * nupgdconss[0] = result_dict["nupgdconss"] * nchgcoefs[0] = result_dict["nchgcoefs"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_naddconss); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_naddconss[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":135 * ndelconss[0] = result_dict["ndelconss"] * naddconss[0] = result_dict["naddconss"] * nupgdconss[0] = result_dict["nupgdconss"] # <<<<<<<<<<<<<< * nchgcoefs[0] = result_dict["nchgcoefs"] * nchgsides[0] = result_dict["nchgsides"] */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nupgdconss); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nupgdconss[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":136 * naddconss[0] = result_dict["naddconss"] * nupgdconss[0] = result_dict["nupgdconss"] * nchgcoefs[0] = result_dict["nchgcoefs"] # <<<<<<<<<<<<<< * nchgsides[0] = result_dict["nchgsides"] * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgcoefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgcoefs[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":137 * nupgdconss[0] = result_dict["nupgdconss"] * nchgcoefs[0] = result_dict["nchgcoefs"] * nchgsides[0] = result_dict["nchgsides"] # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result_dict, __pyx_n_u_nchgsides); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_nchgsides[0]) = __pyx_t_16; /* "src/pyscipopt/propagator.pxi":138 * nchgcoefs[0] = result_dict["nchgcoefs"] * nchgsides[0] = result_dict["nchgsides"] * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":103 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_PRESOLTIMING presoltiming, # <<<<<<<<<<<<<< * int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, * int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_17); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropPresol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":140 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropExec(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop, SCIP_PROPTIMING __pyx_v_proptiming, SCIP_RESULT *__pyx_v_result) { SCIP_PROPDATA *__pyx_v_propdata; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; PyObject *__pyx_v_returnvalues = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropExec", 0); /* "src/pyscipopt/propagator.pxi":142 * cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result): * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * PyProp = <Prop>propdata * returnvalues = PyProp.propexec(proptiming) */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":143 * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * returnvalues = PyProp.propexec(proptiming) * result_dict = returnvalues */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":144 * propdata = SCIPpropGetData(prop) * PyProp = <Prop>propdata * returnvalues = PyProp.propexec(proptiming) # <<<<<<<<<<<<<< * result_dict = returnvalues * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propexec); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_PROPTIMING(__pyx_v_proptiming); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_returnvalues = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":145 * PyProp = <Prop>propdata * returnvalues = PyProp.propexec(proptiming) * result_dict = returnvalues # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __Pyx_INCREF(__pyx_v_returnvalues); __pyx_v_result_dict = __pyx_v_returnvalues; /* "src/pyscipopt/propagator.pxi":146 * returnvalues = PyProp.propexec(proptiming) * result_dict = returnvalues * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/propagator.pxi":147 * result_dict = returnvalues * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo, */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":140 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_PROPDATA* propdata * propdata = SCIPpropGetData(prop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropExec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_XDECREF(__pyx_v_returnvalues); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/propagator.pxi":149 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo, # <<<<<<<<<<<<<< * SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result): * cdef SCIP_PROPDATA* propdata */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyPropResProp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_PROP *__pyx_v_prop, SCIP_VAR *__pyx_v_infervar, int __pyx_v_inferinfo, SCIP_BOUNDTYPE __pyx_v_boundtype, CYTHON_UNUSED SCIP_BDCHGIDX *__pyx_v_bdchgidx, SCIP_Real __pyx_v_relaxedbd, SCIP_RESULT *__pyx_v_result) { SCIP_PROPDATA *__pyx_v_propdata; SCIP_VAR *__pyx_v_tmp; PyObject *__pyx_v_confvar = NULL; struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_PyProp = NULL; PyObject *__pyx_v_returnvalues = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; SCIP_RESULT __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyPropResProp", 0); /* "src/pyscipopt/propagator.pxi":153 * cdef SCIP_PROPDATA* propdata * cdef SCIP_VAR* tmp * tmp = infervar # <<<<<<<<<<<<<< * propdata = SCIPpropGetData(prop) * confvar = Variable.create(tmp) */ __pyx_v_tmp = __pyx_v_infervar; /* "src/pyscipopt/propagator.pxi":154 * cdef SCIP_VAR* tmp * tmp = infervar * propdata = SCIPpropGetData(prop) # <<<<<<<<<<<<<< * confvar = Variable.create(tmp) * */ __pyx_v_propdata = SCIPpropGetData(__pyx_v_prop); /* "src/pyscipopt/propagator.pxi":155 * tmp = infervar * propdata = SCIPpropGetData(prop) * confvar = Variable.create(tmp) # <<<<<<<<<<<<<< * * #TODO: parse bdchgidx? */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_confvar = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":159 * #TODO: parse bdchgidx? * * PyProp = <Prop>propdata # <<<<<<<<<<<<<< * returnvalues = PyProp.propresprop(confvar, inferinfo, boundtype, relaxedbd) * result_dict = returnvalues */ __pyx_t_1 = ((PyObject *)__pyx_v_propdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyProp = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":160 * * PyProp = <Prop>propdata * returnvalues = PyProp.propresprop(confvar, inferinfo, boundtype, relaxedbd) # <<<<<<<<<<<<<< * result_dict = returnvalues * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyProp), __pyx_n_s_propresprop); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_inferinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_BOUNDTYPE(__pyx_v_boundtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_relaxedbd); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_confvar, __pyx_t_3, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_confvar, __pyx_t_3, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_confvar); __Pyx_GIVEREF(__pyx_v_confvar); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_confvar); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_returnvalues = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/propagator.pxi":161 * PyProp = <Prop>propdata * returnvalues = PyProp.propresprop(confvar, inferinfo, boundtype, relaxedbd) * result_dict = returnvalues # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __Pyx_INCREF(__pyx_v_returnvalues); __pyx_v_result_dict = __pyx_v_returnvalues; /* "src/pyscipopt/propagator.pxi":162 * returnvalues = PyProp.propresprop(confvar, inferinfo, boundtype, relaxedbd) * result_dict = returnvalues * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_result, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_9; /* "src/pyscipopt/propagator.pxi":163 * result_dict = returnvalues * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/propagator.pxi":149 * return SCIP_OKAY * * cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo, # <<<<<<<<<<<<<< * SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result): * cdef SCIP_PROPDATA* propdata */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("pyscipopt.scip.PyPropResProp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_confvar); __Pyx_XDECREF((PyObject *)__pyx_v_PyProp); __Pyx_XDECREF(__pyx_v_returnvalues); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":7 * cdef public str name * * def sepafree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of separator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_1sepafree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_sepafree[] = "calls destructor and frees memory of separator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_1sepafree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepafree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_sepafree(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_sepafree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepafree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":11 * pass * * def sepainit(self): # <<<<<<<<<<<<<< * '''initializes separator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_3sepainit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_2sepainit[] = "initializes separator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_3sepainit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepainit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_2sepainit(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_2sepainit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepainit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":15 * pass * * def sepaexit(self): # <<<<<<<<<<<<<< * '''calls exit method of separator''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_5sepaexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_4sepaexit[] = "calls exit method of separator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_5sepaexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepaexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_4sepaexit(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_4sepaexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepaexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":19 * pass * * def sepainitsol(self): # <<<<<<<<<<<<<< * '''informs separator that the branch and bound process is being started''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_7sepainitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_6sepainitsol[] = "informs separator that the branch and bound process is being started"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_7sepainitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepainitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_6sepainitsol(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_6sepainitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepainitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":23 * pass * * def sepaexitsol(self): # <<<<<<<<<<<<<< * '''informs separator that the branch and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_9sepaexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_8sepaexitsol[] = "informs separator that the branch and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_9sepaexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepaexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_8sepaexitsol(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_8sepaexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepaexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":27 * pass * * def sepaexeclp(self): # <<<<<<<<<<<<<< * '''calls LP separation method of separator''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_11sepaexeclp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_10sepaexeclp[] = "calls LP separation method of separator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_11sepaexeclp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepaexeclp (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_10sepaexeclp(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_10sepaexeclp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sepaexeclp", 0); /* "src/pyscipopt/sepa.pxi":29 * def sepaexeclp(self): * '''calls LP separation method of separator''' * return {} # <<<<<<<<<<<<<< * * def sepaexecsol(self, solution): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":27 * pass * * def sepaexeclp(self): # <<<<<<<<<<<<<< * '''calls LP separation method of separator''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Sepa.sepaexeclp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":31 * return {} * * def sepaexecsol(self, solution): # <<<<<<<<<<<<<< * '''calls primal solution separation method of separator''' * return {} */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_13sepaexecsol(PyObject *__pyx_v_self, PyObject *__pyx_v_solution); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Sepa_12sepaexecsol[] = "calls primal solution separation method of separator"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_13sepaexecsol(PyObject *__pyx_v_self, PyObject *__pyx_v_solution) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sepaexecsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_12sepaexecsol(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self), ((PyObject *)__pyx_v_solution)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_12sepaexecsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_solution) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sepaexecsol", 0); /* "src/pyscipopt/sepa.pxi":33 * def sepaexecsol(self, solution): * '''calls primal solution separation method of separator''' * return {} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":31 * return {} * * def sepaexecsol(self, solution): # <<<<<<<<<<<<<< * '''calls primal solution separation method of separator''' * return {} */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Sepa.sepaexecsol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":4 * #@brief Base class of the Separator Plugin * cdef class Sepa: * cdef public Model model # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Sepa_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Sepa_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Sepa_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(13, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Sepa.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Sepa_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Sepa_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Sepa_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":5 * cdef class Sepa: * cdef public Model model * cdef public str name # <<<<<<<<<<<<<< * * def sepafree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Sepa_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Sepa_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Sepa_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(13, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Sepa.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Sepa_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Sepa_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Sepa_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_14__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_14__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Sepa); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, None), state * else: * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Sepa__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Sepa); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Sepa.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Sepa__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Sepa_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Sepa_16__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Sepa_16__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Sepa__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Sepa__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Sepa, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Sepa__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Sepa.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":37 * * * cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_SEPA *__pyx_v_sepa) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PySepaCopy", 0); /* "src/pyscipopt/sepa.pxi":38 * * cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":37 * * * cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":40 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaFree", 0); /* "src/pyscipopt/sepa.pxi":42 * cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * PySepa.sepafree() */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":43 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * PySepa.sepafree() * Py_DECREF(PySepa) */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":44 * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata * PySepa.sepafree() # <<<<<<<<<<<<<< * Py_DECREF(PySepa) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepafree); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":45 * PySepa = <Sepa>sepadata * PySepa.sepafree() * Py_DECREF(PySepa) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PySepa)); /* "src/pyscipopt/sepa.pxi":46 * PySepa.sepafree() * Py_DECREF(PySepa) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":40 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":48 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaInit", 0); /* "src/pyscipopt/sepa.pxi":50 * cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * PySepa.sepainit() */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":51 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * PySepa.sepainit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":52 * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata * PySepa.sepainit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepainit); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":53 * PySepa = <Sepa>sepadata * PySepa.sepainit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":48 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":55 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaExit", 0); /* "src/pyscipopt/sepa.pxi":57 * cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * PySepa.sepaexit() */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":58 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * PySepa.sepaexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":59 * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata * PySepa.sepaexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepaexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":60 * PySepa = <Sepa>sepadata * PySepa.sepaexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":55 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":62 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaInitsol", 0); /* "src/pyscipopt/sepa.pxi":64 * cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * PySepa.sepainitsol() */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":65 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * PySepa.sepainitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":66 * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata * PySepa.sepainitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepainitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":67 * PySepa = <Sepa>sepadata * PySepa.sepainitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":62 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":69 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaExitsol", 0); /* "src/pyscipopt/sepa.pxi":71 * cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * PySepa.sepaexitsol() */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":72 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * PySepa.sepaexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":73 * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata * PySepa.sepaexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepaexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":74 * PySepa = <Sepa>sepadata * PySepa.sepaexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":69 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":76 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExeclp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa, SCIP_RESULT *__pyx_v_result, CYTHON_UNUSED unsigned int __pyx_v_allowlocal) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaExeclp", 0); /* "src/pyscipopt/sepa.pxi":78 * cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * result_dict = PySepa.sepaexeclp() */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":79 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * result_dict = PySepa.sepaexeclp() * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":80 * sepadata = SCIPsepaGetData(sepa) * PySepa = <Sepa>sepadata * result_dict = PySepa.sepaexeclp() # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepaexeclp); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":81 * PySepa = <Sepa>sepadata * result_dict = PySepa.sepaexeclp() * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/sepa.pxi":82 * result_dict = PySepa.sepaexeclp() * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":76 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaExeclp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/sepa.pxi":84 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PySepaExecsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_SEPA *__pyx_v_sepa, SCIP_SOL *__pyx_v_sol, SCIP_RESULT *__pyx_v_result, CYTHON_UNUSED unsigned int __pyx_v_allowlocal) { SCIP_SEPADATA *__pyx_v_sepadata; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = NULL; struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_PySepa = NULL; PyObject *__pyx_v_result_dict = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_RESULT __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PySepaExecsol", 0); /* "src/pyscipopt/sepa.pxi":86 * cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal): * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) # <<<<<<<<<<<<<< * solution = Solution() * solution.sol = sol */ __pyx_v_sepadata = SCIPsepaGetData(__pyx_v_sepa); /* "src/pyscipopt/sepa.pxi":87 * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) * solution = Solution() # <<<<<<<<<<<<<< * solution.sol = sol * PySepa = <Sepa>sepadata */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Solution)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":88 * sepadata = SCIPsepaGetData(sepa) * solution = Solution() * solution.sol = sol # <<<<<<<<<<<<<< * PySepa = <Sepa>sepadata * result_dict = PySepa.sepaexecsol(solution) */ __pyx_v_solution->sol = __pyx_v_sol; /* "src/pyscipopt/sepa.pxi":89 * solution = Solution() * solution.sol = sol * PySepa = <Sepa>sepadata # <<<<<<<<<<<<<< * result_dict = PySepa.sepaexecsol(solution) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) */ __pyx_t_1 = ((PyObject *)__pyx_v_sepadata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PySepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":90 * solution.sol = sol * PySepa = <Sepa>sepadata * result_dict = PySepa.sepaexecsol(solution) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PySepa), __pyx_n_s_sepaexecsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_solution)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_solution)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/sepa.pxi":91 * PySepa = <Sepa>sepadata * result_dict = PySepa.sepaexecsol(solution) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RESULT(((SCIP_RESULT)(__pyx_v_result[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_result, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_u_result); __Pyx_GIVEREF(__pyx_n_u_result); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_result); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((SCIP_RESULT)__Pyx_PyInt_As_SCIP_RESULT(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_result[0]) = __pyx_t_7; /* "src/pyscipopt/sepa.pxi":92 * result_dict = PySepa.sepaexecsol(solution) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY # <<<<<<<<<<<<<< */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/sepa.pxi":84 * return SCIP_OKAY * * cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal): # <<<<<<<<<<<<<< * cdef SCIP_SEPADATA* sepadata * sepadata = SCIPsepaGetData(sepa) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pyscipopt.scip.PySepaExecsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_solution); __Pyx_XDECREF((PyObject *)__pyx_v_PySepa); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":7 * cdef public str name * * def relaxfree(self): # <<<<<<<<<<<<<< * '''calls destructor and frees memory of relaxation handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_1relaxfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Relax_relaxfree[] = "calls destructor and frees memory of relaxation handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_1relaxfree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxfree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_relaxfree(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_relaxfree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxfree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":11 * pass * * def relaxinit(self): # <<<<<<<<<<<<<< * '''initializes relaxation handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_3relaxinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Relax_2relaxinit[] = "initializes relaxation handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_3relaxinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_2relaxinit(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_2relaxinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":15 * pass * * def relaxexit(self): # <<<<<<<<<<<<<< * '''calls exit method of relaxation handler''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_5relaxexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Relax_4relaxexit[] = "calls exit method of relaxation handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_5relaxexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_4relaxexit(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_4relaxexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":19 * pass * * def relaxinitsol(self): # <<<<<<<<<<<<<< * '''informs relaxaton handler that the branch and bound process is being started''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_7relaxinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Relax_6relaxinitsol[] = "informs relaxaton handler that the branch and bound process is being started"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_7relaxinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_6relaxinitsol(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_6relaxinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":23 * pass * * def relaxexitsol(self): # <<<<<<<<<<<<<< * '''informs relaxation handler that the branch and bound process data is being freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_9relaxexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Relax_8relaxexitsol[] = "informs relaxation handler that the branch and bound process data is being freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_9relaxexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_8relaxexitsol(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_8relaxexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":27 * pass * * def relaxexec(self): # <<<<<<<<<<<<<< * '''callls execution method of relaxation handler''' * print("python error in relaxexec: this method needs to be implemented") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_11relaxexec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Relax_10relaxexec[] = "callls execution method of relaxation handler"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_11relaxexec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("relaxexec (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_10relaxexec(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_10relaxexec(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("relaxexec", 0); /* "src/pyscipopt/relax.pxi":29 * def relaxexec(self): * '''callls execution method of relaxation handler''' * print("python error in relaxexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return{} * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":30 * '''callls execution method of relaxation handler''' * print("python error in relaxexec: this method needs to be implemented") * return{} # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":27 * pass * * def relaxexec(self): # <<<<<<<<<<<<<< * '''callls execution method of relaxation handler''' * print("python error in relaxexec: this method needs to be implemented") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Relax.relaxexec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":4 * #@brief Base class of the Relaxator Plugin * cdef class Relax: * cdef public Model model # <<<<<<<<<<<<<< * cdef public str name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Relax_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Relax_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Relax_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(14, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Relax.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Relax_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Relax_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Relax_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":5 * cdef class Relax: * cdef public Model model * cdef public str name # <<<<<<<<<<<<<< * * def relaxfree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Relax_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Relax_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_4name_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Relax_4name_2__set__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(14, 5, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Relax.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Relax_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Relax_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_4name_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Relax_4name_4__del__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_12__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_12__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model, self.name) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None or self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model, self.name) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None or self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Relax, (type(self), 0xecd383d, None), state */ /*else*/ { __pyx_t_2 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->name != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Relax, (type(self), 0xecd383d, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None or self.name is not None * if use_setstate: * return __pyx_unpickle_Relax, (type(self), 0xecd383d, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Relax, (type(self), 0xecd383d, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Relax); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None or self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Relax, (type(self), 0xecd383d, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Relax, (type(self), 0xecd383d, None), state * else: * return __pyx_unpickle_Relax, (type(self), 0xecd383d, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Relax__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Relax); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_248330301); __Pyx_GIVEREF(__pyx_int_248330301); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_248330301); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Relax.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Relax, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Relax__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Relax_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Relax_14__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Relax_14__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Relax, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Relax__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Relax__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Relax, (type(self), 0xecd383d, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Relax__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Relax.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":33 * * * cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_RELAX *__pyx_v_relax) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyRelaxCopy", 0); /* "src/pyscipopt/relax.pxi":34 * * cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":33 * * * cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":36 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_RELAX *__pyx_v_relax) { SCIP_RELAXDATA *__pyx_v_relaxdata; struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_PyRelax = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyRelaxFree", 0); /* "src/pyscipopt/relax.pxi":38 * cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax): * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) # <<<<<<<<<<<<<< * PyRelax = <Relax>relaxdata * PyRelax.relaxfree() */ __pyx_v_relaxdata = SCIPrelaxGetData(__pyx_v_relax); /* "src/pyscipopt/relax.pxi":39 * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata # <<<<<<<<<<<<<< * PyRelax.relaxfree() * Py_DECREF(PyRelax) */ __pyx_t_1 = ((PyObject *)__pyx_v_relaxdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyRelax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":40 * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata * PyRelax.relaxfree() # <<<<<<<<<<<<<< * Py_DECREF(PyRelax) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyRelax), __pyx_n_s_relaxfree); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":41 * PyRelax = <Relax>relaxdata * PyRelax.relaxfree() * Py_DECREF(PyRelax) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyRelax)); /* "src/pyscipopt/relax.pxi":42 * PyRelax.relaxfree() * Py_DECREF(PyRelax) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":36 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyRelaxFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyRelax); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":44 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_RELAX *__pyx_v_relax) { SCIP_RELAXDATA *__pyx_v_relaxdata; struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_PyRelax = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyRelaxInit", 0); /* "src/pyscipopt/relax.pxi":46 * cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax): * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) # <<<<<<<<<<<<<< * PyRelax = <Relax>relaxdata * PyRelax.relaxinit() */ __pyx_v_relaxdata = SCIPrelaxGetData(__pyx_v_relax); /* "src/pyscipopt/relax.pxi":47 * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata # <<<<<<<<<<<<<< * PyRelax.relaxinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_relaxdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyRelax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":48 * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata * PyRelax.relaxinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyRelax), __pyx_n_s_relaxinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":49 * PyRelax = <Relax>relaxdata * PyRelax.relaxinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":44 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyRelaxInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyRelax); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":51 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_RELAX *__pyx_v_relax) { SCIP_RELAXDATA *__pyx_v_relaxdata; struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_PyRelax = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyRelaxExit", 0); /* "src/pyscipopt/relax.pxi":53 * cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax): * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) # <<<<<<<<<<<<<< * PyRelax = <Relax>relaxdata * PyRelax.relaxexit() */ __pyx_v_relaxdata = SCIPrelaxGetData(__pyx_v_relax); /* "src/pyscipopt/relax.pxi":54 * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata # <<<<<<<<<<<<<< * PyRelax.relaxexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_relaxdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyRelax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":55 * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata * PyRelax.relaxexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyRelax), __pyx_n_s_relaxexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":56 * PyRelax = <Relax>relaxdata * PyRelax.relaxexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":51 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyRelaxExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyRelax); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":58 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_RELAX *__pyx_v_relax) { SCIP_RELAXDATA *__pyx_v_relaxdata; struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_PyRelax = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyRelaxInitsol", 0); /* "src/pyscipopt/relax.pxi":60 * cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax): * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) # <<<<<<<<<<<<<< * PyRelax = <Relax>relaxdata * PyRelax.relaxinitsol() */ __pyx_v_relaxdata = SCIPrelaxGetData(__pyx_v_relax); /* "src/pyscipopt/relax.pxi":61 * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata # <<<<<<<<<<<<<< * PyRelax.relaxinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_relaxdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyRelax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":62 * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata * PyRelax.relaxinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyRelax), __pyx_n_s_relaxinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":63 * PyRelax = <Relax>relaxdata * PyRelax.relaxinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":58 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyRelaxInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyRelax); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":65 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_RELAX *__pyx_v_relax) { SCIP_RELAXDATA *__pyx_v_relaxdata; struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_PyRelax = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyRelaxExitsol", 0); /* "src/pyscipopt/relax.pxi":67 * cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax): * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) # <<<<<<<<<<<<<< * PyRelax = <Relax>relaxdata * PyRelax.relaxexitsol() */ __pyx_v_relaxdata = SCIPrelaxGetData(__pyx_v_relax); /* "src/pyscipopt/relax.pxi":68 * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata # <<<<<<<<<<<<<< * PyRelax.relaxexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_relaxdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyRelax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":69 * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata * PyRelax.relaxexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyRelax), __pyx_n_s_relaxexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":70 * PyRelax = <Relax>relaxdata * PyRelax.relaxexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":65 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyRelaxExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyRelax); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/relax.pxi":72 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyRelaxExec(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_RELAX *__pyx_v_relax, CYTHON_UNUSED SCIP_Real *__pyx_v_lowerbound, CYTHON_UNUSED SCIP_RESULT *__pyx_v_result) { SCIP_RELAXDATA *__pyx_v_relaxdata; struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_PyRelax = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyRelaxExec", 0); /* "src/pyscipopt/relax.pxi":74 * cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result): * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) # <<<<<<<<<<<<<< * PyRelax = <Relax>relaxdata * PyRelax.relaxexec() */ __pyx_v_relaxdata = SCIPrelaxGetData(__pyx_v_relax); /* "src/pyscipopt/relax.pxi":75 * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata # <<<<<<<<<<<<<< * PyRelax.relaxexec() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_relaxdata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyRelax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":76 * relaxdata = SCIPrelaxGetData(relax) * PyRelax = <Relax>relaxdata * PyRelax.relaxexec() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyRelax), __pyx_n_s_relaxexec); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/relax.pxi":77 * PyRelax = <Relax>relaxdata * PyRelax.relaxexec() * return SCIP_OKAY # <<<<<<<<<<<<<< * */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/relax.pxi":72 * return SCIP_OKAY * * cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result): # <<<<<<<<<<<<<< * cdef SCIP_RELAXDATA* relaxdata * relaxdata = SCIPrelaxGetData(relax) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyRelaxExec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyRelax); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":6 * cdef public Model model * * def nodefree(self): # <<<<<<<<<<<<<< * '''frees memory of node selector''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_1nodefree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_nodefree[] = "frees memory of node selector"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_1nodefree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodefree (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_nodefree(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_nodefree(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodefree", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":10 * pass * * def nodeinit(self): # <<<<<<<<<<<<<< * ''' executed after the problem is transformed. use this call to initialize node selector data.''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_3nodeinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_2nodeinit[] = " executed after the problem is transformed. use this call to initialize node selector data."; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_3nodeinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeinit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_2nodeinit(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_2nodeinit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeinit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":14 * pass * * def nodeexit(self): # <<<<<<<<<<<<<< * '''executed before the transformed problem is freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_5nodeexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_4nodeexit[] = "executed before the transformed problem is freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_5nodeexit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeexit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_4nodeexit(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_4nodeexit(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeexit", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":18 * pass * * def nodeinitsol(self): # <<<<<<<<<<<<<< * '''executed when the presolving is finished and the branch-and-bound process is about to begin''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_7nodeinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_6nodeinitsol[] = "executed when the presolving is finished and the branch-and-bound process is about to begin"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_7nodeinitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeinitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_6nodeinitsol(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_6nodeinitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeinitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":22 * pass * * def nodeexitsol(self): # <<<<<<<<<<<<<< * '''executed before the branch-and-bound process is freed''' * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_9nodeexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_8nodeexitsol[] = "executed before the branch-and-bound process is freed"; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_9nodeexitsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeexitsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_8nodeexitsol(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_8nodeexitsol(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeexitsol", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":26 * pass * * def nodeselect(self): # <<<<<<<<<<<<<< * '''first method called in each iteration in the main solving loop. ''' * # this method needs to be implemented by the user */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_11nodeselect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_10nodeselect[] = "first method called in each iteration in the main solving loop. "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_11nodeselect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodeselect (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_10nodeselect(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_10nodeselect(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("nodeselect", 0); /* "src/pyscipopt/nodesel.pxi":29 * '''first method called in each iteration in the main solving loop. ''' * # this method needs to be implemented by the user * return {} # <<<<<<<<<<<<<< * * def nodecomp(self, node1, node2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":26 * pass * * def nodeselect(self): # <<<<<<<<<<<<<< * '''first method called in each iteration in the main solving loop. ''' * # this method needs to be implemented by the user */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Nodesel.nodeselect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":31 * return {} * * def nodecomp(self, node1, node2): # <<<<<<<<<<<<<< * ''' * compare two leaves of the current branching tree */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_13nodecomp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_7Nodesel_12nodecomp[] = "\n compare two leaves of the current branching tree\n It should return the following values:\n value < 0, if node 1 comes before (is better than) node 2\n value = 0, if both nodes are equally good\n value > 0, if node 1 comes after (is worse than) node 2.\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_13nodecomp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_node1 = 0; CYTHON_UNUSED PyObject *__pyx_v_node2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodecomp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_node1,&__pyx_n_s_node2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("nodecomp", 1, 2, 2, 1); __PYX_ERR(15, 31, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nodecomp") < 0)) __PYX_ERR(15, 31, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_node1 = values[0]; __pyx_v_node2 = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("nodecomp", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 31, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Nodesel.nodecomp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_12nodecomp(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self), __pyx_v_node1, __pyx_v_node2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_12nodecomp(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node1, CYTHON_UNUSED PyObject *__pyx_v_node2) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nodecomp", 0); /* "src/pyscipopt/nodesel.pxi":40 * ''' * # this method needs to be implemented by the user * return 0 # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":31 * return {} * * def nodecomp(self, node1, node2): # <<<<<<<<<<<<<< * ''' * compare two leaves of the current branching tree */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":4 * #@brief Base class of the Nodesel Plugin * cdef class Nodesel: * cdef public Model model # <<<<<<<<<<<<<< * * def nodefree(self): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_5model___get__(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_5model___get__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __pyx_r = ((PyObject *)__pyx_v_self->model); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_5model_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7Nodesel_5model_2__set__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(15, 4, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Nodesel.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_5model_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_7Nodesel_5model_4__del__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->model); __Pyx_DECREF(((PyObject *)__pyx_v_self->model)); __pyx_v_self->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_14__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_14__reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.model,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->model)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->model)); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.model,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.model is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.model,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.model is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, None), state */ /*else*/ { __pyx_t_3 = (((PyObject *)__pyx_v_self->model) != Py_None); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = self.model is not None * if use_setstate: * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Nodesel); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.model is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, None), state * else: * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Nodesel__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Nodesel); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_34551270); __Pyx_GIVEREF(__pyx_int_34551270); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34551270); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Nodesel.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Nodesel__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_7Nodesel_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_7Nodesel_16__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_7Nodesel_16__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Nodesel__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Nodesel__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Nodesel, (type(self), 0x20f35e6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Nodesel__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Nodesel.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":43 * * * cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselCopy(CYTHON_UNUSED SCIP *__pyx_v_scip, CYTHON_UNUSED SCIP_NODESEL *__pyx_v_nodesel) { SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyNodeselCopy", 0); /* "src/pyscipopt/nodesel.pxi":44 * * cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel): * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":43 * * * cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * return SCIP_OKAY * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":46 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselFree(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselFree", 0); /* "src/pyscipopt/nodesel.pxi":48 * cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodefree() */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":49 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * PyNodesel.nodefree() * Py_DECREF(PyNodesel) */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":50 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodefree() # <<<<<<<<<<<<<< * Py_DECREF(PyNodesel) * return SCIP_OKAY */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodefree); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":51 * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodefree() * Py_DECREF(PyNodesel) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ Py_DECREF(((PyObject *)__pyx_v_PyNodesel)); /* "src/pyscipopt/nodesel.pxi":52 * PyNodesel.nodefree() * Py_DECREF(PyNodesel) * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":46 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselFree", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":54 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselInit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselInit", 0); /* "src/pyscipopt/nodesel.pxi":56 * cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeinit() */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":57 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * PyNodesel.nodeinit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":58 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeinit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodeinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":59 * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeinit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":54 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":62 * * * cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselExit(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselExit", 0); /* "src/pyscipopt/nodesel.pxi":64 * cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeexit() */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":65 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * PyNodesel.nodeexit() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":66 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeexit() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodeexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":67 * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeexit() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":62 * * * cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselExit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":69 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselInitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselInitsol", 0); /* "src/pyscipopt/nodesel.pxi":71 * cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeinitsol() */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":72 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * PyNodesel.nodeinitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":73 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeinitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodeinitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":74 * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeinitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":69 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselInitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":76 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselExitsol(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselExitsol", 0); /* "src/pyscipopt/nodesel.pxi":78 * cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeexitsol() */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":79 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * PyNodesel.nodeexitsol() * return SCIP_OKAY */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":80 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeexitsol() # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodeexitsol); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":81 * PyNodesel = <Nodesel>nodeseldata * PyNodesel.nodeexitsol() * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":76 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselExitsol", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":83 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static SCIP_RETCODE __pyx_f_9pyscipopt_4scip_PyNodeselSelect(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel, SCIP_NODE **__pyx_v_selnode) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; PyObject *__pyx_v_result_dict = NULL; struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_selected_node = NULL; SCIP_RETCODE __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; SCIP_NODE *__pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselSelect", 0); /* "src/pyscipopt/nodesel.pxi":85 * cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * result_dict = PyNodesel.nodeselect() */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":86 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * result_dict = PyNodesel.nodeselect() * selected_node = <Node>(result_dict.get("selnode", None)) */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":87 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * result_dict = PyNodesel.nodeselect() # <<<<<<<<<<<<<< * selected_node = <Node>(result_dict.get("selnode", None)) * selnode[0] = selected_node.scip_node */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodeselect); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_dict = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":88 * PyNodesel = <Nodesel>nodeseldata * result_dict = PyNodesel.nodeselect() * selected_node = <Node>(result_dict.get("selnode", None)) # <<<<<<<<<<<<<< * selnode[0] = selected_node.scip_node * return SCIP_OKAY */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_selected_node = ((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":89 * result_dict = PyNodesel.nodeselect() * selected_node = <Node>(result_dict.get("selnode", None)) * selnode[0] = selected_node.scip_node # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_t_4 = __pyx_v_selected_node->scip_node; (__pyx_v_selnode[0]) = __pyx_t_4; /* "src/pyscipopt/nodesel.pxi":90 * selected_node = <Node>(result_dict.get("selnode", None)) * selnode[0] = selected_node.scip_node * return SCIP_OKAY # <<<<<<<<<<<<<< * * cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2): */ __pyx_r = SCIP_OKAY; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":83 * return SCIP_OKAY * * cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselSelect", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (SCIP_RETCODE) 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_XDECREF(__pyx_v_result_dict); __Pyx_XDECREF((PyObject *)__pyx_v_selected_node); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/pyscipopt/nodesel.pxi":92 * return SCIP_OKAY * * cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ static int __pyx_f_9pyscipopt_4scip_PyNodeselComp(CYTHON_UNUSED SCIP *__pyx_v_scip, SCIP_NODESEL *__pyx_v_nodesel, SCIP_NODE *__pyx_v_node1, SCIP_NODE *__pyx_v_node2) { SCIP_NODESELDATA *__pyx_v_nodeseldata; struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_PyNodesel = NULL; PyObject *__pyx_v_n1 = NULL; PyObject *__pyx_v_n2 = NULL; PyObject *__pyx_v_result = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyNodeselComp", 0); /* "src/pyscipopt/nodesel.pxi":94 * cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2): * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) # <<<<<<<<<<<<<< * PyNodesel = <Nodesel>nodeseldata * n1 = Node.create(node1) */ __pyx_v_nodeseldata = SCIPnodeselGetData(__pyx_v_nodesel); /* "src/pyscipopt/nodesel.pxi":95 * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata # <<<<<<<<<<<<<< * n1 = Node.create(node1) * n2 = Node.create(node2) */ __pyx_t_1 = ((PyObject *)__pyx_v_nodeseldata); __Pyx_INCREF(__pyx_t_1); __pyx_v_PyNodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":96 * nodeseldata = SCIPnodeselGetData(nodesel) * PyNodesel = <Nodesel>nodeseldata * n1 = Node.create(node1) # <<<<<<<<<<<<<< * n2 = Node.create(node2) * result = PyNodesel.nodecomp(n1, n2) # */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_node1); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_n1 = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":97 * PyNodesel = <Nodesel>nodeseldata * n1 = Node.create(node1) * n2 = Node.create(node2) # <<<<<<<<<<<<<< * result = PyNodesel.nodecomp(n1, n2) # * return result */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_node2); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_n2 = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":98 * n1 = Node.create(node1) * n2 = Node.create(node2) * result = PyNodesel.nodecomp(n1, n2) # # <<<<<<<<<<<<<< * return result */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_PyNodesel), __pyx_n_s_nodecomp); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_n1, __pyx_v_n2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 98, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_n1, __pyx_v_n2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 98, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_n1); __Pyx_GIVEREF(__pyx_v_n1); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_n1); __Pyx_INCREF(__pyx_v_n2); __Pyx_GIVEREF(__pyx_v_n2); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_n2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "src/pyscipopt/nodesel.pxi":99 * n2 = Node.create(node2) * result = PyNodesel.nodecomp(n1, n2) # * return result # <<<<<<<<<<<<<< */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_result); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 99, __pyx_L1_error) __pyx_r = __pyx_t_4; goto __pyx_L0; /* "src/pyscipopt/nodesel.pxi":92 * return SCIP_OKAY * * cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2): # <<<<<<<<<<<<<< * cdef SCIP_NODESELDATA* nodeseldata * nodeseldata = SCIPnodeselGetData(nodesel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("pyscipopt.scip.PyNodeselComp", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_PyNodesel); __Pyx_XDECREF(__pyx_v_n1); __Pyx_XDECREF(__pyx_v_n2); __Pyx_XDECREF(__pyx_v_result); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_RESULT_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_RESULT_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_14PY_SCIP_RESULT___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_RESULT___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_RESULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_RESULT__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_RESULT); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_RESULT.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_RESULT__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_RESULT_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_RESULT_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_14PY_SCIP_RESULT_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_RESULT_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_RESULT__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_RESULT__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_RESULT, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_RESULT__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_RESULT.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMSETT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMSETT); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PARAMSETTING.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PARAMSETTING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PARAMSETTING.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMEMPH); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMEMPH); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PARAMEMPHASIS.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PARAMEMPHASIS, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PARAMEMPHASIS.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_STATUS_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_STATUS_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_14PY_SCIP_STATUS___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_STATUS___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_STATUS__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_STATUS); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_STATUS.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STATUS__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_STATUS_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_14PY_SCIP_STATUS_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_14PY_SCIP_STATUS_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_14PY_SCIP_STATUS_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_STATUS__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STATUS__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_STATUS, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STATUS__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_STATUS.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_13PY_SCIP_STAGE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_13PY_SCIP_STAGE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_13PY_SCIP_STAGE___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_13PY_SCIP_STAGE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_STAGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_STAGE__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_STAGE); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_STAGE.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STAGE__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_13PY_SCIP_STAGE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_13PY_SCIP_STAGE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_13PY_SCIP_STAGE_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_13PY_SCIP_STAGE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_STAGE__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STAGE__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_STAGE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STAGE__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_STAGE.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_16PY_SCIP_NODETYPE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_16PY_SCIP_NODETYPE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_16PY_SCIP_NODETYPE___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_16PY_SCIP_NODETYPE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_NODETYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_NODETYPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_NODETYPE.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_16PY_SCIP_NODETYPE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_16PY_SCIP_NODETYPE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_16PY_SCIP_NODETYPE_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_16PY_SCIP_NODETYPE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_NODETYPE__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_NODETYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_NODETYPE.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_18PY_SCIP_PROPTIMING___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_PROPTIMING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_PROPTIMIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_PROPTIMIN); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PROPTIMING.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PROPTIMING__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PROPTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PROPTIMING.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_PRESOLTIM); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_PRESOLTIM); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PRESOLTIMING.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_PRESOLTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_PRESOLTIMING.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_18PY_SCIP_HEURTIMING___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_HEURTIMING___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_HEURTIMIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_HEURTIMIN); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_HEURTIMING.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_HEURTIMING__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_HEURTIMING, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_HEURTIMING.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_EVENTTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_EVENTTYPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_EVENTTYPE.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_EVENTTYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_EVENTTYPE.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_LPSOLSTAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_LPSOLSTAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_LPSOLSTAT.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_LPSOLSTAT, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_LPSOLSTAT.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_BRANCHDIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_BRANCHDIR); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_BRANCHDIR.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_BRANCHDIR, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_BRANCHDIR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE___reduce_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":6 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 * use_setstate = False * if use_setstate: * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PY_SCIP_BENDERSEN); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PY_SCIP_BENDERSEN); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_BENDERSENFOTYPE.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_2__setstate_cython__(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 17, __pyx_L1_error) __pyx_t_1 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_BENDERSENFOTYPE.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":219 * * * def PY_SCIP_CALL(SCIP_RETCODE rc): # <<<<<<<<<<<<<< * if rc == SCIP_OKAY: * pass */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_23PY_SCIP_CALL(PyObject *__pyx_self, PyObject *__pyx_arg_rc); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_23PY_SCIP_CALL = {"PY_SCIP_CALL", (PyCFunction)__pyx_pw_9pyscipopt_4scip_23PY_SCIP_CALL, METH_O, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_23PY_SCIP_CALL(PyObject *__pyx_self, PyObject *__pyx_arg_rc) { SCIP_RETCODE __pyx_v_rc; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PY_SCIP_CALL (wrapper)", 0); assert(__pyx_arg_rc); { __pyx_v_rc = ((SCIP_RETCODE)__Pyx_PyInt_As_SCIP_RETCODE(__pyx_arg_rc)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 219, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_CALL", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_22PY_SCIP_CALL(__pyx_self, ((SCIP_RETCODE)__pyx_v_rc)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_22PY_SCIP_CALL(CYTHON_UNUSED PyObject *__pyx_self, SCIP_RETCODE __pyx_v_rc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PY_SCIP_CALL", 0); /* "pyscipopt/scip.pyx":220 * * def PY_SCIP_CALL(SCIP_RETCODE rc): * if rc == SCIP_OKAY: # <<<<<<<<<<<<<< * pass * elif rc == SCIP_ERROR: */ switch (__pyx_v_rc) { case SCIP_OKAY: break; case SCIP_ERROR: /* "pyscipopt/scip.pyx":223 * pass * elif rc == SCIP_ERROR: * raise Exception('SCIP: unspecified error!') # <<<<<<<<<<<<<< * elif rc == SCIP_NOMEMORY: * raise MemoryError('SCIP: insufficient memory error!') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 223, __pyx_L1_error) /* "pyscipopt/scip.pyx":222 * if rc == SCIP_OKAY: * pass * elif rc == SCIP_ERROR: # <<<<<<<<<<<<<< * raise Exception('SCIP: unspecified error!') * elif rc == SCIP_NOMEMORY: */ break; case SCIP_NOMEMORY: /* "pyscipopt/scip.pyx":225 * raise Exception('SCIP: unspecified error!') * elif rc == SCIP_NOMEMORY: * raise MemoryError('SCIP: insufficient memory error!') # <<<<<<<<<<<<<< * elif rc == SCIP_READERROR: * raise IOError('SCIP: read error!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 225, __pyx_L1_error) /* "pyscipopt/scip.pyx":224 * elif rc == SCIP_ERROR: * raise Exception('SCIP: unspecified error!') * elif rc == SCIP_NOMEMORY: # <<<<<<<<<<<<<< * raise MemoryError('SCIP: insufficient memory error!') * elif rc == SCIP_READERROR: */ break; case SCIP_READERROR: /* "pyscipopt/scip.pyx":227 * raise MemoryError('SCIP: insufficient memory error!') * elif rc == SCIP_READERROR: * raise IOError('SCIP: read error!') # <<<<<<<<<<<<<< * elif rc == SCIP_WRITEERROR: * raise IOError('SCIP: write error!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 227, __pyx_L1_error) /* "pyscipopt/scip.pyx":226 * elif rc == SCIP_NOMEMORY: * raise MemoryError('SCIP: insufficient memory error!') * elif rc == SCIP_READERROR: # <<<<<<<<<<<<<< * raise IOError('SCIP: read error!') * elif rc == SCIP_WRITEERROR: */ break; case SCIP_WRITEERROR: /* "pyscipopt/scip.pyx":229 * raise IOError('SCIP: read error!') * elif rc == SCIP_WRITEERROR: * raise IOError('SCIP: write error!') # <<<<<<<<<<<<<< * elif rc == SCIP_NOFILE: * raise IOError('SCIP: file not found error!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 229, __pyx_L1_error) /* "pyscipopt/scip.pyx":228 * elif rc == SCIP_READERROR: * raise IOError('SCIP: read error!') * elif rc == SCIP_WRITEERROR: # <<<<<<<<<<<<<< * raise IOError('SCIP: write error!') * elif rc == SCIP_NOFILE: */ break; case SCIP_NOFILE: /* "pyscipopt/scip.pyx":231 * raise IOError('SCIP: write error!') * elif rc == SCIP_NOFILE: * raise IOError('SCIP: file not found error!') # <<<<<<<<<<<<<< * elif rc == SCIP_FILECREATEERROR: * raise IOError('SCIP: cannot create file!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 231, __pyx_L1_error) /* "pyscipopt/scip.pyx":230 * elif rc == SCIP_WRITEERROR: * raise IOError('SCIP: write error!') * elif rc == SCIP_NOFILE: # <<<<<<<<<<<<<< * raise IOError('SCIP: file not found error!') * elif rc == SCIP_FILECREATEERROR: */ break; case SCIP_FILECREATEERROR: /* "pyscipopt/scip.pyx":233 * raise IOError('SCIP: file not found error!') * elif rc == SCIP_FILECREATEERROR: * raise IOError('SCIP: cannot create file!') # <<<<<<<<<<<<<< * elif rc == SCIP_LPERROR: * raise Exception('SCIP: error in LP solver!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 233, __pyx_L1_error) /* "pyscipopt/scip.pyx":232 * elif rc == SCIP_NOFILE: * raise IOError('SCIP: file not found error!') * elif rc == SCIP_FILECREATEERROR: # <<<<<<<<<<<<<< * raise IOError('SCIP: cannot create file!') * elif rc == SCIP_LPERROR: */ break; case SCIP_LPERROR: /* "pyscipopt/scip.pyx":235 * raise IOError('SCIP: cannot create file!') * elif rc == SCIP_LPERROR: * raise Exception('SCIP: error in LP solver!') # <<<<<<<<<<<<<< * elif rc == SCIP_NOPROBLEM: * raise Exception('SCIP: no problem exists!') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 235, __pyx_L1_error) /* "pyscipopt/scip.pyx":234 * elif rc == SCIP_FILECREATEERROR: * raise IOError('SCIP: cannot create file!') * elif rc == SCIP_LPERROR: # <<<<<<<<<<<<<< * raise Exception('SCIP: error in LP solver!') * elif rc == SCIP_NOPROBLEM: */ break; case SCIP_NOPROBLEM: /* "pyscipopt/scip.pyx":237 * raise Exception('SCIP: error in LP solver!') * elif rc == SCIP_NOPROBLEM: * raise Exception('SCIP: no problem exists!') # <<<<<<<<<<<<<< * elif rc == SCIP_INVALIDCALL: * raise Exception('SCIP: method cannot be called at this time' */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 237, __pyx_L1_error) /* "pyscipopt/scip.pyx":236 * elif rc == SCIP_LPERROR: * raise Exception('SCIP: error in LP solver!') * elif rc == SCIP_NOPROBLEM: # <<<<<<<<<<<<<< * raise Exception('SCIP: no problem exists!') * elif rc == SCIP_INVALIDCALL: */ break; case SCIP_INVALIDCALL: /* "pyscipopt/scip.pyx":239 * raise Exception('SCIP: no problem exists!') * elif rc == SCIP_INVALIDCALL: * raise Exception('SCIP: method cannot be called at this time' # <<<<<<<<<<<<<< * + ' in solution process!') * elif rc == SCIP_INVALIDDATA: */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 239, __pyx_L1_error) /* "pyscipopt/scip.pyx":238 * elif rc == SCIP_NOPROBLEM: * raise Exception('SCIP: no problem exists!') * elif rc == SCIP_INVALIDCALL: # <<<<<<<<<<<<<< * raise Exception('SCIP: method cannot be called at this time' * + ' in solution process!') */ break; case SCIP_INVALIDDATA: /* "pyscipopt/scip.pyx":242 * + ' in solution process!') * elif rc == SCIP_INVALIDDATA: * raise Exception('SCIP: error in input data!') # <<<<<<<<<<<<<< * elif rc == SCIP_INVALIDRESULT: * raise Exception('SCIP: method returned an invalid result code!') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 242, __pyx_L1_error) /* "pyscipopt/scip.pyx":241 * raise Exception('SCIP: method cannot be called at this time' * + ' in solution process!') * elif rc == SCIP_INVALIDDATA: # <<<<<<<<<<<<<< * raise Exception('SCIP: error in input data!') * elif rc == SCIP_INVALIDRESULT: */ break; case SCIP_INVALIDRESULT: /* "pyscipopt/scip.pyx":244 * raise Exception('SCIP: error in input data!') * elif rc == SCIP_INVALIDRESULT: * raise Exception('SCIP: method returned an invalid result code!') # <<<<<<<<<<<<<< * elif rc == SCIP_PLUGINNOTFOUND: * raise Exception('SCIP: a required plugin was not found !') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 244, __pyx_L1_error) /* "pyscipopt/scip.pyx":243 * elif rc == SCIP_INVALIDDATA: * raise Exception('SCIP: error in input data!') * elif rc == SCIP_INVALIDRESULT: # <<<<<<<<<<<<<< * raise Exception('SCIP: method returned an invalid result code!') * elif rc == SCIP_PLUGINNOTFOUND: */ break; case SCIP_PLUGINNOTFOUND: /* "pyscipopt/scip.pyx":246 * raise Exception('SCIP: method returned an invalid result code!') * elif rc == SCIP_PLUGINNOTFOUND: * raise Exception('SCIP: a required plugin was not found !') # <<<<<<<<<<<<<< * elif rc == SCIP_PARAMETERUNKNOWN: * raise KeyError('SCIP: the parameter with the given name was not found!') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 246, __pyx_L1_error) /* "pyscipopt/scip.pyx":245 * elif rc == SCIP_INVALIDRESULT: * raise Exception('SCIP: method returned an invalid result code!') * elif rc == SCIP_PLUGINNOTFOUND: # <<<<<<<<<<<<<< * raise Exception('SCIP: a required plugin was not found !') * elif rc == SCIP_PARAMETERUNKNOWN: */ break; case SCIP_PARAMETERUNKNOWN: /* "pyscipopt/scip.pyx":248 * raise Exception('SCIP: a required plugin was not found !') * elif rc == SCIP_PARAMETERUNKNOWN: * raise KeyError('SCIP: the parameter with the given name was not found!') # <<<<<<<<<<<<<< * elif rc == SCIP_PARAMETERWRONGTYPE: * raise LookupError('SCIP: the parameter is not of the expected type!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 248, __pyx_L1_error) /* "pyscipopt/scip.pyx":247 * elif rc == SCIP_PLUGINNOTFOUND: * raise Exception('SCIP: a required plugin was not found !') * elif rc == SCIP_PARAMETERUNKNOWN: # <<<<<<<<<<<<<< * raise KeyError('SCIP: the parameter with the given name was not found!') * elif rc == SCIP_PARAMETERWRONGTYPE: */ break; case SCIP_PARAMETERWRONGTYPE: /* "pyscipopt/scip.pyx":250 * raise KeyError('SCIP: the parameter with the given name was not found!') * elif rc == SCIP_PARAMETERWRONGTYPE: * raise LookupError('SCIP: the parameter is not of the expected type!') # <<<<<<<<<<<<<< * elif rc == SCIP_PARAMETERWRONGVAL: * raise ValueError('SCIP: the value is invalid for the given parameter!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_LookupError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 250, __pyx_L1_error) /* "pyscipopt/scip.pyx":249 * elif rc == SCIP_PARAMETERUNKNOWN: * raise KeyError('SCIP: the parameter with the given name was not found!') * elif rc == SCIP_PARAMETERWRONGTYPE: # <<<<<<<<<<<<<< * raise LookupError('SCIP: the parameter is not of the expected type!') * elif rc == SCIP_PARAMETERWRONGVAL: */ break; case SCIP_PARAMETERWRONGVAL: /* "pyscipopt/scip.pyx":252 * raise LookupError('SCIP: the parameter is not of the expected type!') * elif rc == SCIP_PARAMETERWRONGVAL: * raise ValueError('SCIP: the value is invalid for the given parameter!') # <<<<<<<<<<<<<< * elif rc == SCIP_KEYALREADYEXISTING: * raise KeyError('SCIP: the given key is already existing in table!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 252, __pyx_L1_error) /* "pyscipopt/scip.pyx":251 * elif rc == SCIP_PARAMETERWRONGTYPE: * raise LookupError('SCIP: the parameter is not of the expected type!') * elif rc == SCIP_PARAMETERWRONGVAL: # <<<<<<<<<<<<<< * raise ValueError('SCIP: the value is invalid for the given parameter!') * elif rc == SCIP_KEYALREADYEXISTING: */ break; case SCIP_KEYALREADYEXISTING: /* "pyscipopt/scip.pyx":254 * raise ValueError('SCIP: the value is invalid for the given parameter!') * elif rc == SCIP_KEYALREADYEXISTING: * raise KeyError('SCIP: the given key is already existing in table!') # <<<<<<<<<<<<<< * elif rc == SCIP_MAXDEPTHLEVEL: * raise Exception('SCIP: maximal branching depth level exceeded!') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 254, __pyx_L1_error) /* "pyscipopt/scip.pyx":253 * elif rc == SCIP_PARAMETERWRONGVAL: * raise ValueError('SCIP: the value is invalid for the given parameter!') * elif rc == SCIP_KEYALREADYEXISTING: # <<<<<<<<<<<<<< * raise KeyError('SCIP: the given key is already existing in table!') * elif rc == SCIP_MAXDEPTHLEVEL: */ break; case SCIP_MAXDEPTHLEVEL: /* "pyscipopt/scip.pyx":256 * raise KeyError('SCIP: the given key is already existing in table!') * elif rc == SCIP_MAXDEPTHLEVEL: * raise Exception('SCIP: maximal branching depth level exceeded!') # <<<<<<<<<<<<<< * else: * raise Exception('SCIP: unknown return code!') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 256, __pyx_L1_error) /* "pyscipopt/scip.pyx":255 * elif rc == SCIP_KEYALREADYEXISTING: * raise KeyError('SCIP: the given key is already existing in table!') * elif rc == SCIP_MAXDEPTHLEVEL: # <<<<<<<<<<<<<< * raise Exception('SCIP: maximal branching depth level exceeded!') * else: */ break; default: /* "pyscipopt/scip.pyx":258 * raise Exception('SCIP: maximal branching depth level exceeded!') * else: * raise Exception('SCIP: unknown return code!') # <<<<<<<<<<<<<< * * cdef class Event: */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 258, __pyx_L1_error) break; } /* "pyscipopt/scip.pyx":219 * * * def PY_SCIP_CALL(SCIP_RETCODE rc): # <<<<<<<<<<<<<< * if rc == SCIP_OKAY: * pass */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.PY_SCIP_CALL", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":266 * * @staticmethod * cdef create(SCIP_EVENT* scip_event): # <<<<<<<<<<<<<< * event = Event() * event.event = scip_event */ static PyObject *__pyx_f_9pyscipopt_4scip_5Event_create(SCIP_EVENT *__pyx_v_scip_event) { struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_event = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":267 * @staticmethod * cdef create(SCIP_EVENT* scip_event): * event = Event() # <<<<<<<<<<<<<< * event.event = scip_event * return event */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Event)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_event = ((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":268 * cdef create(SCIP_EVENT* scip_event): * event = Event() * event.event = scip_event # <<<<<<<<<<<<<< * return event * */ __pyx_v_event->event = __pyx_v_scip_event; /* "pyscipopt/scip.pyx":269 * event = Event() * event.event = scip_event * return event # <<<<<<<<<<<<<< * * def getType(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_event)); __pyx_r = ((PyObject *)__pyx_v_event); goto __pyx_L0; /* "pyscipopt/scip.pyx":266 * * @staticmethod * cdef create(SCIP_EVENT* scip_event): # <<<<<<<<<<<<<< * event = Event() * event.event = scip_event */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_event); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":271 * return event * * def getType(self): # <<<<<<<<<<<<<< * """gets type of event""" * return SCIPeventGetType(self.event) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_1getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Event_getType[] = "gets type of event"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_1getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_getType(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_getType(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "pyscipopt/scip.pyx":273 * def getType(self): * """gets type of event""" * return SCIPeventGetType(self.event) # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIPeventGetType(__pyx_v_self->event)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":271 * return event * * def getType(self): # <<<<<<<<<<<<<< * """gets type of event""" * return SCIPeventGetType(self.event) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":275 * return SCIPeventGetType(self.event) * * def __repr__(self): # <<<<<<<<<<<<<< * return self.getType() * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_2__repr__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pyscipopt/scip.pyx":276 * * def __repr__(self): * return self.getType() # <<<<<<<<<<<<<< * * def getNewBound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":275 * return SCIPeventGetType(self.event) * * def __repr__(self): # <<<<<<<<<<<<<< * return self.getType() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Event.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":278 * return self.getType() * * def getNewBound(self): # <<<<<<<<<<<<<< * """gets new bound for a bound change event""" * return SCIPeventGetNewbound(self.event) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_5getNewBound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Event_4getNewBound[] = "gets new bound for a bound change event"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_5getNewBound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNewBound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_4getNewBound(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_4getNewBound(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNewBound", 0); /* "pyscipopt/scip.pyx":280 * def getNewBound(self): * """gets new bound for a bound change event""" * return SCIPeventGetNewbound(self.event) # <<<<<<<<<<<<<< * * def getOldBound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPeventGetNewbound(__pyx_v_self->event)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":278 * return self.getType() * * def getNewBound(self): # <<<<<<<<<<<<<< * """gets new bound for a bound change event""" * return SCIPeventGetNewbound(self.event) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.getNewBound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":282 * return SCIPeventGetNewbound(self.event) * * def getOldBound(self): # <<<<<<<<<<<<<< * """gets old bound for a bound change event""" * return SCIPeventGetOldbound(self.event) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_7getOldBound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Event_6getOldBound[] = "gets old bound for a bound change event"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_7getOldBound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOldBound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_6getOldBound(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_6getOldBound(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOldBound", 0); /* "pyscipopt/scip.pyx":284 * def getOldBound(self): * """gets old bound for a bound change event""" * return SCIPeventGetOldbound(self.event) # <<<<<<<<<<<<<< * * def getVar(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPeventGetOldbound(__pyx_v_self->event)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":282 * return SCIPeventGetNewbound(self.event) * * def getOldBound(self): # <<<<<<<<<<<<<< * """gets old bound for a bound change event""" * return SCIPeventGetOldbound(self.event) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.getOldBound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":286 * return SCIPeventGetOldbound(self.event) * * def getVar(self): # <<<<<<<<<<<<<< * """gets variable for a variable event (var added, var deleted, var fixed, objective value or domain change, domain hole added or removed)""" * cdef SCIP_VAR* var = SCIPeventGetVar(self.event) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_9getVar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Event_8getVar[] = "gets variable for a variable event (var added, var deleted, var fixed, objective value or domain change, domain hole added or removed)"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_9getVar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVar (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_8getVar(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_8getVar(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { SCIP_VAR *__pyx_v_var; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVar", 0); /* "pyscipopt/scip.pyx":288 * def getVar(self): * """gets variable for a variable event (var added, var deleted, var fixed, objective value or domain change, domain hole added or removed)""" * cdef SCIP_VAR* var = SCIPeventGetVar(self.event) # <<<<<<<<<<<<<< * return Variable.create(var) * */ __pyx_v_var = SCIPeventGetVar(__pyx_v_self->event); /* "pyscipopt/scip.pyx":289 * """gets variable for a variable event (var added, var deleted, var fixed, objective value or domain change, domain hole added or removed)""" * cdef SCIP_VAR* var = SCIPeventGetVar(self.event) * return Variable.create(var) # <<<<<<<<<<<<<< * * def getNode(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":286 * return SCIPeventGetOldbound(self.event) * * def getVar(self): # <<<<<<<<<<<<<< * """gets variable for a variable event (var added, var deleted, var fixed, objective value or domain change, domain hole added or removed)""" * cdef SCIP_VAR* var = SCIPeventGetVar(self.event) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.getVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":291 * return Variable.create(var) * * def getNode(self): # <<<<<<<<<<<<<< * """gets node for a node or LP event""" * cdef SCIP_NODE* node = SCIPeventGetNode(self.event) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_11getNode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Event_10getNode[] = "gets node for a node or LP event"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_11getNode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNode (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_10getNode(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_10getNode(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { SCIP_NODE *__pyx_v_node; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNode", 0); /* "pyscipopt/scip.pyx":293 * def getNode(self): * """gets node for a node or LP event""" * cdef SCIP_NODE* node = SCIPeventGetNode(self.event) # <<<<<<<<<<<<<< * return Node.create(node) * */ __pyx_v_node = SCIPeventGetNode(__pyx_v_self->event); /* "pyscipopt/scip.pyx":294 * """gets node for a node or LP event""" * cdef SCIP_NODE* node = SCIPeventGetNode(self.event) * return Node.create(node) # <<<<<<<<<<<<<< * * cdef class Column: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":291 * return Variable.create(var) * * def getNode(self): # <<<<<<<<<<<<<< * """gets node for a node or LP event""" * cdef SCIP_NODE* node = SCIPeventGetNode(self.event) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.getNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":263 * cdef SCIP_EVENT* event * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Event_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Event_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Event_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.event cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_12__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.event cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.event cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.event cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.event cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.event cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Event_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Event_14__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Event_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Event *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.event cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.event cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.event cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.event cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":303 * * @staticmethod * cdef create(SCIP_COL* scipcol): # <<<<<<<<<<<<<< * col = Column() * col.scip_col = scipcol */ static PyObject *__pyx_f_9pyscipopt_4scip_6Column_create(SCIP_COL *__pyx_v_scipcol) { struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_col = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":304 * @staticmethod * cdef create(SCIP_COL* scipcol): * col = Column() # <<<<<<<<<<<<<< * col.scip_col = scipcol * return col */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_col = ((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":305 * cdef create(SCIP_COL* scipcol): * col = Column() * col.scip_col = scipcol # <<<<<<<<<<<<<< * return col * */ __pyx_v_col->scip_col = __pyx_v_scipcol; /* "pyscipopt/scip.pyx":306 * col = Column() * col.scip_col = scipcol * return col # <<<<<<<<<<<<<< * * def getLPPos(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_col)); __pyx_r = ((PyObject *)__pyx_v_col); goto __pyx_L0; /* "pyscipopt/scip.pyx":303 * * @staticmethod * cdef create(SCIP_COL* scipcol): # <<<<<<<<<<<<<< * col = Column() * col.scip_col = scipcol */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_col); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":308 * return col * * def getLPPos(self): # <<<<<<<<<<<<<< * """gets position of column in current LP, or -1 if it is not in LP""" * return SCIPcolGetLPPos(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_1getLPPos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_getLPPos[] = "gets position of column in current LP, or -1 if it is not in LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_1getLPPos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPPos (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_getLPPos(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_getLPPos(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPPos", 0); /* "pyscipopt/scip.pyx":310 * def getLPPos(self): * """gets position of column in current LP, or -1 if it is not in LP""" * return SCIPcolGetLPPos(self.scip_col) # <<<<<<<<<<<<<< * * def getBasisStatus(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPcolGetLPPos(__pyx_v_self->scip_col)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":308 * return col * * def getLPPos(self): # <<<<<<<<<<<<<< * """gets position of column in current LP, or -1 if it is not in LP""" * return SCIPcolGetLPPos(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.getLPPos", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":312 * return SCIPcolGetLPPos(self.scip_col) * * def getBasisStatus(self): # <<<<<<<<<<<<<< * """gets the basis status of a column in the LP solution, Note: returns basis status `zero` for columns not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIPcolGetBasisStatus(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_3getBasisStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_2getBasisStatus[] = "gets the basis status of a column in the LP solution, Note: returns basis status `zero` for columns not in the current SCIP LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_3getBasisStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBasisStatus (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_2getBasisStatus(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_2getBasisStatus(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { SCIP_BASESTAT __pyx_v_stat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBasisStatus", 0); /* "pyscipopt/scip.pyx":314 * def getBasisStatus(self): * """gets the basis status of a column in the LP solution, Note: returns basis status `zero` for columns not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIPcolGetBasisStatus(self.scip_col) # <<<<<<<<<<<<<< * if stat == SCIP_BASESTAT_LOWER: * return "lower" */ __pyx_v_stat = SCIPcolGetBasisStatus(__pyx_v_self->scip_col); /* "pyscipopt/scip.pyx":315 * """gets the basis status of a column in the LP solution, Note: returns basis status `zero` for columns not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIPcolGetBasisStatus(self.scip_col) * if stat == SCIP_BASESTAT_LOWER: # <<<<<<<<<<<<<< * return "lower" * elif stat == SCIP_BASESTAT_BASIC: */ switch (__pyx_v_stat) { case SCIP_BASESTAT_LOWER: /* "pyscipopt/scip.pyx":316 * cdef SCIP_BASESTAT stat = SCIPcolGetBasisStatus(self.scip_col) * if stat == SCIP_BASESTAT_LOWER: * return "lower" # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_BASIC: * return "basic" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_lower); __pyx_r = __pyx_n_u_lower; goto __pyx_L0; /* "pyscipopt/scip.pyx":315 * """gets the basis status of a column in the LP solution, Note: returns basis status `zero` for columns not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIPcolGetBasisStatus(self.scip_col) * if stat == SCIP_BASESTAT_LOWER: # <<<<<<<<<<<<<< * return "lower" * elif stat == SCIP_BASESTAT_BASIC: */ break; case SCIP_BASESTAT_BASIC: /* "pyscipopt/scip.pyx":318 * return "lower" * elif stat == SCIP_BASESTAT_BASIC: * return "basic" # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_UPPER: * return "upper" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_basic); __pyx_r = __pyx_n_u_basic; goto __pyx_L0; /* "pyscipopt/scip.pyx":317 * if stat == SCIP_BASESTAT_LOWER: * return "lower" * elif stat == SCIP_BASESTAT_BASIC: # <<<<<<<<<<<<<< * return "basic" * elif stat == SCIP_BASESTAT_UPPER: */ break; case SCIP_BASESTAT_UPPER: /* "pyscipopt/scip.pyx":320 * return "basic" * elif stat == SCIP_BASESTAT_UPPER: * return "upper" # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_ZERO: * return "zero" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_upper); __pyx_r = __pyx_n_u_upper; goto __pyx_L0; /* "pyscipopt/scip.pyx":319 * elif stat == SCIP_BASESTAT_BASIC: * return "basic" * elif stat == SCIP_BASESTAT_UPPER: # <<<<<<<<<<<<<< * return "upper" * elif stat == SCIP_BASESTAT_ZERO: */ break; case SCIP_BASESTAT_ZERO: /* "pyscipopt/scip.pyx":322 * return "upper" * elif stat == SCIP_BASESTAT_ZERO: * return "zero" # <<<<<<<<<<<<<< * else: * raise Exception('SCIP returned unknown base status!') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_zero); __pyx_r = __pyx_n_u_zero; goto __pyx_L0; /* "pyscipopt/scip.pyx":321 * elif stat == SCIP_BASESTAT_UPPER: * return "upper" * elif stat == SCIP_BASESTAT_ZERO: # <<<<<<<<<<<<<< * return "zero" * else: */ break; default: /* "pyscipopt/scip.pyx":324 * return "zero" * else: * raise Exception('SCIP returned unknown base status!') # <<<<<<<<<<<<<< * * def isIntegral(self): */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 324, __pyx_L1_error) break; } /* "pyscipopt/scip.pyx":312 * return SCIPcolGetLPPos(self.scip_col) * * def getBasisStatus(self): # <<<<<<<<<<<<<< * """gets the basis status of a column in the LP solution, Note: returns basis status `zero` for columns not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIPcolGetBasisStatus(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.getBasisStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":326 * raise Exception('SCIP returned unknown base status!') * * def isIntegral(self): # <<<<<<<<<<<<<< * """returns whether the associated variable is of integral type (binary, integer, implicit integer)""" * return SCIPcolIsIntegral(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_5isIntegral(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_4isIntegral[] = "returns whether the associated variable is of integral type (binary, integer, implicit integer)"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_5isIntegral(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isIntegral (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_4isIntegral(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_4isIntegral(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isIntegral", 0); /* "pyscipopt/scip.pyx":328 * def isIntegral(self): * """returns whether the associated variable is of integral type (binary, integer, implicit integer)""" * return SCIPcolIsIntegral(self.scip_col) # <<<<<<<<<<<<<< * * def getVar(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPcolIsIntegral(__pyx_v_self->scip_col)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":326 * raise Exception('SCIP returned unknown base status!') * * def isIntegral(self): # <<<<<<<<<<<<<< * """returns whether the associated variable is of integral type (binary, integer, implicit integer)""" * return SCIPcolIsIntegral(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.isIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":330 * return SCIPcolIsIntegral(self.scip_col) * * def getVar(self): # <<<<<<<<<<<<<< * """gets variable this column represents""" * cdef SCIP_VAR* var = SCIPcolGetVar(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_7getVar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_6getVar[] = "gets variable this column represents"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_7getVar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVar (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_6getVar(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_6getVar(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { SCIP_VAR *__pyx_v_var; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVar", 0); /* "pyscipopt/scip.pyx":332 * def getVar(self): * """gets variable this column represents""" * cdef SCIP_VAR* var = SCIPcolGetVar(self.scip_col) # <<<<<<<<<<<<<< * return Variable.create(var) * */ __pyx_v_var = SCIPcolGetVar(__pyx_v_self->scip_col); /* "pyscipopt/scip.pyx":333 * """gets variable this column represents""" * cdef SCIP_VAR* var = SCIPcolGetVar(self.scip_col) * return Variable.create(var) # <<<<<<<<<<<<<< * * def getPrimsol(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":330 * return SCIPcolIsIntegral(self.scip_col) * * def getVar(self): # <<<<<<<<<<<<<< * """gets variable this column represents""" * cdef SCIP_VAR* var = SCIPcolGetVar(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.getVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":335 * return Variable.create(var) * * def getPrimsol(self): # <<<<<<<<<<<<<< * """gets the primal LP solution of a column""" * return SCIPcolGetPrimsol(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_9getPrimsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_8getPrimsol[] = "gets the primal LP solution of a column"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_9getPrimsol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPrimsol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_8getPrimsol(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_8getPrimsol(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPrimsol", 0); /* "pyscipopt/scip.pyx":337 * def getPrimsol(self): * """gets the primal LP solution of a column""" * return SCIPcolGetPrimsol(self.scip_col) # <<<<<<<<<<<<<< * * def getLb(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPcolGetPrimsol(__pyx_v_self->scip_col)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":335 * return Variable.create(var) * * def getPrimsol(self): # <<<<<<<<<<<<<< * """gets the primal LP solution of a column""" * return SCIPcolGetPrimsol(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.getPrimsol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":339 * return SCIPcolGetPrimsol(self.scip_col) * * def getLb(self): # <<<<<<<<<<<<<< * """gets lower bound of column""" * return SCIPcolGetLb(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_11getLb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_10getLb[] = "gets lower bound of column"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_11getLb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLb (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_10getLb(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_10getLb(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLb", 0); /* "pyscipopt/scip.pyx":341 * def getLb(self): * """gets lower bound of column""" * return SCIPcolGetLb(self.scip_col) # <<<<<<<<<<<<<< * * def getUb(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPcolGetLb(__pyx_v_self->scip_col)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":339 * return SCIPcolGetPrimsol(self.scip_col) * * def getLb(self): # <<<<<<<<<<<<<< * """gets lower bound of column""" * return SCIPcolGetLb(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.getLb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":343 * return SCIPcolGetLb(self.scip_col) * * def getUb(self): # <<<<<<<<<<<<<< * """gets upper bound of column""" * return SCIPcolGetUb(self.scip_col) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_13getUb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_6Column_12getUb[] = "gets upper bound of column"; static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_13getUb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getUb (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_12getUb(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_12getUb(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getUb", 0); /* "pyscipopt/scip.pyx":345 * def getUb(self): * """gets upper bound of column""" * return SCIPcolGetUb(self.scip_col) # <<<<<<<<<<<<<< * * cdef class Row: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPcolGetUb(__pyx_v_self->scip_col)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":343 * return SCIPcolGetLb(self.scip_col) * * def getUb(self): # <<<<<<<<<<<<<< * """gets upper bound of column""" * return SCIPcolGetUb(self.scip_col) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.getUb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":300 * cdef SCIP_COL* scip_col * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_6Column_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_6Column_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_6Column_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_6Column_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_6Column_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_6Column_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_14__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_6Column_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_6Column_16__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Column *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_6Column_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Column *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Column.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":354 * * @staticmethod * cdef create(SCIP_ROW* sciprow): # <<<<<<<<<<<<<< * row = Row() * row.scip_row = sciprow */ static PyObject *__pyx_f_9pyscipopt_4scip_3Row_create(SCIP_ROW *__pyx_v_sciprow) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":355 * @staticmethod * cdef create(SCIP_ROW* sciprow): * row = Row() # <<<<<<<<<<<<<< * row.scip_row = sciprow * return row */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_row = ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":356 * cdef create(SCIP_ROW* sciprow): * row = Row() * row.scip_row = sciprow # <<<<<<<<<<<<<< * return row * */ __pyx_v_row->scip_row = __pyx_v_sciprow; /* "pyscipopt/scip.pyx":357 * row = Row() * row.scip_row = sciprow * return row # <<<<<<<<<<<<<< * * def getLhs(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_row)); __pyx_r = ((PyObject *)__pyx_v_row); goto __pyx_L0; /* "pyscipopt/scip.pyx":354 * * @staticmethod * cdef create(SCIP_ROW* sciprow): # <<<<<<<<<<<<<< * row = Row() * row.scip_row = sciprow */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":359 * return row * * def getLhs(self): # <<<<<<<<<<<<<< * """returns the left hand side of row""" * return SCIProwGetLhs(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_1getLhs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_getLhs[] = "returns the left hand side of row"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_1getLhs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLhs (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_getLhs(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_getLhs(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLhs", 0); /* "pyscipopt/scip.pyx":361 * def getLhs(self): * """returns the left hand side of row""" * return SCIProwGetLhs(self.scip_row) # <<<<<<<<<<<<<< * * def getRhs(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIProwGetLhs(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":359 * return row * * def getLhs(self): # <<<<<<<<<<<<<< * """returns the left hand side of row""" * return SCIProwGetLhs(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getLhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":363 * return SCIProwGetLhs(self.scip_row) * * def getRhs(self): # <<<<<<<<<<<<<< * """returns the right hand side of row""" * return SCIProwGetRhs(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_3getRhs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_2getRhs[] = "returns the right hand side of row"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_3getRhs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRhs (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_2getRhs(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_2getRhs(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRhs", 0); /* "pyscipopt/scip.pyx":365 * def getRhs(self): * """returns the right hand side of row""" * return SCIProwGetRhs(self.scip_row) # <<<<<<<<<<<<<< * * def getConstant(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIProwGetRhs(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":363 * return SCIProwGetLhs(self.scip_row) * * def getRhs(self): # <<<<<<<<<<<<<< * """returns the right hand side of row""" * return SCIProwGetRhs(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getRhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":367 * return SCIProwGetRhs(self.scip_row) * * def getConstant(self): # <<<<<<<<<<<<<< * """gets constant shift of row""" * return SCIProwGetConstant(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_5getConstant(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_4getConstant[] = "gets constant shift of row"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_5getConstant(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConstant (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_4getConstant(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_4getConstant(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConstant", 0); /* "pyscipopt/scip.pyx":369 * def getConstant(self): * """gets constant shift of row""" * return SCIProwGetConstant(self.scip_row) # <<<<<<<<<<<<<< * * def getLPPos(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIProwGetConstant(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":367 * return SCIProwGetRhs(self.scip_row) * * def getConstant(self): # <<<<<<<<<<<<<< * """gets constant shift of row""" * return SCIProwGetConstant(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getConstant", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":371 * return SCIProwGetConstant(self.scip_row) * * def getLPPos(self): # <<<<<<<<<<<<<< * """gets position of row in current LP, or -1 if it is not in LP""" * return SCIProwGetLPPos(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_7getLPPos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_6getLPPos[] = "gets position of row in current LP, or -1 if it is not in LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_7getLPPos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPPos (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_6getLPPos(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_6getLPPos(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPPos", 0); /* "pyscipopt/scip.pyx":373 * def getLPPos(self): * """gets position of row in current LP, or -1 if it is not in LP""" * return SCIProwGetLPPos(self.scip_row) # <<<<<<<<<<<<<< * * def getBasisStatus(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIProwGetLPPos(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":371 * return SCIProwGetConstant(self.scip_row) * * def getLPPos(self): # <<<<<<<<<<<<<< * """gets position of row in current LP, or -1 if it is not in LP""" * return SCIProwGetLPPos(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getLPPos", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":375 * return SCIProwGetLPPos(self.scip_row) * * def getBasisStatus(self): # <<<<<<<<<<<<<< * """gets the basis status of a row in the LP solution, Note: returns basis status `basic` for rows not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIProwGetBasisStatus(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_9getBasisStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_8getBasisStatus[] = "gets the basis status of a row in the LP solution, Note: returns basis status `basic` for rows not in the current SCIP LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_9getBasisStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBasisStatus (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_8getBasisStatus(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_8getBasisStatus(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { SCIP_BASESTAT __pyx_v_stat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBasisStatus", 0); /* "pyscipopt/scip.pyx":377 * def getBasisStatus(self): * """gets the basis status of a row in the LP solution, Note: returns basis status `basic` for rows not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIProwGetBasisStatus(self.scip_row) # <<<<<<<<<<<<<< * if stat == SCIP_BASESTAT_LOWER: * return "lower" */ __pyx_v_stat = SCIProwGetBasisStatus(__pyx_v_self->scip_row); /* "pyscipopt/scip.pyx":378 * """gets the basis status of a row in the LP solution, Note: returns basis status `basic` for rows not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIProwGetBasisStatus(self.scip_row) * if stat == SCIP_BASESTAT_LOWER: # <<<<<<<<<<<<<< * return "lower" * elif stat == SCIP_BASESTAT_BASIC: */ switch (__pyx_v_stat) { case SCIP_BASESTAT_LOWER: /* "pyscipopt/scip.pyx":379 * cdef SCIP_BASESTAT stat = SCIProwGetBasisStatus(self.scip_row) * if stat == SCIP_BASESTAT_LOWER: * return "lower" # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_BASIC: * return "basic" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_lower); __pyx_r = __pyx_n_u_lower; goto __pyx_L0; /* "pyscipopt/scip.pyx":378 * """gets the basis status of a row in the LP solution, Note: returns basis status `basic` for rows not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIProwGetBasisStatus(self.scip_row) * if stat == SCIP_BASESTAT_LOWER: # <<<<<<<<<<<<<< * return "lower" * elif stat == SCIP_BASESTAT_BASIC: */ break; case SCIP_BASESTAT_BASIC: /* "pyscipopt/scip.pyx":381 * return "lower" * elif stat == SCIP_BASESTAT_BASIC: * return "basic" # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_UPPER: * return "upper" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_basic); __pyx_r = __pyx_n_u_basic; goto __pyx_L0; /* "pyscipopt/scip.pyx":380 * if stat == SCIP_BASESTAT_LOWER: * return "lower" * elif stat == SCIP_BASESTAT_BASIC: # <<<<<<<<<<<<<< * return "basic" * elif stat == SCIP_BASESTAT_UPPER: */ break; case SCIP_BASESTAT_UPPER: /* "pyscipopt/scip.pyx":383 * return "basic" * elif stat == SCIP_BASESTAT_UPPER: * return "upper" # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_ZERO: * # this shouldn't happen! */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_upper); __pyx_r = __pyx_n_u_upper; goto __pyx_L0; /* "pyscipopt/scip.pyx":382 * elif stat == SCIP_BASESTAT_BASIC: * return "basic" * elif stat == SCIP_BASESTAT_UPPER: # <<<<<<<<<<<<<< * return "upper" * elif stat == SCIP_BASESTAT_ZERO: */ break; case SCIP_BASESTAT_ZERO: /* "pyscipopt/scip.pyx":386 * elif stat == SCIP_BASESTAT_ZERO: * # this shouldn't happen! * raise Exception('SCIP returned base status zero for a row!') # <<<<<<<<<<<<<< * else: * raise Exception('SCIP returned unknown base status!') */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 386, __pyx_L1_error) /* "pyscipopt/scip.pyx":384 * elif stat == SCIP_BASESTAT_UPPER: * return "upper" * elif stat == SCIP_BASESTAT_ZERO: # <<<<<<<<<<<<<< * # this shouldn't happen! * raise Exception('SCIP returned base status zero for a row!') */ break; default: /* "pyscipopt/scip.pyx":388 * raise Exception('SCIP returned base status zero for a row!') * else: * raise Exception('SCIP returned unknown base status!') # <<<<<<<<<<<<<< * * def isIntegral(self): */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 388, __pyx_L1_error) break; } /* "pyscipopt/scip.pyx":375 * return SCIProwGetLPPos(self.scip_row) * * def getBasisStatus(self): # <<<<<<<<<<<<<< * """gets the basis status of a row in the LP solution, Note: returns basis status `basic` for rows not in the current SCIP LP""" * cdef SCIP_BASESTAT stat = SCIProwGetBasisStatus(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getBasisStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":390 * raise Exception('SCIP returned unknown base status!') * * def isIntegral(self): # <<<<<<<<<<<<<< * """returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution """ * return SCIProwIsIntegral(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_11isIntegral(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_10isIntegral[] = "returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution "; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_11isIntegral(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isIntegral (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_10isIntegral(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_10isIntegral(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isIntegral", 0); /* "pyscipopt/scip.pyx":392 * def isIntegral(self): * """returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution """ * return SCIProwIsIntegral(self.scip_row) # <<<<<<<<<<<<<< * * def isModifiable(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIProwIsIntegral(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":390 * raise Exception('SCIP returned unknown base status!') * * def isIntegral(self): # <<<<<<<<<<<<<< * """returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution """ * return SCIProwIsIntegral(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.isIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":394 * return SCIProwIsIntegral(self.scip_row) * * def isModifiable(self): # <<<<<<<<<<<<<< * """returns TRUE iff row is modifiable during node processing (subject to column generation) """ * return SCIProwIsModifiable(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_13isModifiable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_12isModifiable[] = "returns TRUE iff row is modifiable during node processing (subject to column generation) "; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_13isModifiable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isModifiable (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_12isModifiable(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_12isModifiable(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isModifiable", 0); /* "pyscipopt/scip.pyx":396 * def isModifiable(self): * """returns TRUE iff row is modifiable during node processing (subject to column generation) """ * return SCIProwIsModifiable(self.scip_row) # <<<<<<<<<<<<<< * * def getNNonz(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIProwIsModifiable(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":394 * return SCIProwIsIntegral(self.scip_row) * * def isModifiable(self): # <<<<<<<<<<<<<< * """returns TRUE iff row is modifiable during node processing (subject to column generation) """ * return SCIProwIsModifiable(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.isModifiable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":398 * return SCIProwIsModifiable(self.scip_row) * * def getNNonz(self): # <<<<<<<<<<<<<< * """get number of nonzero entries in row vector""" * return SCIProwGetNNonz(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_15getNNonz(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_14getNNonz[] = "get number of nonzero entries in row vector"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_15getNNonz(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNNonz (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_14getNNonz(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_14getNNonz(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNNonz", 0); /* "pyscipopt/scip.pyx":400 * def getNNonz(self): * """get number of nonzero entries in row vector""" * return SCIProwGetNNonz(self.scip_row) # <<<<<<<<<<<<<< * * def getNLPNonz(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIProwGetNNonz(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":398 * return SCIProwIsModifiable(self.scip_row) * * def getNNonz(self): # <<<<<<<<<<<<<< * """get number of nonzero entries in row vector""" * return SCIProwGetNNonz(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getNNonz", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":402 * return SCIProwGetNNonz(self.scip_row) * * def getNLPNonz(self): # <<<<<<<<<<<<<< * """get number of nonzero entries in row vector that correspond to columns currently in the SCIP LP""" * return SCIProwGetNLPNonz(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_17getNLPNonz(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_16getNLPNonz[] = "get number of nonzero entries in row vector that correspond to columns currently in the SCIP LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_17getNLPNonz(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNLPNonz (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_16getNLPNonz(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_16getNLPNonz(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNLPNonz", 0); /* "pyscipopt/scip.pyx":404 * def getNLPNonz(self): * """get number of nonzero entries in row vector that correspond to columns currently in the SCIP LP""" * return SCIProwGetNLPNonz(self.scip_row) # <<<<<<<<<<<<<< * * def getCols(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIProwGetNLPNonz(__pyx_v_self->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":402 * return SCIProwGetNNonz(self.scip_row) * * def getNLPNonz(self): # <<<<<<<<<<<<<< * """get number of nonzero entries in row vector that correspond to columns currently in the SCIP LP""" * return SCIProwGetNLPNonz(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.getNLPNonz", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":406 * return SCIProwGetNLPNonz(self.scip_row) * * def getCols(self): # <<<<<<<<<<<<<< * """gets list with columns of nonzero entries""" * cdef SCIP_COL** cols = SCIProwGetCols(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_19getCols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_18getCols[] = "gets list with columns of nonzero entries"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_19getCols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_18getCols(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_18getCols(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { SCIP_COL **__pyx_v_cols; PyObject *__pyx_8genexpr9__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCols", 0); /* "pyscipopt/scip.pyx":408 * def getCols(self): * """gets list with columns of nonzero entries""" * cdef SCIP_COL** cols = SCIProwGetCols(self.scip_row) # <<<<<<<<<<<<<< * return [Column.create(cols[i]) for i in range(self.getNNonz())] * */ __pyx_v_cols = SCIProwGetCols(__pyx_v_self->scip_row); /* "pyscipopt/scip.pyx":409 * """gets list with columns of nonzero entries""" * cdef SCIP_COL** cols = SCIProwGetCols(self.scip_row) * return [Column.create(cols[i]) for i in range(self.getNNonz())] # <<<<<<<<<<<<<< * * def getVals(self): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNNonz); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 409, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 409, __pyx_L5_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 409, __pyx_L5_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 409, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_8genexpr9__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 409, __pyx_L5_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip_6Column_create((__pyx_v_cols[__pyx_t_7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 409, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_i); __pyx_8genexpr9__pyx_v_i = 0; goto __pyx_L8_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_i); __pyx_8genexpr9__pyx_v_i = 0; goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":406 * return SCIProwGetNLPNonz(self.scip_row) * * def getCols(self): # <<<<<<<<<<<<<< * """gets list with columns of nonzero entries""" * cdef SCIP_COL** cols = SCIProwGetCols(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Row.getCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":411 * return [Column.create(cols[i]) for i in range(self.getNNonz())] * * def getVals(self): # <<<<<<<<<<<<<< * """gets list with coefficients of nonzero entries""" * cdef SCIP_Real* vals = SCIProwGetVals(self.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_21getVals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_3Row_20getVals[] = "gets list with coefficients of nonzero entries"; static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_21getVals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVals (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_20getVals(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_20getVals(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { SCIP_Real *__pyx_v_vals; PyObject *__pyx_9genexpr10__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVals", 0); /* "pyscipopt/scip.pyx":413 * def getVals(self): * """gets list with coefficients of nonzero entries""" * cdef SCIP_Real* vals = SCIProwGetVals(self.scip_row) # <<<<<<<<<<<<<< * return [vals[i] for i in range(self.getNNonz())] * */ __pyx_v_vals = SCIProwGetVals(__pyx_v_self->scip_row); /* "pyscipopt/scip.pyx":414 * """gets list with coefficients of nonzero entries""" * cdef SCIP_Real* vals = SCIProwGetVals(self.scip_row) * return [vals[i] for i in range(self.getNNonz())] # <<<<<<<<<<<<<< * * cdef class Solution: */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNNonz); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 414, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 414, __pyx_L5_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 414, __pyx_L5_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 414, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_9genexpr10__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 414, __pyx_L5_error) __pyx_t_3 = PyFloat_FromDouble((__pyx_v_vals[__pyx_t_7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 414, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_i); __pyx_9genexpr10__pyx_v_i = 0; goto __pyx_L8_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_i); __pyx_9genexpr10__pyx_v_i = 0; goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":411 * return [Column.create(cols[i]) for i in range(self.getNNonz())] * * def getVals(self): # <<<<<<<<<<<<<< * """gets list with coefficients of nonzero entries""" * cdef SCIP_Real* vals = SCIProwGetVals(self.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Row.getVals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":351 * cdef SCIP_ROW* scip_row * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_3Row_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_3Row_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_3Row_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_3Row_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_3Row_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_3Row_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_22__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_3Row_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_3Row_24__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_3Row_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Row.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":423 * * @staticmethod * cdef create(SCIP_SOL* scip_sol): # <<<<<<<<<<<<<< * sol = Solution() * sol.sol = scip_sol */ static PyObject *__pyx_f_9pyscipopt_4scip_8Solution_create(SCIP_SOL *__pyx_v_scip_sol) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":424 * @staticmethod * cdef create(SCIP_SOL* scip_sol): * sol = Solution() # <<<<<<<<<<<<<< * sol.sol = scip_sol * return sol */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Solution)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":425 * cdef create(SCIP_SOL* scip_sol): * sol = Solution() * sol.sol = scip_sol # <<<<<<<<<<<<<< * return sol * */ __pyx_v_sol->sol = __pyx_v_scip_sol; /* "pyscipopt/scip.pyx":426 * sol = Solution() * sol.sol = scip_sol * return sol # <<<<<<<<<<<<<< * * cdef class Node: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_sol)); __pyx_r = ((PyObject *)__pyx_v_sol); goto __pyx_L0; /* "pyscipopt/scip.pyx":423 * * @staticmethod * cdef create(SCIP_SOL* scip_sol): # <<<<<<<<<<<<<< * sol = Solution() * sol.sol = scip_sol */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Solution.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sol); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":420 * cdef SCIP_SOL* sol * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Solution_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Solution_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Solution_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Solution_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Solution_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Solution_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Solution_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Solution_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Solution_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Solution_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Solution_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Solution_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.sol cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Solution_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Solution_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Solution___reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Solution___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.sol cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.sol cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.sol cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Solution.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.sol cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.sol cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Solution_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Solution_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Solution_2__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Solution_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.sol cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.sol cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.sol cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.sol cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Solution.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":435 * * @staticmethod * cdef create(SCIP_NODE* scipnode): # <<<<<<<<<<<<<< * node = Node() * node.scip_node = scipnode */ static PyObject *__pyx_f_9pyscipopt_4scip_4Node_create(SCIP_NODE *__pyx_v_scipnode) { struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":436 * @staticmethod * cdef create(SCIP_NODE* scipnode): * node = Node() # <<<<<<<<<<<<<< * node.scip_node = scipnode * return node */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":437 * cdef create(SCIP_NODE* scipnode): * node = Node() * node.scip_node = scipnode # <<<<<<<<<<<<<< * return node * */ __pyx_v_node->scip_node = __pyx_v_scipnode; /* "pyscipopt/scip.pyx":438 * node = Node() * node.scip_node = scipnode * return node # <<<<<<<<<<<<<< * * def getParent(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_v_node); goto __pyx_L0; /* "pyscipopt/scip.pyx":435 * * @staticmethod * cdef create(SCIP_NODE* scipnode): # <<<<<<<<<<<<<< * node = Node() * node.scip_node = scipnode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":440 * return node * * def getParent(self): # <<<<<<<<<<<<<< * """Retrieve parent node.""" * return Node.create(SCIPnodeGetParent(self.scip_node)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_1getParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_getParent[] = "Retrieve parent node."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_1getParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getParent (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_getParent(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_getParent(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getParent", 0); /* "pyscipopt/scip.pyx":442 * def getParent(self): * """Retrieve parent node.""" * return Node.create(SCIPnodeGetParent(self.scip_node)) # <<<<<<<<<<<<<< * * def getNumber(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(SCIPnodeGetParent(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":440 * return node * * def getParent(self): # <<<<<<<<<<<<<< * """Retrieve parent node.""" * return Node.create(SCIPnodeGetParent(self.scip_node)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getParent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":444 * return Node.create(SCIPnodeGetParent(self.scip_node)) * * def getNumber(self): # <<<<<<<<<<<<<< * """Retrieve number of node.""" * return SCIPnodeGetNumber(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_3getNumber(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_2getNumber[] = "Retrieve number of node."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_3getNumber(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNumber (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_2getNumber(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_2getNumber(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNumber", 0); /* "pyscipopt/scip.pyx":446 * def getNumber(self): * """Retrieve number of node.""" * return SCIPnodeGetNumber(self.scip_node) # <<<<<<<<<<<<<< * * def getDepth(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_Longint(SCIPnodeGetNumber(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":444 * return Node.create(SCIPnodeGetParent(self.scip_node)) * * def getNumber(self): # <<<<<<<<<<<<<< * """Retrieve number of node.""" * return SCIPnodeGetNumber(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getNumber", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":448 * return SCIPnodeGetNumber(self.scip_node) * * def getDepth(self): # <<<<<<<<<<<<<< * """Retrieve depth of node.""" * return SCIPnodeGetDepth(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_5getDepth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_4getDepth[] = "Retrieve depth of node."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_5getDepth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDepth (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_4getDepth(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_4getDepth(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDepth", 0); /* "pyscipopt/scip.pyx":450 * def getDepth(self): * """Retrieve depth of node.""" * return SCIPnodeGetDepth(self.scip_node) # <<<<<<<<<<<<<< * * def getType(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPnodeGetDepth(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":448 * return SCIPnodeGetNumber(self.scip_node) * * def getDepth(self): # <<<<<<<<<<<<<< * """Retrieve depth of node.""" * return SCIPnodeGetDepth(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getDepth", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":452 * return SCIPnodeGetDepth(self.scip_node) * * def getType(self): # <<<<<<<<<<<<<< * """Retrieve type of node.""" * return SCIPnodeGetType(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_7getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_6getType[] = "Retrieve type of node."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_7getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_6getType(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_6getType(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "pyscipopt/scip.pyx":454 * def getType(self): * """Retrieve type of node.""" * return SCIPnodeGetType(self.scip_node) # <<<<<<<<<<<<<< * * def getLowerbound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIPnodeGetType(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":452 * return SCIPnodeGetDepth(self.scip_node) * * def getType(self): # <<<<<<<<<<<<<< * """Retrieve type of node.""" * return SCIPnodeGetType(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":456 * return SCIPnodeGetType(self.scip_node) * * def getLowerbound(self): # <<<<<<<<<<<<<< * """Retrieve lower bound of node.""" * return SCIPnodeGetLowerbound(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_9getLowerbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_8getLowerbound[] = "Retrieve lower bound of node."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_9getLowerbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLowerbound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_8getLowerbound(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_8getLowerbound(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLowerbound", 0); /* "pyscipopt/scip.pyx":458 * def getLowerbound(self): * """Retrieve lower bound of node.""" * return SCIPnodeGetLowerbound(self.scip_node) # <<<<<<<<<<<<<< * * def getEstimate(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPnodeGetLowerbound(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":456 * return SCIPnodeGetType(self.scip_node) * * def getLowerbound(self): # <<<<<<<<<<<<<< * """Retrieve lower bound of node.""" * return SCIPnodeGetLowerbound(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getLowerbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":460 * return SCIPnodeGetLowerbound(self.scip_node) * * def getEstimate(self): # <<<<<<<<<<<<<< * """Retrieve the estimated value of the best feasible solution in subtree of the node""" * return SCIPnodeGetEstimate(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_11getEstimate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_10getEstimate[] = "Retrieve the estimated value of the best feasible solution in subtree of the node"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_11getEstimate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEstimate (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_10getEstimate(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_10getEstimate(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEstimate", 0); /* "pyscipopt/scip.pyx":462 * def getEstimate(self): * """Retrieve the estimated value of the best feasible solution in subtree of the node""" * return SCIPnodeGetEstimate(self.scip_node) # <<<<<<<<<<<<<< * * def getNAddedConss(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPnodeGetEstimate(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":460 * return SCIPnodeGetLowerbound(self.scip_node) * * def getEstimate(self): # <<<<<<<<<<<<<< * """Retrieve the estimated value of the best feasible solution in subtree of the node""" * return SCIPnodeGetEstimate(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":464 * return SCIPnodeGetEstimate(self.scip_node) * * def getNAddedConss(self): # <<<<<<<<<<<<<< * """Retrieve number of added constraints at this node""" * return SCIPnodeGetNAddedConss(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_13getNAddedConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_12getNAddedConss[] = "Retrieve number of added constraints at this node"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_13getNAddedConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNAddedConss (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_12getNAddedConss(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_12getNAddedConss(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNAddedConss", 0); /* "pyscipopt/scip.pyx":466 * def getNAddedConss(self): * """Retrieve number of added constraints at this node""" * return SCIPnodeGetNAddedConss(self.scip_node) # <<<<<<<<<<<<<< * * def isActive(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPnodeGetNAddedConss(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":464 * return SCIPnodeGetEstimate(self.scip_node) * * def getNAddedConss(self): # <<<<<<<<<<<<<< * """Retrieve number of added constraints at this node""" * return SCIPnodeGetNAddedConss(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getNAddedConss", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":468 * return SCIPnodeGetNAddedConss(self.scip_node) * * def isActive(self): # <<<<<<<<<<<<<< * """Is the node in the path to the current node?""" * return SCIPnodeIsActive(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_15isActive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_14isActive[] = "Is the node in the path to the current node?"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_15isActive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isActive (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_14isActive(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_14isActive(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isActive", 0); /* "pyscipopt/scip.pyx":470 * def isActive(self): * """Is the node in the path to the current node?""" * return SCIPnodeIsActive(self.scip_node) # <<<<<<<<<<<<<< * * def isPropagatedAgain(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPnodeIsActive(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":468 * return SCIPnodeGetNAddedConss(self.scip_node) * * def isActive(self): # <<<<<<<<<<<<<< * """Is the node in the path to the current node?""" * return SCIPnodeIsActive(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.isActive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":472 * return SCIPnodeIsActive(self.scip_node) * * def isPropagatedAgain(self): # <<<<<<<<<<<<<< * """Is the node marked to be propagated again?""" * return SCIPnodeIsPropagatedAgain(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_17isPropagatedAgain(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_16isPropagatedAgain[] = "Is the node marked to be propagated again?"; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_17isPropagatedAgain(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isPropagatedAgain (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_16isPropagatedAgain(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_16isPropagatedAgain(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isPropagatedAgain", 0); /* "pyscipopt/scip.pyx":474 * def isPropagatedAgain(self): * """Is the node marked to be propagated again?""" * return SCIPnodeIsPropagatedAgain(self.scip_node) # <<<<<<<<<<<<<< * * def getBranchInfos(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPnodeIsPropagatedAgain(__pyx_v_self->scip_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":472 * return SCIPnodeIsActive(self.scip_node) * * def isPropagatedAgain(self): # <<<<<<<<<<<<<< * """Is the node marked to be propagated again?""" * return SCIPnodeIsPropagatedAgain(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.isPropagatedAgain", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":476 * return SCIPnodeIsPropagatedAgain(self.scip_node) * * def getBranchInfos(self): # <<<<<<<<<<<<<< * """Get branching decision of the parent node.""" * domchg = SCIPnodeGetDomchg(self.scip_node) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_19getBranchInfos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_4Node_18getBranchInfos[] = "Get branching decision of the parent node."; static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_19getBranchInfos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBranchInfos (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_18getBranchInfos(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_18getBranchInfos(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { SCIP_DOMCHG *__pyx_v_domchg; int __pyx_v_nboundchgs; SCIP_BOUNDCHG *__pyx_v_boundchg; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBranchInfos", 0); /* "pyscipopt/scip.pyx":478 * def getBranchInfos(self): * """Get branching decision of the parent node.""" * domchg = SCIPnodeGetDomchg(self.scip_node) # <<<<<<<<<<<<<< * nboundchgs = SCIPdomchgGetNBoundchgs(domchg) * assert nboundchgs == 1 */ __pyx_v_domchg = SCIPnodeGetDomchg(__pyx_v_self->scip_node); /* "pyscipopt/scip.pyx":479 * """Get branching decision of the parent node.""" * domchg = SCIPnodeGetDomchg(self.scip_node) * nboundchgs = SCIPdomchgGetNBoundchgs(domchg) # <<<<<<<<<<<<<< * assert nboundchgs == 1 * boundchg = SCIPdomchgGetBoundchg(domchg, 0) */ __pyx_v_nboundchgs = SCIPdomchgGetNBoundchgs(__pyx_v_domchg); /* "pyscipopt/scip.pyx":480 * domchg = SCIPnodeGetDomchg(self.scip_node) * nboundchgs = SCIPdomchgGetNBoundchgs(domchg) * assert nboundchgs == 1 # <<<<<<<<<<<<<< * boundchg = SCIPdomchgGetBoundchg(domchg, 0) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_nboundchgs == 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 480, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":481 * nboundchgs = SCIPdomchgGetNBoundchgs(domchg) * assert nboundchgs == 1 * boundchg = SCIPdomchgGetBoundchg(domchg, 0) # <<<<<<<<<<<<<< * * result = [] */ __pyx_v_boundchg = SCIPdomchgGetBoundchg(__pyx_v_domchg, 0); /* "pyscipopt/scip.pyx":483 * boundchg = SCIPdomchgGetBoundchg(domchg, 0) * * result = [] # <<<<<<<<<<<<<< * result.append(SCIPboundchgGetNewbound(boundchg)) * result.append(Variable.create(SCIPboundchgGetVar(boundchg))) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":484 * * result = [] * result.append(SCIPboundchgGetNewbound(boundchg)) # <<<<<<<<<<<<<< * result.append(Variable.create(SCIPboundchgGetVar(boundchg))) * result.append(SCIPboundchgGetBoundchgtype(boundchg)) */ __pyx_t_1 = PyFloat_FromDouble(SCIPboundchgGetNewbound(__pyx_v_boundchg)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":485 * result = [] * result.append(SCIPboundchgGetNewbound(boundchg)) * result.append(Variable.create(SCIPboundchgGetVar(boundchg))) # <<<<<<<<<<<<<< * result.append(SCIPboundchgGetBoundchgtype(boundchg)) * result.append(SCIPboundchgGetBoundtype(boundchg)) */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create(SCIPboundchgGetVar(__pyx_v_boundchg)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":486 * result.append(SCIPboundchgGetNewbound(boundchg)) * result.append(Variable.create(SCIPboundchgGetVar(boundchg))) * result.append(SCIPboundchgGetBoundchgtype(boundchg)) # <<<<<<<<<<<<<< * result.append(SCIPboundchgGetBoundtype(boundchg)) * result.append(SCIPboundchgIsRedundant(boundchg)) */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_BOUNDCHGTYPE(SCIPboundchgGetBoundchgtype(__pyx_v_boundchg)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":487 * result.append(Variable.create(SCIPboundchgGetVar(boundchg))) * result.append(SCIPboundchgGetBoundchgtype(boundchg)) * result.append(SCIPboundchgGetBoundtype(boundchg)) # <<<<<<<<<<<<<< * result.append(SCIPboundchgIsRedundant(boundchg)) * return result */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_BOUNDTYPE(SCIPboundchgGetBoundtype(__pyx_v_boundchg)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":488 * result.append(SCIPboundchgGetBoundchgtype(boundchg)) * result.append(SCIPboundchgGetBoundtype(boundchg)) * result.append(SCIPboundchgIsRedundant(boundchg)) # <<<<<<<<<<<<<< * return result * */ __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPboundchgIsRedundant(__pyx_v_boundchg)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":489 * result.append(SCIPboundchgGetBoundtype(boundchg)) * result.append(SCIPboundchgIsRedundant(boundchg)) * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pyscipopt/scip.pyx":476 * return SCIPnodeIsPropagatedAgain(self.scip_node) * * def getBranchInfos(self): # <<<<<<<<<<<<<< * """Get branching decision of the parent node.""" * domchg = SCIPnodeGetDomchg(self.scip_node) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.getBranchInfos", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":432 * cdef SCIP_NODE* scip_node * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Node_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Node_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Node_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_4Node_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_4Node_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_4Node_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_20__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_4Node_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_4Node_22__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Node *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_4Node_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Node.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":499 * * @staticmethod * cdef create(SCIP_VAR* scipvar): # <<<<<<<<<<<<<< * var = Variable() * var.scip_var = scipvar */ static PyObject *__pyx_f_9pyscipopt_4scip_8Variable_create(SCIP_VAR *__pyx_v_scipvar) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":500 * @staticmethod * cdef create(SCIP_VAR* scipvar): * var = Variable() # <<<<<<<<<<<<<< * var.scip_var = scipvar * Expr.__init__(var, {Term(var) : 1.0}) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Variable)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":501 * cdef create(SCIP_VAR* scipvar): * var = Variable() * var.scip_var = scipvar # <<<<<<<<<<<<<< * Expr.__init__(var, {Term(var) : 1.0}) * return var */ __pyx_v_var->scip_var = __pyx_v_scipvar; /* "pyscipopt/scip.pyx":502 * var = Variable() * var.scip_var = scipvar * Expr.__init__(var, {Term(var) : 1.0}) # <<<<<<<<<<<<<< * return var * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Term); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_var)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_var)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_float_1_0) < 0) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_var), __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_var), __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_var)); __Pyx_GIVEREF(((PyObject *)__pyx_v_var)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_var)); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":503 * var.scip_var = scipvar * Expr.__init__(var, {Term(var) : 1.0}) * return var # <<<<<<<<<<<<<< * * property name: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_var)); __pyx_r = ((PyObject *)__pyx_v_var); goto __pyx_L0; /* "pyscipopt/scip.pyx":499 * * @staticmethod * cdef create(SCIP_VAR* scipvar): # <<<<<<<<<<<<<< * var = Variable() * var.scip_var = scipvar */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Variable.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":506 * * property name: * def __get__(self): # <<<<<<<<<<<<<< * cname = bytes( SCIPvarGetName(self.scip_var) ) * return cname.decode('utf-8') */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_v_cname = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pyscipopt/scip.pyx":507 * property name: * def __get__(self): * cname = bytes( SCIPvarGetName(self.scip_var) ) # <<<<<<<<<<<<<< * return cname.decode('utf-8') * */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPvarGetName(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cname = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":508 * def __get__(self): * cname = bytes( SCIPvarGetName(self.scip_var) ) * return cname.decode('utf-8') # <<<<<<<<<<<<<< * * def ptr(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_cname, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":506 * * property name: * def __get__(self): # <<<<<<<<<<<<<< * cname = bytes( SCIPvarGetName(self.scip_var) ) * return cname.decode('utf-8') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Variable.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":510 * return cname.decode('utf-8') * * def ptr(self): # <<<<<<<<<<<<<< * """ """ * return <size_t>(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_1ptr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_ptr[] = " "; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_1ptr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ptr (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_ptr(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_ptr(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ptr", 0); /* "pyscipopt/scip.pyx":512 * def ptr(self): * """ """ * return <size_t>(self.scip_var) # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t(((size_t)__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":510 * return cname.decode('utf-8') * * def ptr(self): # <<<<<<<<<<<<<< * """ """ * return <size_t>(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":514 * return <size_t>(self.scip_var) * * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_2__repr__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_2__repr__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pyscipopt/scip.pyx":515 * * def __repr__(self): * return self.name # <<<<<<<<<<<<<< * * def vtype(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":514 * return <size_t>(self.scip_var) * * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":517 * return self.name * * def vtype(self): # <<<<<<<<<<<<<< * """Retrieve the variables type (BINARY, INTEGER or CONTINUOUS)""" * vartype = SCIPvarGetType(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_5vtype(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_4vtype[] = "Retrieve the variables type (BINARY, INTEGER or CONTINUOUS)"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_5vtype(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("vtype (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_4vtype(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_4vtype(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { SCIP_VARTYPE __pyx_v_vartype; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("vtype", 0); /* "pyscipopt/scip.pyx":519 * def vtype(self): * """Retrieve the variables type (BINARY, INTEGER or CONTINUOUS)""" * vartype = SCIPvarGetType(self.scip_var) # <<<<<<<<<<<<<< * if vartype == SCIP_VARTYPE_BINARY: * return "BINARY" */ __pyx_v_vartype = SCIPvarGetType(__pyx_v_self->scip_var); /* "pyscipopt/scip.pyx":520 * """Retrieve the variables type (BINARY, INTEGER or CONTINUOUS)""" * vartype = SCIPvarGetType(self.scip_var) * if vartype == SCIP_VARTYPE_BINARY: # <<<<<<<<<<<<<< * return "BINARY" * elif vartype == SCIP_VARTYPE_INTEGER: */ switch (__pyx_v_vartype) { case SCIP_VARTYPE_BINARY: /* "pyscipopt/scip.pyx":521 * vartype = SCIPvarGetType(self.scip_var) * if vartype == SCIP_VARTYPE_BINARY: * return "BINARY" # <<<<<<<<<<<<<< * elif vartype == SCIP_VARTYPE_INTEGER: * return "INTEGER" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_BINARY); __pyx_r = __pyx_n_u_BINARY; goto __pyx_L0; /* "pyscipopt/scip.pyx":520 * """Retrieve the variables type (BINARY, INTEGER or CONTINUOUS)""" * vartype = SCIPvarGetType(self.scip_var) * if vartype == SCIP_VARTYPE_BINARY: # <<<<<<<<<<<<<< * return "BINARY" * elif vartype == SCIP_VARTYPE_INTEGER: */ break; case SCIP_VARTYPE_INTEGER: /* "pyscipopt/scip.pyx":523 * return "BINARY" * elif vartype == SCIP_VARTYPE_INTEGER: * return "INTEGER" # <<<<<<<<<<<<<< * elif vartype == SCIP_VARTYPE_CONTINUOUS or vartype == SCIP_VARTYPE_IMPLINT: * return "CONTINUOUS" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_INTEGER); __pyx_r = __pyx_n_u_INTEGER; goto __pyx_L0; /* "pyscipopt/scip.pyx":522 * if vartype == SCIP_VARTYPE_BINARY: * return "BINARY" * elif vartype == SCIP_VARTYPE_INTEGER: # <<<<<<<<<<<<<< * return "INTEGER" * elif vartype == SCIP_VARTYPE_CONTINUOUS or vartype == SCIP_VARTYPE_IMPLINT: */ break; case SCIP_VARTYPE_CONTINUOUS: /* "pyscipopt/scip.pyx":524 * elif vartype == SCIP_VARTYPE_INTEGER: * return "INTEGER" * elif vartype == SCIP_VARTYPE_CONTINUOUS or vartype == SCIP_VARTYPE_IMPLINT: # <<<<<<<<<<<<<< * return "CONTINUOUS" * */ case SCIP_VARTYPE_IMPLINT: /* "pyscipopt/scip.pyx":525 * return "INTEGER" * elif vartype == SCIP_VARTYPE_CONTINUOUS or vartype == SCIP_VARTYPE_IMPLINT: * return "CONTINUOUS" # <<<<<<<<<<<<<< * * def isOriginal(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_CONTINUOUS); __pyx_r = __pyx_n_u_CONTINUOUS; goto __pyx_L0; /* "pyscipopt/scip.pyx":524 * elif vartype == SCIP_VARTYPE_INTEGER: * return "INTEGER" * elif vartype == SCIP_VARTYPE_CONTINUOUS or vartype == SCIP_VARTYPE_IMPLINT: # <<<<<<<<<<<<<< * return "CONTINUOUS" * */ break; default: break; } /* "pyscipopt/scip.pyx":517 * return self.name * * def vtype(self): # <<<<<<<<<<<<<< * """Retrieve the variables type (BINARY, INTEGER or CONTINUOUS)""" * vartype = SCIPvarGetType(self.scip_var) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":527 * return "CONTINUOUS" * * def isOriginal(self): # <<<<<<<<<<<<<< * """Retrieve whether the variable belongs to the original problem""" * return SCIPvarIsOriginal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_7isOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_6isOriginal[] = "Retrieve whether the variable belongs to the original problem"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_7isOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isOriginal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_6isOriginal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_6isOriginal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isOriginal", 0); /* "pyscipopt/scip.pyx":529 * def isOriginal(self): * """Retrieve whether the variable belongs to the original problem""" * return SCIPvarIsOriginal(self.scip_var) # <<<<<<<<<<<<<< * * def isInLP(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPvarIsOriginal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":527 * return "CONTINUOUS" * * def isOriginal(self): # <<<<<<<<<<<<<< * """Retrieve whether the variable belongs to the original problem""" * return SCIPvarIsOriginal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.isOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":531 * return SCIPvarIsOriginal(self.scip_var) * * def isInLP(self): # <<<<<<<<<<<<<< * """Retrieve whether the variable is a COLUMN variable that is member of the current LP""" * return SCIPvarIsInLP(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_9isInLP(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_8isInLP[] = "Retrieve whether the variable is a COLUMN variable that is member of the current LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_9isInLP(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isInLP (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_8isInLP(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_8isInLP(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isInLP", 0); /* "pyscipopt/scip.pyx":533 * def isInLP(self): * """Retrieve whether the variable is a COLUMN variable that is member of the current LP""" * return SCIPvarIsInLP(self.scip_var) # <<<<<<<<<<<<<< * * def getIndex(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPvarIsInLP(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":531 * return SCIPvarIsOriginal(self.scip_var) * * def isInLP(self): # <<<<<<<<<<<<<< * """Retrieve whether the variable is a COLUMN variable that is member of the current LP""" * return SCIPvarIsInLP(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.isInLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":535 * return SCIPvarIsInLP(self.scip_var) * * def getIndex(self): # <<<<<<<<<<<<<< * return SCIPvarGetIndex(self.scip_var) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_11getIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_11getIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIndex (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_10getIndex(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_10getIndex(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIndex", 0); /* "pyscipopt/scip.pyx":536 * * def getIndex(self): * return SCIPvarGetIndex(self.scip_var) # <<<<<<<<<<<<<< * * def getCol(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPvarGetIndex(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":535 * return SCIPvarIsInLP(self.scip_var) * * def getIndex(self): # <<<<<<<<<<<<<< * return SCIPvarGetIndex(self.scip_var) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":538 * return SCIPvarGetIndex(self.scip_var) * * def getCol(self): # <<<<<<<<<<<<<< * """Retrieve column of COLUMN variable""" * cdef SCIP_COL* scip_col */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_13getCol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_12getCol[] = "Retrieve column of COLUMN variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_13getCol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_12getCol(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_12getCol(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { SCIP_COL *__pyx_v_scip_col; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCol", 0); /* "pyscipopt/scip.pyx":541 * """Retrieve column of COLUMN variable""" * cdef SCIP_COL* scip_col * scip_col = SCIPvarGetCol(self.scip_var) # <<<<<<<<<<<<<< * return Column.create(scip_col) * */ __pyx_v_scip_col = SCIPvarGetCol(__pyx_v_self->scip_var); /* "pyscipopt/scip.pyx":542 * cdef SCIP_COL* scip_col * scip_col = SCIPvarGetCol(self.scip_var) * return Column.create(scip_col) # <<<<<<<<<<<<<< * * def getLbOriginal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_6Column_create(__pyx_v_scip_col); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":538 * return SCIPvarGetIndex(self.scip_var) * * def getCol(self): # <<<<<<<<<<<<<< * """Retrieve column of COLUMN variable""" * cdef SCIP_COL* scip_col */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getCol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":544 * return Column.create(scip_col) * * def getLbOriginal(self): # <<<<<<<<<<<<<< * """Retrieve original lower bound of variable""" * return SCIPvarGetLbOriginal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_15getLbOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_14getLbOriginal[] = "Retrieve original lower bound of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_15getLbOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLbOriginal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_14getLbOriginal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_14getLbOriginal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLbOriginal", 0); /* "pyscipopt/scip.pyx":546 * def getLbOriginal(self): * """Retrieve original lower bound of variable""" * return SCIPvarGetLbOriginal(self.scip_var) # <<<<<<<<<<<<<< * * def getUbOriginal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetLbOriginal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":544 * return Column.create(scip_col) * * def getLbOriginal(self): # <<<<<<<<<<<<<< * """Retrieve original lower bound of variable""" * return SCIPvarGetLbOriginal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getLbOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":548 * return SCIPvarGetLbOriginal(self.scip_var) * * def getUbOriginal(self): # <<<<<<<<<<<<<< * """Retrieve original upper bound of variable""" * return SCIPvarGetUbOriginal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_17getUbOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_16getUbOriginal[] = "Retrieve original upper bound of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_17getUbOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getUbOriginal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_16getUbOriginal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_16getUbOriginal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getUbOriginal", 0); /* "pyscipopt/scip.pyx":550 * def getUbOriginal(self): * """Retrieve original upper bound of variable""" * return SCIPvarGetUbOriginal(self.scip_var) # <<<<<<<<<<<<<< * * def getLbGlobal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetUbOriginal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":548 * return SCIPvarGetLbOriginal(self.scip_var) * * def getUbOriginal(self): # <<<<<<<<<<<<<< * """Retrieve original upper bound of variable""" * return SCIPvarGetUbOriginal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getUbOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":552 * return SCIPvarGetUbOriginal(self.scip_var) * * def getLbGlobal(self): # <<<<<<<<<<<<<< * """Retrieve global lower bound of variable""" * return SCIPvarGetLbGlobal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_19getLbGlobal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_18getLbGlobal[] = "Retrieve global lower bound of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_19getLbGlobal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLbGlobal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_18getLbGlobal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_18getLbGlobal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLbGlobal", 0); /* "pyscipopt/scip.pyx":554 * def getLbGlobal(self): * """Retrieve global lower bound of variable""" * return SCIPvarGetLbGlobal(self.scip_var) # <<<<<<<<<<<<<< * * def getUbGlobal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetLbGlobal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":552 * return SCIPvarGetUbOriginal(self.scip_var) * * def getLbGlobal(self): # <<<<<<<<<<<<<< * """Retrieve global lower bound of variable""" * return SCIPvarGetLbGlobal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getLbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":556 * return SCIPvarGetLbGlobal(self.scip_var) * * def getUbGlobal(self): # <<<<<<<<<<<<<< * """Retrieve global upper bound of variable""" * return SCIPvarGetUbGlobal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_21getUbGlobal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_20getUbGlobal[] = "Retrieve global upper bound of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_21getUbGlobal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getUbGlobal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_20getUbGlobal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_20getUbGlobal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getUbGlobal", 0); /* "pyscipopt/scip.pyx":558 * def getUbGlobal(self): * """Retrieve global upper bound of variable""" * return SCIPvarGetUbGlobal(self.scip_var) # <<<<<<<<<<<<<< * * def getLbLocal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetUbGlobal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":556 * return SCIPvarGetLbGlobal(self.scip_var) * * def getUbGlobal(self): # <<<<<<<<<<<<<< * """Retrieve global upper bound of variable""" * return SCIPvarGetUbGlobal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getUbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":560 * return SCIPvarGetUbGlobal(self.scip_var) * * def getLbLocal(self): # <<<<<<<<<<<<<< * """Retrieve current lower bound of variable""" * return SCIPvarGetLbLocal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_23getLbLocal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_22getLbLocal[] = "Retrieve current lower bound of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_23getLbLocal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLbLocal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_22getLbLocal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_22getLbLocal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLbLocal", 0); /* "pyscipopt/scip.pyx":562 * def getLbLocal(self): * """Retrieve current lower bound of variable""" * return SCIPvarGetLbLocal(self.scip_var) # <<<<<<<<<<<<<< * * def getUbLocal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetLbLocal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":560 * return SCIPvarGetUbGlobal(self.scip_var) * * def getLbLocal(self): # <<<<<<<<<<<<<< * """Retrieve current lower bound of variable""" * return SCIPvarGetLbLocal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getLbLocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":564 * return SCIPvarGetLbLocal(self.scip_var) * * def getUbLocal(self): # <<<<<<<<<<<<<< * """Retrieve current upper bound of variable""" * return SCIPvarGetUbLocal(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_25getUbLocal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_24getUbLocal[] = "Retrieve current upper bound of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_25getUbLocal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getUbLocal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_24getUbLocal(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_24getUbLocal(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getUbLocal", 0); /* "pyscipopt/scip.pyx":566 * def getUbLocal(self): * """Retrieve current upper bound of variable""" * return SCIPvarGetUbLocal(self.scip_var) # <<<<<<<<<<<<<< * * def getObj(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetUbLocal(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":564 * return SCIPvarGetLbLocal(self.scip_var) * * def getUbLocal(self): # <<<<<<<<<<<<<< * """Retrieve current upper bound of variable""" * return SCIPvarGetUbLocal(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getUbLocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":568 * return SCIPvarGetUbLocal(self.scip_var) * * def getObj(self): # <<<<<<<<<<<<<< * """Retrieve current objective value of variable""" * return SCIPvarGetObj(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_27getObj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_26getObj[] = "Retrieve current objective value of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_27getObj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObj (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_26getObj(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_26getObj(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getObj", 0); /* "pyscipopt/scip.pyx":570 * def getObj(self): * """Retrieve current objective value of variable""" * return SCIPvarGetObj(self.scip_var) # <<<<<<<<<<<<<< * * def getLPSol(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetObj(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":568 * return SCIPvarGetUbLocal(self.scip_var) * * def getObj(self): # <<<<<<<<<<<<<< * """Retrieve current objective value of variable""" * return SCIPvarGetObj(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getObj", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":572 * return SCIPvarGetObj(self.scip_var) * * def getLPSol(self): # <<<<<<<<<<<<<< * """Retrieve the current LP solution value of variable""" * return SCIPvarGetLPSol(self.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_29getLPSol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_8Variable_28getLPSol[] = "Retrieve the current LP solution value of variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_29getLPSol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPSol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_28getLPSol(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_28getLPSol(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPSol", 0); /* "pyscipopt/scip.pyx":574 * def getLPSol(self): * """Retrieve the current LP solution value of variable""" * return SCIPvarGetLPSol(self.scip_var) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPvarGetLPSol(__pyx_v_self->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":572 * return SCIPvarGetObj(self.scip_var) * * def getLPSol(self): # <<<<<<<<<<<<<< * """Retrieve the current LP solution value of variable""" * return SCIPvarGetLPSol(self.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.getLPSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":496 * cdef SCIP_VAR* scip_var * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Variable_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Variable_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Variable_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_8Variable_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_8Variable_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_8Variable_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_30__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_8Variable_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_8Variable_32__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_8Variable_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Variable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":583 * * @staticmethod * cdef create(SCIP_CONS* scipcons): # <<<<<<<<<<<<<< * if scipcons == NULL: * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") */ static PyObject *__pyx_f_9pyscipopt_4scip_10Constraint_create(SCIP_CONS *__pyx_v_scipcons) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":584 * @staticmethod * cdef create(SCIP_CONS* scipcons): * if scipcons == NULL: # <<<<<<<<<<<<<< * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") * cons = Constraint() */ __pyx_t_1 = ((__pyx_v_scipcons == NULL) != 0); if (unlikely(__pyx_t_1)) { /* "pyscipopt/scip.pyx":585 * cdef create(SCIP_CONS* scipcons): * if scipcons == NULL: * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") # <<<<<<<<<<<<<< * cons = Constraint() * cons.scip_cons = scipcons */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 585, __pyx_L1_error) /* "pyscipopt/scip.pyx":584 * @staticmethod * cdef create(SCIP_CONS* scipcons): * if scipcons == NULL: # <<<<<<<<<<<<<< * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") * cons = Constraint() */ } /* "pyscipopt/scip.pyx":586 * if scipcons == NULL: * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") * cons = Constraint() # <<<<<<<<<<<<<< * cons.scip_cons = scipcons * return cons */ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Constraint)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":587 * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") * cons = Constraint() * cons.scip_cons = scipcons # <<<<<<<<<<<<<< * return cons * */ __pyx_v_cons->scip_cons = __pyx_v_scipcons; /* "pyscipopt/scip.pyx":588 * cons = Constraint() * cons.scip_cons = scipcons * return cons # <<<<<<<<<<<<<< * * property name: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_cons)); __pyx_r = ((PyObject *)__pyx_v_cons); goto __pyx_L0; /* "pyscipopt/scip.pyx":583 * * @staticmethod * cdef create(SCIP_CONS* scipcons): # <<<<<<<<<<<<<< * if scipcons == NULL: * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Constraint.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_cons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":591 * * property name: * def __get__(self): # <<<<<<<<<<<<<< * cname = bytes( SCIPconsGetName(self.scip_cons) ) * return cname.decode('utf-8') */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_4name___get__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_4name___get__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_v_cname = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pyscipopt/scip.pyx":592 * property name: * def __get__(self): * cname = bytes( SCIPconsGetName(self.scip_cons) ) # <<<<<<<<<<<<<< * return cname.decode('utf-8') * */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconsGetName(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cname = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":593 * def __get__(self): * cname = bytes( SCIPconsGetName(self.scip_cons) ) * return cname.decode('utf-8') # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_cname, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":591 * * property name: * def __get__(self): # <<<<<<<<<<<<<< * cname = bytes( SCIPconsGetName(self.scip_cons) ) * return cname.decode('utf-8') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Constraint.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":595 * return cname.decode('utf-8') * * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_1__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_1__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint___repr__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint___repr__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pyscipopt/scip.pyx":596 * * def __repr__(self): * return self.name # <<<<<<<<<<<<<< * * def isOriginal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":595 * return cname.decode('utf-8') * * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":598 * return self.name * * def isOriginal(self): # <<<<<<<<<<<<<< * """Retrieve whether the constraint belongs to the original problem""" * return SCIPconsIsOriginal(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_3isOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_2isOriginal[] = "Retrieve whether the constraint belongs to the original problem"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_3isOriginal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isOriginal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_2isOriginal(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_2isOriginal(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isOriginal", 0); /* "pyscipopt/scip.pyx":600 * def isOriginal(self): * """Retrieve whether the constraint belongs to the original problem""" * return SCIPconsIsOriginal(self.scip_cons) # <<<<<<<<<<<<<< * * def isInitial(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsOriginal(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":598 * return self.name * * def isOriginal(self): # <<<<<<<<<<<<<< * """Retrieve whether the constraint belongs to the original problem""" * return SCIPconsIsOriginal(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":602 * return SCIPconsIsOriginal(self.scip_cons) * * def isInitial(self): # <<<<<<<<<<<<<< * """Retrieve True if the relaxation of the constraint should be in the initial LP""" * return SCIPconsIsInitial(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_5isInitial(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_4isInitial[] = "Retrieve True if the relaxation of the constraint should be in the initial LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_5isInitial(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isInitial (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_4isInitial(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_4isInitial(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isInitial", 0); /* "pyscipopt/scip.pyx":604 * def isInitial(self): * """Retrieve True if the relaxation of the constraint should be in the initial LP""" * return SCIPconsIsInitial(self.scip_cons) # <<<<<<<<<<<<<< * * def isSeparated(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsInitial(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":602 * return SCIPconsIsOriginal(self.scip_cons) * * def isInitial(self): # <<<<<<<<<<<<<< * """Retrieve True if the relaxation of the constraint should be in the initial LP""" * return SCIPconsIsInitial(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isInitial", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":606 * return SCIPconsIsInitial(self.scip_cons) * * def isSeparated(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be separated during LP processing""" * return SCIPconsIsSeparated(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_7isSeparated(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_6isSeparated[] = "Retrieve True if constraint should be separated during LP processing"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_7isSeparated(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isSeparated (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_6isSeparated(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_6isSeparated(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isSeparated", 0); /* "pyscipopt/scip.pyx":608 * def isSeparated(self): * """Retrieve True if constraint should be separated during LP processing""" * return SCIPconsIsSeparated(self.scip_cons) # <<<<<<<<<<<<<< * * def isEnforced(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsSeparated(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":606 * return SCIPconsIsInitial(self.scip_cons) * * def isSeparated(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be separated during LP processing""" * return SCIPconsIsSeparated(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isSeparated", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":610 * return SCIPconsIsSeparated(self.scip_cons) * * def isEnforced(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be enforced during node processing""" * return SCIPconsIsEnforced(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_9isEnforced(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_8isEnforced[] = "Retrieve True if constraint should be enforced during node processing"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_9isEnforced(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isEnforced (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_8isEnforced(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_8isEnforced(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isEnforced", 0); /* "pyscipopt/scip.pyx":612 * def isEnforced(self): * """Retrieve True if constraint should be enforced during node processing""" * return SCIPconsIsEnforced(self.scip_cons) # <<<<<<<<<<<<<< * * def isChecked(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsEnforced(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":610 * return SCIPconsIsSeparated(self.scip_cons) * * def isEnforced(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be enforced during node processing""" * return SCIPconsIsEnforced(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isEnforced", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":614 * return SCIPconsIsEnforced(self.scip_cons) * * def isChecked(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be checked for feasibility""" * return SCIPconsIsChecked(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_11isChecked(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_10isChecked[] = "Retrieve True if constraint should be checked for feasibility"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_11isChecked(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isChecked (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_10isChecked(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_10isChecked(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isChecked", 0); /* "pyscipopt/scip.pyx":616 * def isChecked(self): * """Retrieve True if constraint should be checked for feasibility""" * return SCIPconsIsChecked(self.scip_cons) # <<<<<<<<<<<<<< * * def isPropagated(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsChecked(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":614 * return SCIPconsIsEnforced(self.scip_cons) * * def isChecked(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be checked for feasibility""" * return SCIPconsIsChecked(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isChecked", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":618 * return SCIPconsIsChecked(self.scip_cons) * * def isPropagated(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be propagated during node processing""" * return SCIPconsIsPropagated(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_13isPropagated(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_12isPropagated[] = "Retrieve True if constraint should be propagated during node processing"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_13isPropagated(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isPropagated (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_12isPropagated(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_12isPropagated(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isPropagated", 0); /* "pyscipopt/scip.pyx":620 * def isPropagated(self): * """Retrieve True if constraint should be propagated during node processing""" * return SCIPconsIsPropagated(self.scip_cons) # <<<<<<<<<<<<<< * * def isLocal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsPropagated(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":618 * return SCIPconsIsChecked(self.scip_cons) * * def isPropagated(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint should be propagated during node processing""" * return SCIPconsIsPropagated(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isPropagated", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":622 * return SCIPconsIsPropagated(self.scip_cons) * * def isLocal(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is only locally valid or not added to any (sub)problem""" * return SCIPconsIsLocal(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_15isLocal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_14isLocal[] = "Retrieve True if constraint is only locally valid or not added to any (sub)problem"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_15isLocal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isLocal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_14isLocal(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_14isLocal(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isLocal", 0); /* "pyscipopt/scip.pyx":624 * def isLocal(self): * """Retrieve True if constraint is only locally valid or not added to any (sub)problem""" * return SCIPconsIsLocal(self.scip_cons) # <<<<<<<<<<<<<< * * def isModifiable(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsLocal(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":622 * return SCIPconsIsPropagated(self.scip_cons) * * def isLocal(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is only locally valid or not added to any (sub)problem""" * return SCIPconsIsLocal(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isLocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":626 * return SCIPconsIsLocal(self.scip_cons) * * def isModifiable(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is modifiable (subject to column generation)""" * return SCIPconsIsModifiable(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_17isModifiable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_16isModifiable[] = "Retrieve True if constraint is modifiable (subject to column generation)"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_17isModifiable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isModifiable (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_16isModifiable(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_16isModifiable(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isModifiable", 0); /* "pyscipopt/scip.pyx":628 * def isModifiable(self): * """Retrieve True if constraint is modifiable (subject to column generation)""" * return SCIPconsIsModifiable(self.scip_cons) # <<<<<<<<<<<<<< * * def isDynamic(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsModifiable(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":626 * return SCIPconsIsLocal(self.scip_cons) * * def isModifiable(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is modifiable (subject to column generation)""" * return SCIPconsIsModifiable(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isModifiable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":630 * return SCIPconsIsModifiable(self.scip_cons) * * def isDynamic(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is subject to aging""" * return SCIPconsIsDynamic(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_19isDynamic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_18isDynamic[] = "Retrieve True if constraint is subject to aging"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_19isDynamic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isDynamic (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_18isDynamic(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_18isDynamic(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isDynamic", 0); /* "pyscipopt/scip.pyx":632 * def isDynamic(self): * """Retrieve True if constraint is subject to aging""" * return SCIPconsIsDynamic(self.scip_cons) # <<<<<<<<<<<<<< * * def isRemovable(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsDynamic(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":630 * return SCIPconsIsModifiable(self.scip_cons) * * def isDynamic(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is subject to aging""" * return SCIPconsIsDynamic(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isDynamic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":634 * return SCIPconsIsDynamic(self.scip_cons) * * def isRemovable(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint's relaxation should be removed from the LP due to aging or cleanup""" * return SCIPconsIsRemovable(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_21isRemovable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_20isRemovable[] = "Retrieve True if constraint's relaxation should be removed from the LP due to aging or cleanup"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_21isRemovable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isRemovable (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_20isRemovable(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_20isRemovable(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isRemovable", 0); /* "pyscipopt/scip.pyx":636 * def isRemovable(self): * """Retrieve True if constraint's relaxation should be removed from the LP due to aging or cleanup""" * return SCIPconsIsRemovable(self.scip_cons) # <<<<<<<<<<<<<< * * def isStickingAtNode(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsRemovable(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":634 * return SCIPconsIsDynamic(self.scip_cons) * * def isRemovable(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint's relaxation should be removed from the LP due to aging or cleanup""" * return SCIPconsIsRemovable(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isRemovable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":638 * return SCIPconsIsRemovable(self.scip_cons) * * def isStickingAtNode(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is only locally valid or not added to any (sub)problem""" * return SCIPconsIsStickingAtNode(self.scip_cons) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_23isStickingAtNode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_22isStickingAtNode[] = "Retrieve True if constraint is only locally valid or not added to any (sub)problem"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_23isStickingAtNode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isStickingAtNode (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_22isStickingAtNode(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_22isStickingAtNode(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isStickingAtNode", 0); /* "pyscipopt/scip.pyx":640 * def isStickingAtNode(self): * """Retrieve True if constraint is only locally valid or not added to any (sub)problem""" * return SCIPconsIsStickingAtNode(self.scip_cons) # <<<<<<<<<<<<<< * * def isLinear(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPconsIsStickingAtNode(__pyx_v_self->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":638 * return SCIPconsIsRemovable(self.scip_cons) * * def isStickingAtNode(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is only locally valid or not added to any (sub)problem""" * return SCIPconsIsStickingAtNode(self.scip_cons) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isStickingAtNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":642 * return SCIPconsIsStickingAtNode(self.scip_cons) * * def isLinear(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is linear""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_25isLinear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_24isLinear[] = "Retrieve True if constraint is linear"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_25isLinear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isLinear (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_24isLinear(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_24isLinear(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isLinear", 0); /* "pyscipopt/scip.pyx":644 * def isLinear(self): * """Retrieve True if constraint is linear""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * return constype == 'linear' * */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_self->scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":645 * """Retrieve True if constraint is linear""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') * return constype == 'linear' # <<<<<<<<<<<<<< * * def isQuadratic(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_RichCompare(__pyx_v_constype, __pyx_n_u_linear, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 645, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":642 * return SCIPconsIsStickingAtNode(self.scip_cons) * * def isLinear(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is linear""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isLinear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":647 * return constype == 'linear' * * def isQuadratic(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is quadratic""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_27isQuadratic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_10Constraint_26isQuadratic[] = "Retrieve True if constraint is quadratic"; static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_27isQuadratic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isQuadratic (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_26isQuadratic(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_26isQuadratic(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isQuadratic", 0); /* "pyscipopt/scip.pyx":649 * def isQuadratic(self): * """Retrieve True if constraint is quadratic""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * return constype == 'quadratic' * */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_self->scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":650 * """Retrieve True if constraint is quadratic""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') * return constype == 'quadratic' # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_RichCompare(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 650, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":647 * return constype == 'linear' * * def isQuadratic(self): # <<<<<<<<<<<<<< * """Retrieve True if constraint is quadratic""" * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(self.scip_cons))).decode('UTF-8') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Constraint.isQuadratic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":580 * cdef SCIP_CONS* scip_cons * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * * @staticmethod */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Constraint_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Constraint_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Constraint_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_10Constraint_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_10Constraint_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_10Constraint_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_28__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_10Constraint_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_10Constraint_30__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_10Constraint_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Constraint.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":653 * * * cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg): # <<<<<<<<<<<<<< * sys.stdout.write(msg.decode('UTF-8')) * */ static void __pyx_f_9pyscipopt_4scip_relayMessage(CYTHON_UNUSED SCIP_MESSAGEHDLR *__pyx_v_messagehdlr, CYTHON_UNUSED FILE *__pyx_v_file, char const *__pyx_v_msg) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("relayMessage", 0); /* "pyscipopt/scip.pyx":654 * * cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg): * sys.stdout.write(msg.decode('UTF-8')) # <<<<<<<<<<<<<< * * cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":653 * * * cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg): # <<<<<<<<<<<<<< * sys.stdout.write(msg.decode('UTF-8')) * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.relayMessage", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pyscipopt/scip.pyx":656 * sys.stdout.write(msg.decode('UTF-8')) * * cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): # <<<<<<<<<<<<<< * sys.stderr.write(msg.decode('UTF-8')) * */ static void __pyx_f_9pyscipopt_4scip_relayErrorMessage(CYTHON_UNUSED void *__pyx_v_messagehdlr, CYTHON_UNUSED FILE *__pyx_v_file, char const *__pyx_v_msg) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("relayErrorMessage", 0); /* "pyscipopt/scip.pyx":657 * * cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): * sys.stderr.write(msg.decode('UTF-8')) # <<<<<<<<<<<<<< * * # - remove create(), includeDefaultPlugins(), createProbBasic() methods */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":656 * sys.stdout.write(msg.decode('UTF-8')) * * cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): # <<<<<<<<<<<<<< * sys.stderr.write(msg.decode('UTF-8')) * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.relayErrorMessage", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pyscipopt/scip.pyx":675 * cdef object __weakref__ * * def __init__(self, problemName='model', defaultPlugins=True, Model sourceModel=None, origcopy=False, globalcopy=True, enablepricing=False): # <<<<<<<<<<<<<< * """ * :param problemName: name of the problem (default 'model') */ /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Model_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model___init__[] = "\n :param problemName: name of the problem (default 'model')\n :param defaultPlugins: use default plugins? (default True)\n :param sourceModel: create a copy of the given Model instance (default None)\n :param origcopy: whether to call copy or copyOrig (default False)\n :param globalcopy: whether to create a global or a local copy (default True)\n :param enablepricing: whether to enable pricing in copy (default False)\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_9pyscipopt_4scip_5Model___init__; #endif static int __pyx_pw_9pyscipopt_4scip_5Model_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_problemName = 0; PyObject *__pyx_v_defaultPlugins = 0; struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_sourceModel = 0; PyObject *__pyx_v_origcopy = 0; PyObject *__pyx_v_globalcopy = 0; PyObject *__pyx_v_enablepricing = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_problemName,&__pyx_n_s_defaultPlugins,&__pyx_n_s_sourceModel,&__pyx_n_s_origcopy,&__pyx_n_s_globalcopy,&__pyx_n_s_enablepricing,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[0] = ((PyObject *)__pyx_n_u_model); values[1] = ((PyObject *)Py_True); values[2] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); values[3] = ((PyObject *)Py_False); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_problemName); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaultPlugins); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceModel); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origcopy); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalcopy); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enablepricing); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(3, 675, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_problemName = values[0]; __pyx_v_defaultPlugins = values[1]; __pyx_v_sourceModel = ((struct __pyx_obj_9pyscipopt_4scip_Model *)values[2]); __pyx_v_origcopy = values[3]; __pyx_v_globalcopy = values[4]; __pyx_v_enablepricing = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 675, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sourceModel), __pyx_ptype_9pyscipopt_4scip_Model, 1, "sourceModel", 0))) __PYX_ERR(3, 675, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model___init__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_problemName, __pyx_v_defaultPlugins, __pyx_v_sourceModel, __pyx_v_origcopy, __pyx_v_globalcopy, __pyx_v_enablepricing); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Model___init__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_problemName, PyObject *__pyx_v_defaultPlugins, struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_sourceModel, PyObject *__pyx_v_origcopy, PyObject *__pyx_v_globalcopy, PyObject *__pyx_v_enablepricing) { PyObject *__pyx_v_n = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; SCIP_Bool __pyx_t_15; char const *__pyx_t_16; SCIP_Bool __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pyscipopt/scip.pyx":684 * :param enablepricing: whether to enable pricing in copy (default False) * """ * if self.version() < MAJOR: # <<<<<<<<<<<<<< * raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR) * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_4)) { /* "pyscipopt/scip.pyx":685 * """ * if self.version() < MAJOR: * raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR) # <<<<<<<<<<<<<< * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MAJOR); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_linked_SCIP_is_not_compatible_to); __Pyx_GIVEREF(__pyx_kp_u_linked_SCIP_is_not_compatible_to); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_linked_SCIP_is_not_compatible_to); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 685, __pyx_L1_error) /* "pyscipopt/scip.pyx":684 * :param enablepricing: whether to enable pricing in copy (default False) * """ * if self.version() < MAJOR: # <<<<<<<<<<<<<< * raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR) * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: */ } /* "pyscipopt/scip.pyx":686 * if self.version() < MAJOR: * raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR) * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: # <<<<<<<<<<<<<< * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) * if sourceModel is None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_1, __pyx_float_10_0, 10.0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PATCH); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_5, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pyscipopt/scip.pyx":687 * raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR) * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) # <<<<<<<<<<<<<< * if sourceModel is None: * self.create() */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_linked_SCIP_is_not_recommended_f, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MAJOR); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_MINOR); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_PATCH); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 4+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 4+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_12 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_11, __pyx_t_9); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":686 * if self.version() < MAJOR: * raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR) * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: # <<<<<<<<<<<<<< * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) * if sourceModel is None: */ } /* "pyscipopt/scip.pyx":688 * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) * if sourceModel is None: # <<<<<<<<<<<<<< * self.create() * self._bestSol = None */ __pyx_t_4 = (((PyObject *)__pyx_v_sourceModel) == Py_None); __pyx_t_13 = (__pyx_t_4 != 0); if (__pyx_t_13) { /* "pyscipopt/scip.pyx":689 * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) * if sourceModel is None: * self.create() # <<<<<<<<<<<<<< * self._bestSol = None * if defaultPlugins: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":690 * if sourceModel is None: * self.create() * self._bestSol = None # <<<<<<<<<<<<<< * if defaultPlugins: * self.includeDefaultPlugins() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_bestSol); __Pyx_DECREF(((PyObject *)__pyx_v_self->_bestSol)); __pyx_v_self->_bestSol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); /* "pyscipopt/scip.pyx":691 * self.create() * self._bestSol = None * if defaultPlugins: # <<<<<<<<<<<<<< * self.includeDefaultPlugins() * self.createProbBasic(problemName) */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_defaultPlugins); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(3, 691, __pyx_L1_error) if (__pyx_t_13) { /* "pyscipopt/scip.pyx":692 * self._bestSol = None * if defaultPlugins: * self.includeDefaultPlugins() # <<<<<<<<<<<<<< * self.createProbBasic(problemName) * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_includeDefaultPlugins); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":691 * self.create() * self._bestSol = None * if defaultPlugins: # <<<<<<<<<<<<<< * self.includeDefaultPlugins() * self.createProbBasic(problemName) */ } /* "pyscipopt/scip.pyx":693 * if defaultPlugins: * self.includeDefaultPlugins() * self.createProbBasic(problemName) # <<<<<<<<<<<<<< * else: * self.create() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createProbBasic); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_problemName) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_problemName); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":688 * if self.version() < MAJOR + MINOR/10.0 + PATCH/100.0: * warnings.warn("linked SCIP {} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(self.version(), MAJOR, MINOR, PATCH)) * if sourceModel is None: # <<<<<<<<<<<<<< * self.create() * self._bestSol = None */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":695 * self.createProbBasic(problemName) * else: * self.create() # <<<<<<<<<<<<<< * self._bestSol = <Solution> sourceModel._bestSol * n = str_conversion(problemName) */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":696 * else: * self.create() * self._bestSol = <Solution> sourceModel._bestSol # <<<<<<<<<<<<<< * n = str_conversion(problemName) * if origcopy: */ __pyx_t_2 = ((PyObject *)__pyx_v_sourceModel->_bestSol); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_bestSol); __Pyx_DECREF(((PyObject *)__pyx_v_self->_bestSol)); __pyx_v_self->_bestSol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":697 * self.create() * self._bestSol = <Solution> sourceModel._bestSol * n = str_conversion(problemName) # <<<<<<<<<<<<<< * if origcopy: * PY_SCIP_CALL(SCIPcopyOrig(sourceModel._scip, self._scip, NULL, NULL, n, enablepricing, True, self._valid)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_problemName) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_problemName); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":698 * self._bestSol = <Solution> sourceModel._bestSol * n = str_conversion(problemName) * if origcopy: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcopyOrig(sourceModel._scip, self._scip, NULL, NULL, n, enablepricing, True, self._valid)) * else: */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_origcopy); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(3, 698, __pyx_L1_error) if (__pyx_t_13) { /* "pyscipopt/scip.pyx":699 * n = str_conversion(problemName) * if origcopy: * PY_SCIP_CALL(SCIPcopyOrig(sourceModel._scip, self._scip, NULL, NULL, n, enablepricing, True, self._valid)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPcopy(sourceModel._scip, self._scip, NULL, NULL, n, globalcopy, enablepricing, True, self._valid)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(3, 699, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_enablepricing); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 699, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcopyOrig(__pyx_v_sourceModel->_scip, __pyx_v_self->_scip, NULL, NULL, __pyx_t_14, __pyx_t_15, 1, __pyx_v_self->_valid)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":698 * self._bestSol = <Solution> sourceModel._bestSol * n = str_conversion(problemName) * if origcopy: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcopyOrig(sourceModel._scip, self._scip, NULL, NULL, n, enablepricing, True, self._valid)) * else: */ goto __pyx_L7; } /* "pyscipopt/scip.pyx":701 * PY_SCIP_CALL(SCIPcopyOrig(sourceModel._scip, self._scip, NULL, NULL, n, enablepricing, True, self._valid)) * else: * PY_SCIP_CALL(SCIPcopy(sourceModel._scip, self._scip, NULL, NULL, n, globalcopy, enablepricing, True, self._valid)) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(3, 701, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_globalcopy); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 701, __pyx_L1_error) __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_enablepricing); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 701, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcopy(__pyx_v_sourceModel->_scip, __pyx_v_self->_scip, NULL, NULL, __pyx_t_16, __pyx_t_15, __pyx_t_17, 1, __pyx_v_self->_valid)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L7:; } __pyx_L5:; /* "pyscipopt/scip.pyx":675 * cdef object __weakref__ * * def __init__(self, problemName='model', defaultPlugins=True, Model sourceModel=None, origcopy=False, globalcopy=True, enablepricing=False): # <<<<<<<<<<<<<< * """ * :param problemName: name of the problem (default 'model') */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pyscipopt.scip.Model.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":703 * PY_SCIP_CALL(SCIPcopy(sourceModel._scip, self._scip, NULL, NULL, n, globalcopy, enablepricing, True, self._valid)) * * def __dealloc__(self): # <<<<<<<<<<<<<< * # call C function directly, because we can no longer call this object's methods, according to * # http://docs.cython.org/src/reference/extension_types.html#finalization-dealloc */ /* Python wrapper */ static void __pyx_pw_9pyscipopt_4scip_5Model_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_9pyscipopt_4scip_5Model_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_9pyscipopt_4scip_5Model_2__dealloc__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_9pyscipopt_4scip_5Model_2__dealloc__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pyscipopt/scip.pyx":706 * # call C function directly, because we can no longer call this object's methods, according to * # http://docs.cython.org/src/reference/extension_types.html#finalization-dealloc * PY_SCIP_CALL( SCIPfree(&self._scip) ) # <<<<<<<<<<<<<< * * def create(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfree((&__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":703 * PY_SCIP_CALL(SCIPcopy(sourceModel._scip, self._scip, NULL, NULL, n, globalcopy, enablepricing, True, self._valid)) * * def __dealloc__(self): # <<<<<<<<<<<<<< * # call C function directly, because we can no longer call this object's methods, according to * # http://docs.cython.org/src/reference/extension_types.html#finalization-dealloc */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pyscipopt.scip.Model.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pyscipopt/scip.pyx":708 * PY_SCIP_CALL( SCIPfree(&self._scip) ) * * def create(self): # <<<<<<<<<<<<<< * """Create a new SCIP instance""" * PY_SCIP_CALL(SCIPcreate(&self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_5create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_4create[] = "Create a new SCIP instance"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_5create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_4create(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_4create(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "pyscipopt/scip.pyx":710 * def create(self): * """Create a new SCIP instance""" * PY_SCIP_CALL(SCIPcreate(&self._scip)) # <<<<<<<<<<<<<< * * def includeDefaultPlugins(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreate((&__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":708 * PY_SCIP_CALL( SCIPfree(&self._scip) ) * * def create(self): # <<<<<<<<<<<<<< * """Create a new SCIP instance""" * PY_SCIP_CALL(SCIPcreate(&self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":712 * PY_SCIP_CALL(SCIPcreate(&self._scip)) * * def includeDefaultPlugins(self): # <<<<<<<<<<<<<< * """Includes all default plug-ins into SCIP""" * PY_SCIP_CALL(SCIPincludeDefaultPlugins(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_7includeDefaultPlugins(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_6includeDefaultPlugins[] = "Includes all default plug-ins into SCIP"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_7includeDefaultPlugins(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeDefaultPlugins (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_6includeDefaultPlugins(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_6includeDefaultPlugins(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeDefaultPlugins", 0); /* "pyscipopt/scip.pyx":714 * def includeDefaultPlugins(self): * """Includes all default plug-ins into SCIP""" * PY_SCIP_CALL(SCIPincludeDefaultPlugins(self._scip)) # <<<<<<<<<<<<<< * * def createProbBasic(self, problemName='model'): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeDefaultPlugins(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":712 * PY_SCIP_CALL(SCIPcreate(&self._scip)) * * def includeDefaultPlugins(self): # <<<<<<<<<<<<<< * """Includes all default plug-ins into SCIP""" * PY_SCIP_CALL(SCIPincludeDefaultPlugins(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.includeDefaultPlugins", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":716 * PY_SCIP_CALL(SCIPincludeDefaultPlugins(self._scip)) * * def createProbBasic(self, problemName='model'): # <<<<<<<<<<<<<< * """Create new problem instance with given name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_9createProbBasic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_8createProbBasic[] = "Create new problem instance with given name\n\n :param problemName: name of model or problem (Default value = 'model')\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_9createProbBasic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_problemName = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createProbBasic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_problemName,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_n_u_model); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_problemName); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createProbBasic") < 0)) __PYX_ERR(3, 716, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_problemName = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("createProbBasic", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 716, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.createProbBasic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_8createProbBasic(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_problemName); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_8createProbBasic(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_problemName) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createProbBasic", 0); /* "pyscipopt/scip.pyx":722 * * """ * n = str_conversion(problemName) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateProbBasic(self._scip, n)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_problemName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_problemName); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":723 * """ * n = str_conversion(problemName) * PY_SCIP_CALL(SCIPcreateProbBasic(self._scip, n)) # <<<<<<<<<<<<<< * * def freeProb(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 723, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateProbBasic(__pyx_v_self->_scip, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":716 * PY_SCIP_CALL(SCIPincludeDefaultPlugins(self._scip)) * * def createProbBasic(self, problemName='model'): # <<<<<<<<<<<<<< * """Create new problem instance with given name * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.createProbBasic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":725 * PY_SCIP_CALL(SCIPcreateProbBasic(self._scip, n)) * * def freeProb(self): # <<<<<<<<<<<<<< * """Frees problem and solution process data""" * PY_SCIP_CALL(SCIPfreeProb(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_11freeProb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_10freeProb[] = "Frees problem and solution process data"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_11freeProb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freeProb (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_10freeProb(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_10freeProb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freeProb", 0); /* "pyscipopt/scip.pyx":727 * def freeProb(self): * """Frees problem and solution process data""" * PY_SCIP_CALL(SCIPfreeProb(self._scip)) # <<<<<<<<<<<<<< * * def freeTransform(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfreeProb(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":725 * PY_SCIP_CALL(SCIPcreateProbBasic(self._scip, n)) * * def freeProb(self): # <<<<<<<<<<<<<< * """Frees problem and solution process data""" * PY_SCIP_CALL(SCIPfreeProb(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.freeProb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":729 * PY_SCIP_CALL(SCIPfreeProb(self._scip)) * * def freeTransform(self): # <<<<<<<<<<<<<< * """Frees all solution process data including presolving and transformed problem, only original problem is kept""" * PY_SCIP_CALL(SCIPfreeTransform(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_13freeTransform(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_12freeTransform[] = "Frees all solution process data including presolving and transformed problem, only original problem is kept"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_13freeTransform(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freeTransform (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_12freeTransform(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_12freeTransform(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freeTransform", 0); /* "pyscipopt/scip.pyx":731 * def freeTransform(self): * """Frees all solution process data including presolving and transformed problem, only original problem is kept""" * PY_SCIP_CALL(SCIPfreeTransform(self._scip)) # <<<<<<<<<<<<<< * * def version(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfreeTransform(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":729 * PY_SCIP_CALL(SCIPfreeProb(self._scip)) * * def freeTransform(self): # <<<<<<<<<<<<<< * """Frees all solution process data including presolving and transformed problem, only original problem is kept""" * PY_SCIP_CALL(SCIPfreeTransform(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.freeTransform", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":733 * PY_SCIP_CALL(SCIPfreeTransform(self._scip)) * * def version(self): # <<<<<<<<<<<<<< * """Retrieve SCIP version""" * return SCIPversion() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_15version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_14version[] = "Retrieve SCIP version"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_15version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("version (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_14version(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_14version(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("version", 0); /* "pyscipopt/scip.pyx":735 * def version(self): * """Retrieve SCIP version""" * return SCIPversion() # <<<<<<<<<<<<<< * * def printVersion(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPversion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":733 * PY_SCIP_CALL(SCIPfreeTransform(self._scip)) * * def version(self): # <<<<<<<<<<<<<< * """Retrieve SCIP version""" * return SCIPversion() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.version", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":737 * return SCIPversion() * * def printVersion(self): # <<<<<<<<<<<<<< * """Print version, copyright information and compile mode""" * SCIPprintVersion(self._scip, NULL) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_17printVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_16printVersion[] = "Print version, copyright information and compile mode"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_17printVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printVersion (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_16printVersion(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_16printVersion(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printVersion", 0); /* "pyscipopt/scip.pyx":739 * def printVersion(self): * """Print version, copyright information and compile mode""" * SCIPprintVersion(self._scip, NULL) # <<<<<<<<<<<<<< * * def getProbName(self): */ SCIPprintVersion(__pyx_v_self->_scip, NULL); /* "pyscipopt/scip.pyx":737 * return SCIPversion() * * def printVersion(self): # <<<<<<<<<<<<<< * """Print version, copyright information and compile mode""" * SCIPprintVersion(self._scip, NULL) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":741 * SCIPprintVersion(self._scip, NULL) * * def getProbName(self): # <<<<<<<<<<<<<< * """Retrieve problem name""" * return bytes(SCIPgetProbName(self._scip)).decode('UTF-8') */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_19getProbName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_18getProbName[] = "Retrieve problem name"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_19getProbName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getProbName (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_18getProbName(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_18getProbName(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getProbName", 0); /* "pyscipopt/scip.pyx":743 * def getProbName(self): * """Retrieve problem name""" * return bytes(SCIPgetProbName(self._scip)).decode('UTF-8') # <<<<<<<<<<<<<< * * def getTotalTime(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPgetProbName(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":741 * SCIPprintVersion(self._scip, NULL) * * def getProbName(self): # <<<<<<<<<<<<<< * """Retrieve problem name""" * return bytes(SCIPgetProbName(self._scip)).decode('UTF-8') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getProbName", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":745 * return bytes(SCIPgetProbName(self._scip)).decode('UTF-8') * * def getTotalTime(self): # <<<<<<<<<<<<<< * """Retrieve the current total SCIP time in seconds, i.e. the total time since the SCIP instance has been created""" * return SCIPgetTotalTime(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_21getTotalTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_20getTotalTime[] = "Retrieve the current total SCIP time in seconds, i.e. the total time since the SCIP instance has been created"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_21getTotalTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTotalTime (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_20getTotalTime(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_20getTotalTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTotalTime", 0); /* "pyscipopt/scip.pyx":747 * def getTotalTime(self): * """Retrieve the current total SCIP time in seconds, i.e. the total time since the SCIP instance has been created""" * return SCIPgetTotalTime(self._scip) # <<<<<<<<<<<<<< * * def getSolvingTime(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetTotalTime(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":745 * return bytes(SCIPgetProbName(self._scip)).decode('UTF-8') * * def getTotalTime(self): # <<<<<<<<<<<<<< * """Retrieve the current total SCIP time in seconds, i.e. the total time since the SCIP instance has been created""" * return SCIPgetTotalTime(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getTotalTime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":749 * return SCIPgetTotalTime(self._scip) * * def getSolvingTime(self): # <<<<<<<<<<<<<< * """Retrieve the current solving time in seconds""" * return SCIPgetSolvingTime(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_23getSolvingTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_22getSolvingTime[] = "Retrieve the current solving time in seconds"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_23getSolvingTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSolvingTime (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_22getSolvingTime(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_22getSolvingTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolvingTime", 0); /* "pyscipopt/scip.pyx":751 * def getSolvingTime(self): * """Retrieve the current solving time in seconds""" * return SCIPgetSolvingTime(self._scip) # <<<<<<<<<<<<<< * * def getReadingTime(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetSolvingTime(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":749 * return SCIPgetTotalTime(self._scip) * * def getSolvingTime(self): # <<<<<<<<<<<<<< * """Retrieve the current solving time in seconds""" * return SCIPgetSolvingTime(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getSolvingTime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":753 * return SCIPgetSolvingTime(self._scip) * * def getReadingTime(self): # <<<<<<<<<<<<<< * """Retrieve the current reading time in seconds""" * return SCIPgetReadingTime(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_25getReadingTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_24getReadingTime[] = "Retrieve the current reading time in seconds"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_25getReadingTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getReadingTime (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_24getReadingTime(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_24getReadingTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getReadingTime", 0); /* "pyscipopt/scip.pyx":755 * def getReadingTime(self): * """Retrieve the current reading time in seconds""" * return SCIPgetReadingTime(self._scip) # <<<<<<<<<<<<<< * * def getPresolvingTime(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetReadingTime(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":753 * return SCIPgetSolvingTime(self._scip) * * def getReadingTime(self): # <<<<<<<<<<<<<< * """Retrieve the current reading time in seconds""" * return SCIPgetReadingTime(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getReadingTime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":757 * return SCIPgetReadingTime(self._scip) * * def getPresolvingTime(self): # <<<<<<<<<<<<<< * """Retrieve the curernt presolving time in seconds""" * return SCIPgetPresolvingTime(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_27getPresolvingTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_26getPresolvingTime[] = "Retrieve the curernt presolving time in seconds"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_27getPresolvingTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPresolvingTime (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_26getPresolvingTime(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_26getPresolvingTime(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPresolvingTime", 0); /* "pyscipopt/scip.pyx":759 * def getPresolvingTime(self): * """Retrieve the curernt presolving time in seconds""" * return SCIPgetPresolvingTime(self._scip) # <<<<<<<<<<<<<< * * def getNNodes(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetPresolvingTime(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":757 * return SCIPgetReadingTime(self._scip) * * def getPresolvingTime(self): # <<<<<<<<<<<<<< * """Retrieve the curernt presolving time in seconds""" * return SCIPgetPresolvingTime(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getPresolvingTime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":761 * return SCIPgetPresolvingTime(self._scip) * * def getNNodes(self): # <<<<<<<<<<<<<< * """Retrieve the total number of processed nodes.""" * return SCIPgetNNodes(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_29getNNodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_28getNNodes[] = "Retrieve the total number of processed nodes."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_29getNNodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNNodes (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_28getNNodes(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_28getNNodes(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNNodes", 0); /* "pyscipopt/scip.pyx":763 * def getNNodes(self): * """Retrieve the total number of processed nodes.""" * return SCIPgetNNodes(self._scip) # <<<<<<<<<<<<<< * * def getUpperbound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNodes(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":761 * return SCIPgetPresolvingTime(self._scip) * * def getNNodes(self): # <<<<<<<<<<<<<< * """Retrieve the total number of processed nodes.""" * return SCIPgetNNodes(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":765 * return SCIPgetNNodes(self._scip) * * def getUpperbound(self): # <<<<<<<<<<<<<< * """Retrieve the upper bound of the transformed problem.""" * return SCIPgetUpperbound(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_31getUpperbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_30getUpperbound[] = "Retrieve the upper bound of the transformed problem."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_31getUpperbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getUpperbound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_30getUpperbound(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_30getUpperbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getUpperbound", 0); /* "pyscipopt/scip.pyx":767 * def getUpperbound(self): * """Retrieve the upper bound of the transformed problem.""" * return SCIPgetUpperbound(self._scip) # <<<<<<<<<<<<<< * * def getLowerbound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetUpperbound(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":765 * return SCIPgetNNodes(self._scip) * * def getUpperbound(self): # <<<<<<<<<<<<<< * """Retrieve the upper bound of the transformed problem.""" * return SCIPgetUpperbound(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getUpperbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":769 * return SCIPgetUpperbound(self._scip) * * def getLowerbound(self): # <<<<<<<<<<<<<< * """Retrieve the lower bound of the transformed problem.""" * return SCIPgetLowerbound(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_33getLowerbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_32getLowerbound[] = "Retrieve the lower bound of the transformed problem."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_33getLowerbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLowerbound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_32getLowerbound(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_32getLowerbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLowerbound", 0); /* "pyscipopt/scip.pyx":771 * def getLowerbound(self): * """Retrieve the lower bound of the transformed problem.""" * return SCIPgetLowerbound(self._scip) # <<<<<<<<<<<<<< * * def getCurrentNode(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetLowerbound(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":769 * return SCIPgetUpperbound(self._scip) * * def getLowerbound(self): # <<<<<<<<<<<<<< * """Retrieve the lower bound of the transformed problem.""" * return SCIPgetLowerbound(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getLowerbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":773 * return SCIPgetLowerbound(self._scip) * * def getCurrentNode(self): # <<<<<<<<<<<<<< * """Retrieve current node.""" * return Node.create(SCIPgetCurrentNode(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_35getCurrentNode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_34getCurrentNode[] = "Retrieve current node."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_35getCurrentNode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCurrentNode (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_34getCurrentNode(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_34getCurrentNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCurrentNode", 0); /* "pyscipopt/scip.pyx":775 * def getCurrentNode(self): * """Retrieve current node.""" * return Node.create(SCIPgetCurrentNode(self._scip)) # <<<<<<<<<<<<<< * * def getNLPIterations(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(SCIPgetCurrentNode(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":773 * return SCIPgetLowerbound(self._scip) * * def getCurrentNode(self): # <<<<<<<<<<<<<< * """Retrieve current node.""" * return Node.create(SCIPgetCurrentNode(self._scip)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getCurrentNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":777 * return Node.create(SCIPgetCurrentNode(self._scip)) * * def getNLPIterations(self): # <<<<<<<<<<<<<< * """Retrieve current number of LP iterations.""" * return SCIPgetNLPIterations(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_37getNLPIterations(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_36getNLPIterations[] = "Retrieve current number of LP iterations."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_37getNLPIterations(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNLPIterations (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_36getNLPIterations(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_36getNLPIterations(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNLPIterations", 0); /* "pyscipopt/scip.pyx":779 * def getNLPIterations(self): * """Retrieve current number of LP iterations.""" * return SCIPgetNLPIterations(self._scip) # <<<<<<<<<<<<<< * * def getGap(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNLPIterations(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":777 * return Node.create(SCIPgetCurrentNode(self._scip)) * * def getNLPIterations(self): # <<<<<<<<<<<<<< * """Retrieve current number of LP iterations.""" * return SCIPgetNLPIterations(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNLPIterations", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":781 * return SCIPgetNLPIterations(self._scip) * * def getGap(self): # <<<<<<<<<<<<<< * """Retrieve the gap, i.e. |(primalbound - dualbound)/min(|primalbound|,|dualbound|)|.""" * return SCIPgetGap(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_39getGap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_38getGap[] = "Retrieve the gap, i.e. |(primalbound - dualbound)/min(|primalbound|,|dualbound|)|."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_39getGap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getGap (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_38getGap(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_38getGap(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getGap", 0); /* "pyscipopt/scip.pyx":783 * def getGap(self): * """Retrieve the gap, i.e. |(primalbound - dualbound)/min(|primalbound|,|dualbound|)|.""" * return SCIPgetGap(self._scip) # <<<<<<<<<<<<<< * * def getDepth(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetGap(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":781 * return SCIPgetNLPIterations(self._scip) * * def getGap(self): # <<<<<<<<<<<<<< * """Retrieve the gap, i.e. |(primalbound - dualbound)/min(|primalbound|,|dualbound|)|.""" * return SCIPgetGap(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getGap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":785 * return SCIPgetGap(self._scip) * * def getDepth(self): # <<<<<<<<<<<<<< * """Retrieve the depth of the current node""" * return SCIPgetDepth(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_41getDepth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_40getDepth[] = "Retrieve the depth of the current node"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_41getDepth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDepth (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_40getDepth(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_40getDepth(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDepth", 0); /* "pyscipopt/scip.pyx":787 * def getDepth(self): * """Retrieve the depth of the current node""" * return SCIPgetDepth(self._scip) # <<<<<<<<<<<<<< * * def infinity(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetDepth(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":785 * return SCIPgetGap(self._scip) * * def getDepth(self): # <<<<<<<<<<<<<< * """Retrieve the depth of the current node""" * return SCIPgetDepth(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getDepth", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":789 * return SCIPgetDepth(self._scip) * * def infinity(self): # <<<<<<<<<<<<<< * """Retrieve SCIP's infinity value""" * return SCIPinfinity(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_43infinity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_42infinity[] = "Retrieve SCIP's infinity value"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_43infinity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infinity (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_42infinity(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_42infinity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infinity", 0); /* "pyscipopt/scip.pyx":791 * def infinity(self): * """Retrieve SCIP's infinity value""" * return SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * * def epsilon(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":789 * return SCIPgetDepth(self._scip) * * def infinity(self): # <<<<<<<<<<<<<< * """Retrieve SCIP's infinity value""" * return SCIPinfinity(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.infinity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":793 * return SCIPinfinity(self._scip) * * def epsilon(self): # <<<<<<<<<<<<<< * """Retrieve epsilon for e.g. equality checks""" * return SCIPepsilon(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_45epsilon(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_44epsilon[] = "Retrieve epsilon for e.g. equality checks"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_45epsilon(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("epsilon (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_44epsilon(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_44epsilon(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("epsilon", 0); /* "pyscipopt/scip.pyx":795 * def epsilon(self): * """Retrieve epsilon for e.g. equality checks""" * return SCIPepsilon(self._scip) # <<<<<<<<<<<<<< * * def feastol(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPepsilon(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":793 * return SCIPinfinity(self._scip) * * def epsilon(self): # <<<<<<<<<<<<<< * """Retrieve epsilon for e.g. equality checks""" * return SCIPepsilon(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.epsilon", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":797 * return SCIPepsilon(self._scip) * * def feastol(self): # <<<<<<<<<<<<<< * """Retrieve feasibility tolerance""" * return SCIPfeastol(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_47feastol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_46feastol[] = "Retrieve feasibility tolerance"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_47feastol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("feastol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_46feastol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_46feastol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("feastol", 0); /* "pyscipopt/scip.pyx":799 * def feastol(self): * """Retrieve feasibility tolerance""" * return SCIPfeastol(self._scip) # <<<<<<<<<<<<<< * * def feasFrac(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPfeastol(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":797 * return SCIPepsilon(self._scip) * * def feastol(self): # <<<<<<<<<<<<<< * """Retrieve feasibility tolerance""" * return SCIPfeastol(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.feastol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":801 * return SCIPfeastol(self._scip) * * def feasFrac(self, value): # <<<<<<<<<<<<<< * """returns fractional part of value, i.e. x - floor(x) in feasible tolerance: x - floor(x+feastol)""" * return SCIPfeasFrac(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_49feasFrac(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_48feasFrac[] = "returns fractional part of value, i.e. x - floor(x) in feasible tolerance: x - floor(x+feastol)"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_49feasFrac(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("feasFrac (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_48feasFrac(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_48feasFrac(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("feasFrac", 0); /* "pyscipopt/scip.pyx":803 * def feasFrac(self, value): * """returns fractional part of value, i.e. x - floor(x) in feasible tolerance: x - floor(x+feastol)""" * return SCIPfeasFrac(self._scip, value) # <<<<<<<<<<<<<< * * def frac(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 803, __pyx_L1_error) __pyx_t_2 = PyFloat_FromDouble(SCIPfeasFrac(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":801 * return SCIPfeastol(self._scip) * * def feasFrac(self, value): # <<<<<<<<<<<<<< * """returns fractional part of value, i.e. x - floor(x) in feasible tolerance: x - floor(x+feastol)""" * return SCIPfeasFrac(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.feasFrac", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":805 * return SCIPfeasFrac(self._scip, value) * * def frac(self, value): # <<<<<<<<<<<<<< * """returns fractional part of value, i.e. x - floor(x) in epsilon tolerance: x - floor(x+eps)""" * return SCIPfrac(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_51frac(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_50frac[] = "returns fractional part of value, i.e. x - floor(x) in epsilon tolerance: x - floor(x+eps)"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_51frac(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("frac (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_50frac(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_50frac(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("frac", 0); /* "pyscipopt/scip.pyx":807 * def frac(self, value): * """returns fractional part of value, i.e. x - floor(x) in epsilon tolerance: x - floor(x+eps)""" * return SCIPfrac(self._scip, value) # <<<<<<<<<<<<<< * * def isZero(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 807, __pyx_L1_error) __pyx_t_2 = PyFloat_FromDouble(SCIPfrac(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":805 * return SCIPfeasFrac(self._scip, value) * * def frac(self, value): # <<<<<<<<<<<<<< * """returns fractional part of value, i.e. x - floor(x) in epsilon tolerance: x - floor(x+eps)""" * return SCIPfrac(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.frac", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":809 * return SCIPfrac(self._scip, value) * * def isZero(self, value): # <<<<<<<<<<<<<< * """returns whether abs(value) < eps""" * return SCIPisZero(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_53isZero(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_52isZero[] = "returns whether abs(value) < eps"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_53isZero(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isZero (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_52isZero(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_52isZero(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isZero", 0); /* "pyscipopt/scip.pyx":811 * def isZero(self, value): * """returns whether abs(value) < eps""" * return SCIPisZero(self._scip, value) # <<<<<<<<<<<<<< * * def isFeasZero(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 811, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPisZero(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":809 * return SCIPfrac(self._scip, value) * * def isZero(self, value): # <<<<<<<<<<<<<< * """returns whether abs(value) < eps""" * return SCIPisZero(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.isZero", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":813 * return SCIPisZero(self._scip, value) * * def isFeasZero(self, value): # <<<<<<<<<<<<<< * """returns whether abs(value) < feastol""" * return SCIPisFeasZero(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_55isFeasZero(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_54isFeasZero[] = "returns whether abs(value) < feastol"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_55isFeasZero(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isFeasZero (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_54isFeasZero(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_54isFeasZero(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isFeasZero", 0); /* "pyscipopt/scip.pyx":815 * def isFeasZero(self, value): * """returns whether abs(value) < feastol""" * return SCIPisFeasZero(self._scip, value) # <<<<<<<<<<<<<< * * def isInfinity(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 815, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPisFeasZero(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":813 * return SCIPisZero(self._scip, value) * * def isFeasZero(self, value): # <<<<<<<<<<<<<< * """returns whether abs(value) < feastol""" * return SCIPisFeasZero(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.isFeasZero", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":817 * return SCIPisFeasZero(self._scip, value) * * def isInfinity(self, value): # <<<<<<<<<<<<<< * """returns whether value is SCIP's infinity""" * return SCIPisInfinity(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_57isInfinity(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_56isInfinity[] = "returns whether value is SCIP's infinity"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_57isInfinity(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isInfinity (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_56isInfinity(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_56isInfinity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isInfinity", 0); /* "pyscipopt/scip.pyx":819 * def isInfinity(self, value): * """returns whether value is SCIP's infinity""" * return SCIPisInfinity(self._scip, value) # <<<<<<<<<<<<<< * * def isFeasNegative(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 819, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPisInfinity(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":817 * return SCIPisFeasZero(self._scip, value) * * def isInfinity(self, value): # <<<<<<<<<<<<<< * """returns whether value is SCIP's infinity""" * return SCIPisInfinity(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.isInfinity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":821 * return SCIPisInfinity(self._scip, value) * * def isFeasNegative(self, value): # <<<<<<<<<<<<<< * """returns whether value < -feastol""" * return SCIPisFeasNegative(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_59isFeasNegative(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_58isFeasNegative[] = "returns whether value < -feastol"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_59isFeasNegative(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isFeasNegative (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_58isFeasNegative(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_58isFeasNegative(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isFeasNegative", 0); /* "pyscipopt/scip.pyx":823 * def isFeasNegative(self, value): * """returns whether value < -feastol""" * return SCIPisFeasNegative(self._scip, value) # <<<<<<<<<<<<<< * * def isFeasIntegral(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 823, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPisFeasNegative(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":821 * return SCIPisInfinity(self._scip, value) * * def isFeasNegative(self, value): # <<<<<<<<<<<<<< * """returns whether value < -feastol""" * return SCIPisFeasNegative(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.isFeasNegative", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":825 * return SCIPisFeasNegative(self._scip, value) * * def isFeasIntegral(self, value): # <<<<<<<<<<<<<< * """returns whether value is integral""" * return SCIPisFeasIntegral(self._scip, value) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_61isFeasIntegral(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_60isFeasIntegral[] = "returns whether value is integral"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_61isFeasIntegral(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isFeasIntegral (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_60isFeasIntegral(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_60isFeasIntegral(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isFeasIntegral", 0); /* "pyscipopt/scip.pyx":827 * def isFeasIntegral(self, value): * """returns whether value is integral""" * return SCIPisFeasIntegral(self._scip, value) # <<<<<<<<<<<<<< * * def isLE(self, val1, val2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 827, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPisFeasIntegral(__pyx_v_self->_scip, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":825 * return SCIPisFeasNegative(self._scip, value) * * def isFeasIntegral(self, value): # <<<<<<<<<<<<<< * """returns whether value is integral""" * return SCIPisFeasIntegral(self._scip, value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.isFeasIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":829 * return SCIPisFeasIntegral(self._scip, value) * * def isLE(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 <= val2 + eps""" * return SCIPisLE(self._scip, val1, val2) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_63isLE(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_62isLE[] = "returns whether val1 <= val2 + eps"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_63isLE(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_val1 = 0; PyObject *__pyx_v_val2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isLE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val1,&__pyx_n_s_val2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("isLE", 1, 2, 2, 1); __PYX_ERR(3, 829, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isLE") < 0)) __PYX_ERR(3, 829, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_val1 = values[0]; __pyx_v_val2 = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isLE", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 829, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.isLE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_62isLE(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_val1, __pyx_v_val2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_62isLE(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isLE", 0); /* "pyscipopt/scip.pyx":831 * def isLE(self, val1, val2): * """returns whether val1 <= val2 + eps""" * return SCIPisLE(self._scip, val1, val2) # <<<<<<<<<<<<<< * * def isLT(self, val1, val2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_val1); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 831, __pyx_L1_error) __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_val2); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 831, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong(SCIPisLE(__pyx_v_self->_scip, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":829 * return SCIPisFeasIntegral(self._scip, value) * * def isLE(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 <= val2 + eps""" * return SCIPisLE(self._scip, val1, val2) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.isLE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":833 * return SCIPisLE(self._scip, val1, val2) * * def isLT(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 < val2 - eps""" * return SCIPisLT(self._scip, val1, val2) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_65isLT(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_64isLT[] = "returns whether val1 < val2 - eps"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_65isLT(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_val1 = 0; PyObject *__pyx_v_val2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isLT (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val1,&__pyx_n_s_val2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("isLT", 1, 2, 2, 1); __PYX_ERR(3, 833, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isLT") < 0)) __PYX_ERR(3, 833, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_val1 = values[0]; __pyx_v_val2 = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isLT", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 833, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.isLT", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_64isLT(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_val1, __pyx_v_val2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_64isLT(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isLT", 0); /* "pyscipopt/scip.pyx":835 * def isLT(self, val1, val2): * """returns whether val1 < val2 - eps""" * return SCIPisLT(self._scip, val1, val2) # <<<<<<<<<<<<<< * * def isGE(self, val1, val2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_val1); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 835, __pyx_L1_error) __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_val2); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 835, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong(SCIPisLT(__pyx_v_self->_scip, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":833 * return SCIPisLE(self._scip, val1, val2) * * def isLT(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 < val2 - eps""" * return SCIPisLT(self._scip, val1, val2) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.isLT", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":837 * return SCIPisLT(self._scip, val1, val2) * * def isGE(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 >= val2 - eps""" * return SCIPisGE(self._scip, val1, val2) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_67isGE(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_66isGE[] = "returns whether val1 >= val2 - eps"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_67isGE(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_val1 = 0; PyObject *__pyx_v_val2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isGE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val1,&__pyx_n_s_val2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("isGE", 1, 2, 2, 1); __PYX_ERR(3, 837, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isGE") < 0)) __PYX_ERR(3, 837, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_val1 = values[0]; __pyx_v_val2 = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isGE", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 837, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.isGE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_66isGE(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_val1, __pyx_v_val2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_66isGE(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isGE", 0); /* "pyscipopt/scip.pyx":839 * def isGE(self, val1, val2): * """returns whether val1 >= val2 - eps""" * return SCIPisGE(self._scip, val1, val2) # <<<<<<<<<<<<<< * * def isGT(self, val1, val2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_val1); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 839, __pyx_L1_error) __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_val2); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 839, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong(SCIPisGE(__pyx_v_self->_scip, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":837 * return SCIPisLT(self._scip, val1, val2) * * def isGE(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 >= val2 - eps""" * return SCIPisGE(self._scip, val1, val2) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.isGE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":841 * return SCIPisGE(self._scip, val1, val2) * * def isGT(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 > val2 + eps""" * return SCIPisGT(self._scip, val1, val2) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_69isGT(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_68isGT[] = "returns whether val1 > val2 + eps"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_69isGT(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_val1 = 0; PyObject *__pyx_v_val2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isGT (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val1,&__pyx_n_s_val2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("isGT", 1, 2, 2, 1); __PYX_ERR(3, 841, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isGT") < 0)) __PYX_ERR(3, 841, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_val1 = values[0]; __pyx_v_val2 = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isGT", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 841, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.isGT", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_68isGT(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_val1, __pyx_v_val2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_68isGT(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_val1, PyObject *__pyx_v_val2) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isGT", 0); /* "pyscipopt/scip.pyx":843 * def isGT(self, val1, val2): * """returns whether val1 > val2 + eps""" * return SCIPisGT(self._scip, val1, val2) # <<<<<<<<<<<<<< * * def getCondition(self, exact=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_val1); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 843, __pyx_L1_error) __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_val2); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 843, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong(SCIPisGT(__pyx_v_self->_scip, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":841 * return SCIPisGE(self._scip, val1, val2) * * def isGT(self, val1, val2): # <<<<<<<<<<<<<< * """returns whether val1 > val2 + eps""" * return SCIPisGT(self._scip, val1, val2) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.isGT", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":845 * return SCIPisGT(self._scip, val1, val2) * * def getCondition(self, exact=False): # <<<<<<<<<<<<<< * """Get the current LP's condition number * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_71getCondition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_70getCondition[] = "Get the current LP's condition number\n\n :param exact: whether to get an estimate or the exact value (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_71getCondition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exact = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCondition (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exact,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exact); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCondition") < 0)) __PYX_ERR(3, 845, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_exact = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getCondition", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 845, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getCondition", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_70getCondition(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_exact); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_70getCondition(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_exact) { SCIP_LPI *__pyx_v_lpi; SCIP_Real __pyx_v_quality; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCondition", 0); /* "pyscipopt/scip.pyx":852 * """ * cdef SCIP_LPI* lpi * PY_SCIP_CALL(SCIPgetLPI(self._scip, &lpi)) # <<<<<<<<<<<<<< * cdef SCIP_Real quality = 0 * if exact: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPI(__pyx_v_self->_scip, (&__pyx_v_lpi))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":853 * cdef SCIP_LPI* lpi * PY_SCIP_CALL(SCIPgetLPI(self._scip, &lpi)) * cdef SCIP_Real quality = 0 # <<<<<<<<<<<<<< * if exact: * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_EXACTCONDITION, &quality)) */ __pyx_v_quality = 0.0; /* "pyscipopt/scip.pyx":854 * PY_SCIP_CALL(SCIPgetLPI(self._scip, &lpi)) * cdef SCIP_Real quality = 0 * if exact: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_EXACTCONDITION, &quality)) * else: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_exact); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 854, __pyx_L1_error) if (__pyx_t_5) { /* "pyscipopt/scip.pyx":855 * cdef SCIP_Real quality = 0 * if exact: * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_EXACTCONDITION, &quality)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_ESTIMCONDITION, &quality)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetRealSolQuality(__pyx_v_lpi, SCIP_LPSOLQUALITY_EXACTCONDITION, (&__pyx_v_quality))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":854 * PY_SCIP_CALL(SCIPgetLPI(self._scip, &lpi)) * cdef SCIP_Real quality = 0 * if exact: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_EXACTCONDITION, &quality)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":857 * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_EXACTCONDITION, &quality)) * else: * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_ESTIMCONDITION, &quality)) # <<<<<<<<<<<<<< * * return quality */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPlpiGetRealSolQuality(__pyx_v_lpi, SCIP_LPSOLQUALITY_ESTIMCONDITION, (&__pyx_v_quality))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":859 * PY_SCIP_CALL(SCIPlpiGetRealSolQuality(lpi, SCIP_LPSOLQUALITY_ESTIMCONDITION, &quality)) * * return quality # <<<<<<<<<<<<<< * * # Objective function */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_quality); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":845 * return SCIPisGT(self._scip, val1, val2) * * def getCondition(self, exact=False): # <<<<<<<<<<<<<< * """Get the current LP's condition number * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getCondition", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":863 * # Objective function * * def setMinimize(self): # <<<<<<<<<<<<<< * """Set the objective sense to minimization.""" * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MINIMIZE)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_73setMinimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_72setMinimize[] = "Set the objective sense to minimization."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_73setMinimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMinimize (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_72setMinimize(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_72setMinimize(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMinimize", 0); /* "pyscipopt/scip.pyx":865 * def setMinimize(self): * """Set the objective sense to minimization.""" * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MINIMIZE)) # <<<<<<<<<<<<<< * * def setMaximize(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetObjsense(__pyx_v_self->_scip, SCIP_OBJSENSE_MINIMIZE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":863 * # Objective function * * def setMinimize(self): # <<<<<<<<<<<<<< * """Set the objective sense to minimization.""" * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MINIMIZE)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.setMinimize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":867 * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MINIMIZE)) * * def setMaximize(self): # <<<<<<<<<<<<<< * """Set the objective sense to maximization.""" * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MAXIMIZE)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_75setMaximize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_74setMaximize[] = "Set the objective sense to maximization."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_75setMaximize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMaximize (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_74setMaximize(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_74setMaximize(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMaximize", 0); /* "pyscipopt/scip.pyx":869 * def setMaximize(self): * """Set the objective sense to maximization.""" * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MAXIMIZE)) # <<<<<<<<<<<<<< * * def setObjlimit(self, objlimit): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetObjsense(__pyx_v_self->_scip, SCIP_OBJSENSE_MAXIMIZE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":867 * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MINIMIZE)) * * def setMaximize(self): # <<<<<<<<<<<<<< * """Set the objective sense to maximization.""" * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MAXIMIZE)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.setMaximize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":871 * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MAXIMIZE)) * * def setObjlimit(self, objlimit): # <<<<<<<<<<<<<< * """Set a limit on the objective function. * Only solutions with objective value better than this limit are accepted. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_77setObjlimit(PyObject *__pyx_v_self, PyObject *__pyx_v_objlimit); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_76setObjlimit[] = "Set a limit on the objective function.\n Only solutions with objective value better than this limit are accepted.\n\n :param objlimit: limit on the objective function\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_77setObjlimit(PyObject *__pyx_v_self, PyObject *__pyx_v_objlimit) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setObjlimit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_76setObjlimit(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_objlimit)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_76setObjlimit(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_objlimit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setObjlimit", 0); /* "pyscipopt/scip.pyx":878 * * """ * PY_SCIP_CALL(SCIPsetObjlimit(self._scip, objlimit)) # <<<<<<<<<<<<<< * * def getObjlimit(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_objlimit); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 878, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetObjlimit(__pyx_v_self->_scip, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":871 * PY_SCIP_CALL(SCIPsetObjsense(self._scip, SCIP_OBJSENSE_MAXIMIZE)) * * def setObjlimit(self, objlimit): # <<<<<<<<<<<<<< * """Set a limit on the objective function. * Only solutions with objective value better than this limit are accepted. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setObjlimit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":880 * PY_SCIP_CALL(SCIPsetObjlimit(self._scip, objlimit)) * * def getObjlimit(self): # <<<<<<<<<<<<<< * """returns current limit on objective function.""" * return SCIPgetObjlimit(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_79getObjlimit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_78getObjlimit[] = "returns current limit on objective function."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_79getObjlimit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObjlimit (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_78getObjlimit(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_78getObjlimit(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getObjlimit", 0); /* "pyscipopt/scip.pyx":882 * def getObjlimit(self): * """returns current limit on objective function.""" * return SCIPgetObjlimit(self._scip) # <<<<<<<<<<<<<< * * def setObjective(self, coeffs, sense = 'minimize', clear = 'true'): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetObjlimit(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":880 * PY_SCIP_CALL(SCIPsetObjlimit(self._scip, objlimit)) * * def getObjlimit(self): # <<<<<<<<<<<<<< * """returns current limit on objective function.""" * return SCIPgetObjlimit(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getObjlimit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":884 * return SCIPgetObjlimit(self._scip) * * def setObjective(self, coeffs, sense = 'minimize', clear = 'true'): # <<<<<<<<<<<<<< * """Establish the objective function as a linear expression. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_81setObjective(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_80setObjective[] = "Establish the objective function as a linear expression.\n\n :param coeffs: the coefficients\n :param sense: the objective sense (Default value = 'minimize')\n :param clear: set all other variables objective coefficient to zero (Default value = 'true')\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_81setObjective(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_coeffs = 0; PyObject *__pyx_v_sense = 0; PyObject *__pyx_v_clear = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setObjective (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coeffs,&__pyx_n_s_sense,&__pyx_n_s_clear,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)__pyx_n_u_minimize); values[2] = ((PyObject *)__pyx_n_u_true); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coeffs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sense); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clear); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setObjective") < 0)) __PYX_ERR(3, 884, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_coeffs = values[0]; __pyx_v_sense = values[1]; __pyx_v_clear = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setObjective", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 884, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setObjective", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_80setObjective(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_coeffs, __pyx_v_sense, __pyx_v_clear); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_80setObjective(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_coeffs, PyObject *__pyx_v_sense, PyObject *__pyx_v_clear) { SCIP_VAR **__pyx_v__vars; int __pyx_v__nvars; int __pyx_v_i; PyObject *__pyx_v_term = NULL; PyObject *__pyx_v_coef = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; SCIP_Real __pyx_t_13; PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setObjective", 0); __Pyx_INCREF(__pyx_v_coeffs); /* "pyscipopt/scip.pyx":896 * * # turn the constant value into an Expr instance for further processing * if not isinstance(coeffs, Expr): # <<<<<<<<<<<<<< * assert(_is_number(coeffs)), "given coefficients are neither Expr or number but %s" % coeffs.__class__.__name__ * coeffs = Expr() + coeffs */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_coeffs, __pyx_ptype_9pyscipopt_4scip_Expr); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":897 * # turn the constant value into an Expr instance for further processing * if not isinstance(coeffs, Expr): * assert(_is_number(coeffs)), "given coefficients are neither Expr or number but %s" % coeffs.__class__.__name__ # <<<<<<<<<<<<<< * coeffs = Expr() + coeffs * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_number); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_coeffs) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_coeffs); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_coeffs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_coefficients_are_neither_E, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 897, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":898 * if not isinstance(coeffs, Expr): * assert(_is_number(coeffs)), "given coefficients are neither Expr or number but %s" % coeffs.__class__.__name__ * coeffs = Expr() + coeffs # <<<<<<<<<<<<<< * * if coeffs.degree() > 1: */ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_coeffs); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_coeffs, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":896 * * # turn the constant value into an Expr instance for further processing * if not isinstance(coeffs, Expr): # <<<<<<<<<<<<<< * assert(_is_number(coeffs)), "given coefficients are neither Expr or number but %s" % coeffs.__class__.__name__ * coeffs = Expr() + coeffs */ } /* "pyscipopt/scip.pyx":900 * coeffs = Expr() + coeffs * * if coeffs.degree() > 1: # <<<<<<<<<<<<<< * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_coeffs, __pyx_n_s_degree); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":901 * * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") # <<<<<<<<<<<<<< * if coeffs[CONST] != 0.0: * self.addObjoffset(coeffs[CONST]) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 901, __pyx_L1_error) /* "pyscipopt/scip.pyx":900 * coeffs = Expr() + coeffs * * if coeffs.degree() > 1: # <<<<<<<<<<<<<< * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: */ } /* "pyscipopt/scip.pyx":902 * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: # <<<<<<<<<<<<<< * self.addObjoffset(coeffs[CONST]) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CONST); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_coeffs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyFloat_NeObjC(__pyx_t_4, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pyscipopt/scip.pyx":903 * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: * self.addObjoffset(coeffs[CONST]) # <<<<<<<<<<<<<< * * if clear: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addObjoffset); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CONST); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_coeffs, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":902 * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: # <<<<<<<<<<<<<< * self.addObjoffset(coeffs[CONST]) * */ } /* "pyscipopt/scip.pyx":905 * self.addObjoffset(coeffs[CONST]) * * if clear: # <<<<<<<<<<<<<< * # clear existing objective function * _vars = SCIPgetOrigVars(self._scip) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_clear); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 905, __pyx_L1_error) if (__pyx_t_2) { /* "pyscipopt/scip.pyx":907 * if clear: * # clear existing objective function * _vars = SCIPgetOrigVars(self._scip) # <<<<<<<<<<<<<< * _nvars = SCIPgetNOrigVars(self._scip) * for i in range(_nvars): */ __pyx_v__vars = SCIPgetOrigVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":908 * # clear existing objective function * _vars = SCIPgetOrigVars(self._scip) * _nvars = SCIPgetNOrigVars(self._scip) # <<<<<<<<<<<<<< * for i in range(_nvars): * PY_SCIP_CALL(SCIPchgVarObj(self._scip, _vars[i], 0.0)) */ __pyx_v__nvars = SCIPgetNOrigVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":909 * _vars = SCIPgetOrigVars(self._scip) * _nvars = SCIPgetNOrigVars(self._scip) * for i in range(_nvars): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarObj(self._scip, _vars[i], 0.0)) * */ __pyx_t_7 = __pyx_v__nvars; __pyx_t_8 = __pyx_t_7; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pyscipopt/scip.pyx":910 * _nvars = SCIPgetNOrigVars(self._scip) * for i in range(_nvars): * PY_SCIP_CALL(SCIPchgVarObj(self._scip, _vars[i], 0.0)) # <<<<<<<<<<<<<< * * for term, coef in coeffs.terms.items(): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarObj(__pyx_v_self->_scip, (__pyx_v__vars[__pyx_v_i]), 0.0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pyscipopt/scip.pyx":905 * self.addObjoffset(coeffs[CONST]) * * if clear: # <<<<<<<<<<<<<< * # clear existing objective function * _vars = SCIPgetOrigVars(self._scip) */ } /* "pyscipopt/scip.pyx":912 * PY_SCIP_CALL(SCIPchgVarObj(self._scip, _vars[i], 0.0)) * * for term, coef in coeffs.terms.items(): # <<<<<<<<<<<<<< * # avoid CONST term of Expr * if term != CONST: */ __pyx_t_10 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_coeffs, __pyx_n_s_terms); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(3, 912, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_4, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_10, &__pyx_t_6, &__pyx_t_4, NULL, __pyx_t_7); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(3, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":914 * for term, coef in coeffs.terms.items(): * # avoid CONST term of Expr * if term != CONST: # <<<<<<<<<<<<<< * assert len(term) == 1 * var = <Variable>term[0] */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CONST); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_v_term, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "pyscipopt/scip.pyx":915 * # avoid CONST term of Expr * if term != CONST: * assert len(term) == 1 # <<<<<<<<<<<<<< * var = <Variable>term[0] * PY_SCIP_CALL(SCIPchgVarObj(self._scip, var.scip_var, coef)) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_12 = PyObject_Length(__pyx_v_term); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 915, __pyx_L1_error) if (unlikely(!((__pyx_t_12 == 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 915, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":916 * if term != CONST: * assert len(term) == 1 * var = <Variable>term[0] # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarObj(self._scip, var.scip_var, coef)) * */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_term, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_4)); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":917 * assert len(term) == 1 * var = <Variable>term[0] * PY_SCIP_CALL(SCIPchgVarObj(self._scip, var.scip_var, coef)) # <<<<<<<<<<<<<< * * if sense == "minimize": */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_coef); if (unlikely((__pyx_t_13 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 917, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarObj(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_14, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":914 * for term, coef in coeffs.terms.items(): * # avoid CONST term of Expr * if term != CONST: # <<<<<<<<<<<<<< * assert len(term) == 1 * var = <Variable>term[0] */ } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":919 * PY_SCIP_CALL(SCIPchgVarObj(self._scip, var.scip_var, coef)) * * if sense == "minimize": # <<<<<<<<<<<<<< * self.setMinimize() * elif sense == "maximize": */ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_sense, __pyx_n_u_minimize, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 919, __pyx_L1_error) if (__pyx_t_2) { /* "pyscipopt/scip.pyx":920 * * if sense == "minimize": * self.setMinimize() # <<<<<<<<<<<<<< * elif sense == "maximize": * self.setMaximize() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setMinimize); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":919 * PY_SCIP_CALL(SCIPchgVarObj(self._scip, var.scip_var, coef)) * * if sense == "minimize": # <<<<<<<<<<<<<< * self.setMinimize() * elif sense == "maximize": */ goto __pyx_L12; } /* "pyscipopt/scip.pyx":921 * if sense == "minimize": * self.setMinimize() * elif sense == "maximize": # <<<<<<<<<<<<<< * self.setMaximize() * else: */ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_sense, __pyx_n_u_maximize, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 921, __pyx_L1_error) if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":922 * self.setMinimize() * elif sense == "maximize": * self.setMaximize() # <<<<<<<<<<<<<< * else: * raise Warning("unrecognized optimization sense: %s" % sense) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setMaximize); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":921 * if sense == "minimize": * self.setMinimize() * elif sense == "maximize": # <<<<<<<<<<<<<< * self.setMaximize() * else: */ goto __pyx_L12; } /* "pyscipopt/scip.pyx":924 * self.setMaximize() * else: * raise Warning("unrecognized optimization sense: %s" % sense) # <<<<<<<<<<<<<< * * def getObjective(self): */ /*else*/ { __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unrecognized_optimization_sense, __pyx_v_sense); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 924, __pyx_L1_error) } __pyx_L12:; /* "pyscipopt/scip.pyx":884 * return SCIPgetObjlimit(self._scip) * * def setObjective(self, coeffs, sense = 'minimize', clear = 'true'): # <<<<<<<<<<<<<< * """Establish the objective function as a linear expression. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("pyscipopt.scip.Model.setObjective", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_term); __Pyx_XDECREF(__pyx_v_coef); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XDECREF(__pyx_v_coeffs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":926 * raise Warning("unrecognized optimization sense: %s" % sense) * * def getObjective(self): # <<<<<<<<<<<<<< * """Retrieve objective function as Expr""" * variables = self.getVars() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_83getObjective(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_82getObjective[] = "Retrieve objective function as Expr"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_83getObjective(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObjective (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_82getObjective(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_82getObjective(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_v_variables = NULL; PyObject *__pyx_v_objective = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_coeff = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getObjective", 0); /* "pyscipopt/scip.pyx":928 * def getObjective(self): * """Retrieve objective function as Expr""" * variables = self.getVars() # <<<<<<<<<<<<<< * objective = Expr() * for var in variables: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getVars); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_variables = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":929 * """Retrieve objective function as Expr""" * variables = self.getVars() * objective = Expr() # <<<<<<<<<<<<<< * for var in variables: * coeff = var.getObj() */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_objective = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":930 * variables = self.getVars() * objective = Expr() * for var in variables: # <<<<<<<<<<<<<< * coeff = var.getObj() * if coeff != 0: */ if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { __pyx_t_1 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 930, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(3, 930, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(3, 930, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 930, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":931 * objective = Expr() * for var in variables: * coeff = var.getObj() # <<<<<<<<<<<<<< * if coeff != 0: * objective += coeff * var */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_getObj); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_coeff, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":932 * for var in variables: * coeff = var.getObj() * if coeff != 0: # <<<<<<<<<<<<<< * objective += coeff * var * objective.normalize() */ __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_v_coeff, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 932, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":933 * coeff = var.getObj() * if coeff != 0: * objective += coeff * var # <<<<<<<<<<<<<< * objective.normalize() * return objective */ __pyx_t_2 = PyNumber_Multiply(__pyx_v_coeff, __pyx_v_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_objective, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_objective, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":932 * for var in variables: * coeff = var.getObj() * if coeff != 0: # <<<<<<<<<<<<<< * objective += coeff * var * objective.normalize() */ } /* "pyscipopt/scip.pyx":930 * variables = self.getVars() * objective = Expr() * for var in variables: # <<<<<<<<<<<<<< * coeff = var.getObj() * if coeff != 0: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":934 * if coeff != 0: * objective += coeff * var * objective.normalize() # <<<<<<<<<<<<<< * return objective * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_objective, __pyx_n_s_normalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":935 * objective += coeff * var * objective.normalize() * return objective # <<<<<<<<<<<<<< * * def addObjoffset(self, offset, solutions = False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objective); __pyx_r = __pyx_v_objective; goto __pyx_L0; /* "pyscipopt/scip.pyx":926 * raise Warning("unrecognized optimization sense: %s" % sense) * * def getObjective(self): # <<<<<<<<<<<<<< * """Retrieve objective function as Expr""" * variables = self.getVars() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.getObjective", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_variables); __Pyx_XDECREF(__pyx_v_objective); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_coeff); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":937 * return objective * * def addObjoffset(self, offset, solutions = False): # <<<<<<<<<<<<<< * """Add constant offset to objective * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_85addObjoffset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_84addObjoffset[] = "Add constant offset to objective\n\n :param offset: offset to add\n :param solutions: add offset also to existing solutions (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_85addObjoffset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_solutions = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addObjoffset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_solutions,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solutions); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addObjoffset") < 0)) __PYX_ERR(3, 937, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = values[0]; __pyx_v_solutions = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addObjoffset", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 937, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addObjoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_84addObjoffset(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_offset, __pyx_v_solutions); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_84addObjoffset(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_solutions) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; SCIP_Real __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addObjoffset", 0); /* "pyscipopt/scip.pyx":944 * * """ * if solutions: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddObjoffset(self._scip, offset)) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_solutions); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 944, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":945 * """ * if solutions: * PY_SCIP_CALL(SCIPaddObjoffset(self._scip, offset)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPaddOrigObjoffset(self._scip, offset)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_offset); if (unlikely((__pyx_t_4 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 945, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddObjoffset(__pyx_v_self->_scip, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":944 * * """ * if solutions: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddObjoffset(self._scip, offset)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":947 * PY_SCIP_CALL(SCIPaddObjoffset(self._scip, offset)) * else: * PY_SCIP_CALL(SCIPaddOrigObjoffset(self._scip, offset)) # <<<<<<<<<<<<<< * * def getObjoffset(self, original = True): */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_offset); if (unlikely((__pyx_t_4 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 947, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddOrigObjoffset(__pyx_v_self->_scip, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":937 * return objective * * def addObjoffset(self, offset, solutions = False): # <<<<<<<<<<<<<< * """Add constant offset to objective * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.addObjoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":949 * PY_SCIP_CALL(SCIPaddOrigObjoffset(self._scip, offset)) * * def getObjoffset(self, original = True): # <<<<<<<<<<<<<< * """Retrieve constant objective offset * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_87getObjoffset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_86getObjoffset[] = "Retrieve constant objective offset\n\n :param original: offset of original or transformed problem (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_87getObjoffset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_original = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObjoffset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_original,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_original); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getObjoffset") < 0)) __PYX_ERR(3, 949, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_original = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getObjoffset", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 949, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getObjoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_86getObjoffset(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_original); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_86getObjoffset(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_original) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getObjoffset", 0); /* "pyscipopt/scip.pyx":955 * * """ * if original: # <<<<<<<<<<<<<< * return SCIPgetOrigObjoffset(self._scip) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_original); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 955, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":956 * """ * if original: * return SCIPgetOrigObjoffset(self._scip) # <<<<<<<<<<<<<< * else: * return SCIPgetTransObjoffset(self._scip) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(SCIPgetOrigObjoffset(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":955 * * """ * if original: # <<<<<<<<<<<<<< * return SCIPgetOrigObjoffset(self._scip) * else: */ } /* "pyscipopt/scip.pyx":958 * return SCIPgetOrigObjoffset(self._scip) * else: * return SCIPgetTransObjoffset(self._scip) # <<<<<<<<<<<<<< * * # Setting parameters */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(SCIPgetTransObjoffset(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pyscipopt/scip.pyx":949 * PY_SCIP_CALL(SCIPaddOrigObjoffset(self._scip, offset)) * * def getObjoffset(self, original = True): # <<<<<<<<<<<<<< * """Retrieve constant objective offset * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getObjoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":961 * * # Setting parameters * def setPresolve(self, setting): # <<<<<<<<<<<<<< * """Set presolving parameter settings. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_89setPresolve(PyObject *__pyx_v_self, PyObject *__pyx_v_setting); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_88setPresolve[] = "Set presolving parameter settings.\n\n :param setting: the parameter settings (SCIP_PARAMSETTING)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_89setPresolve(PyObject *__pyx_v_self, PyObject *__pyx_v_setting) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setPresolve (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_88setPresolve(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_setting)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_88setPresolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_setting) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_PARAMSETTING __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setPresolve", 0); /* "pyscipopt/scip.pyx":967 * * """ * PY_SCIP_CALL(SCIPsetPresolving(self._scip, setting, True)) # <<<<<<<<<<<<<< * * def setProbName(self, name): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = ((SCIP_PARAMSETTING)__Pyx_PyInt_As_SCIP_PARAMSETTING(__pyx_v_setting)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 967, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetPresolving(__pyx_v_self->_scip, __pyx_t_3, 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":961 * * # Setting parameters * def setPresolve(self, setting): # <<<<<<<<<<<<<< * """Set presolving parameter settings. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setPresolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":969 * PY_SCIP_CALL(SCIPsetPresolving(self._scip, setting, True)) * * def setProbName(self, name): # <<<<<<<<<<<<<< * """Set problem name""" * n = str_conversion(name) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_91setProbName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_90setProbName[] = "Set problem name"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_91setProbName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setProbName (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_90setProbName(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_90setProbName(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setProbName", 0); /* "pyscipopt/scip.pyx":971 * def setProbName(self, name): * """Set problem name""" * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetProbName(self._scip, n)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":972 * """Set problem name""" * n = str_conversion(name) * PY_SCIP_CALL(SCIPsetProbName(self._scip, n)) # <<<<<<<<<<<<<< * * def setSeparating(self, setting): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 972, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetProbName(__pyx_v_self->_scip, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":969 * PY_SCIP_CALL(SCIPsetPresolving(self._scip, setting, True)) * * def setProbName(self, name): # <<<<<<<<<<<<<< * """Set problem name""" * n = str_conversion(name) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setProbName", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":974 * PY_SCIP_CALL(SCIPsetProbName(self._scip, n)) * * def setSeparating(self, setting): # <<<<<<<<<<<<<< * """Set separating parameter settings. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_93setSeparating(PyObject *__pyx_v_self, PyObject *__pyx_v_setting); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_92setSeparating[] = "Set separating parameter settings.\n\n :param setting: the parameter settings (SCIP_PARAMSETTING)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_93setSeparating(PyObject *__pyx_v_self, PyObject *__pyx_v_setting) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSeparating (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_92setSeparating(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_setting)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_92setSeparating(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_setting) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_PARAMSETTING __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSeparating", 0); /* "pyscipopt/scip.pyx":980 * * """ * PY_SCIP_CALL(SCIPsetSeparating(self._scip, setting, True)) # <<<<<<<<<<<<<< * * def setHeuristics(self, setting): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = ((SCIP_PARAMSETTING)__Pyx_PyInt_As_SCIP_PARAMSETTING(__pyx_v_setting)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 980, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetSeparating(__pyx_v_self->_scip, __pyx_t_3, 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":974 * PY_SCIP_CALL(SCIPsetProbName(self._scip, n)) * * def setSeparating(self, setting): # <<<<<<<<<<<<<< * """Set separating parameter settings. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setSeparating", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":982 * PY_SCIP_CALL(SCIPsetSeparating(self._scip, setting, True)) * * def setHeuristics(self, setting): # <<<<<<<<<<<<<< * """Set heuristics parameter settings. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_95setHeuristics(PyObject *__pyx_v_self, PyObject *__pyx_v_setting); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_94setHeuristics[] = "Set heuristics parameter settings.\n\n :param setting: the parameter setting (SCIP_PARAMSETTING)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_95setHeuristics(PyObject *__pyx_v_self, PyObject *__pyx_v_setting) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setHeuristics (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_94setHeuristics(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_setting)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_94setHeuristics(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_setting) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_PARAMSETTING __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setHeuristics", 0); /* "pyscipopt/scip.pyx":988 * * """ * PY_SCIP_CALL(SCIPsetHeuristics(self._scip, setting, True)) # <<<<<<<<<<<<<< * * def disablePropagation(self, onlyroot=False): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = ((SCIP_PARAMSETTING)__Pyx_PyInt_As_SCIP_PARAMSETTING(__pyx_v_setting)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 988, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetHeuristics(__pyx_v_self->_scip, __pyx_t_3, 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":982 * PY_SCIP_CALL(SCIPsetSeparating(self._scip, setting, True)) * * def setHeuristics(self, setting): # <<<<<<<<<<<<<< * """Set heuristics parameter settings. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setHeuristics", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":990 * PY_SCIP_CALL(SCIPsetHeuristics(self._scip, setting, True)) * * def disablePropagation(self, onlyroot=False): # <<<<<<<<<<<<<< * """Disables propagation in SCIP to avoid modifying the original problem during transformation. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_97disablePropagation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_96disablePropagation[] = "Disables propagation in SCIP to avoid modifying the original problem during transformation.\n\n :param onlyroot: use propagation when root processing is finished (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_97disablePropagation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_onlyroot = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("disablePropagation (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_onlyroot,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_onlyroot); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disablePropagation") < 0)) __PYX_ERR(3, 990, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_onlyroot = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("disablePropagation", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 990, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.disablePropagation", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_96disablePropagation(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_onlyroot); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_96disablePropagation(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_onlyroot) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("disablePropagation", 0); /* "pyscipopt/scip.pyx":996 * * """ * self.setIntParam("propagating/maxroundsroot", 0) # <<<<<<<<<<<<<< * if not onlyroot: * self.setIntParam("propagating/maxrounds", 0) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setIntParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":997 * """ * self.setIntParam("propagating/maxroundsroot", 0) * if not onlyroot: # <<<<<<<<<<<<<< * self.setIntParam("propagating/maxrounds", 0) * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_onlyroot); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 997, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":998 * self.setIntParam("propagating/maxroundsroot", 0) * if not onlyroot: * self.setIntParam("propagating/maxrounds", 0) # <<<<<<<<<<<<<< * * def writeProblem(self, filename='model.cip', trans=False): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setIntParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":997 * """ * self.setIntParam("propagating/maxroundsroot", 0) * if not onlyroot: # <<<<<<<<<<<<<< * self.setIntParam("propagating/maxrounds", 0) * */ } /* "pyscipopt/scip.pyx":990 * PY_SCIP_CALL(SCIPsetHeuristics(self._scip, setting, True)) * * def disablePropagation(self, onlyroot=False): # <<<<<<<<<<<<<< * """Disables propagation in SCIP to avoid modifying the original problem during transformation. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.disablePropagation", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1000 * self.setIntParam("propagating/maxrounds", 0) * * def writeProblem(self, filename='model.cip', trans=False): # <<<<<<<<<<<<<< * """Write current model/problem to a file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_99writeProblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_98writeProblem[] = "Write current model/problem to a file.\n\n :param filename: the name of the file to be used (Default value = 'model.cip')\n :param trans: indicates whether the transformed problem is written to file (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_99writeProblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_trans = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeProblem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_trans,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_kp_u_model_cip); values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_trans); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeProblem") < 0)) __PYX_ERR(3, 1000, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_filename = values[0]; __pyx_v_trans = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("writeProblem", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1000, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.writeProblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_98writeProblem(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_filename, __pyx_v_trans); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_98writeProblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_trans) { PyObject *__pyx_v_fn = NULL; PyObject *__pyx_v_ext = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; int __pyx_t_7; char *__pyx_t_8; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeProblem", 0); /* "pyscipopt/scip.pyx":1007 * * """ * fn = str_conversion(filename) # <<<<<<<<<<<<<< * fn, ext = splitext(fn) * if len(ext) == 0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fn = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1008 * """ * fn = str_conversion(filename) * fn, ext = splitext(fn) # <<<<<<<<<<<<<< * if len(ext) == 0: * ext = str_conversion('.cip') */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_splitext); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fn); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(3, 1008, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(3, 1008, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(3, 1008, __pyx_L1_error) __pyx_L4_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_fn, __pyx_t_2); __pyx_t_2 = 0; __pyx_v_ext = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1009 * fn = str_conversion(filename) * fn, ext = splitext(fn) * if len(ext) == 0: # <<<<<<<<<<<<<< * ext = str_conversion('.cip') * fn = fn + ext */ __pyx_t_6 = PyObject_Length(__pyx_v_ext); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1009, __pyx_L1_error) __pyx_t_7 = ((__pyx_t_6 == 0) != 0); if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1010 * fn, ext = splitext(fn) * if len(ext) == 0: * ext = str_conversion('.cip') # <<<<<<<<<<<<<< * fn = fn + ext * ext = ext[1:] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u_cip) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_cip); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_ext, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1009 * fn = str_conversion(filename) * fn, ext = splitext(fn) * if len(ext) == 0: # <<<<<<<<<<<<<< * ext = str_conversion('.cip') * fn = fn + ext */ } /* "pyscipopt/scip.pyx":1011 * if len(ext) == 0: * ext = str_conversion('.cip') * fn = fn + ext # <<<<<<<<<<<<<< * ext = ext[1:] * if trans: */ __pyx_t_1 = PyNumber_Add(__pyx_v_fn, __pyx_v_ext); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_fn, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1012 * ext = str_conversion('.cip') * fn = fn + ext * ext = ext[1:] # <<<<<<<<<<<<<< * if trans: * PY_SCIP_CALL(SCIPwriteTransProblem(self._scip, fn, ext, False)) */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_ext, 1, 0, NULL, NULL, &__pyx_slice__83, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ext, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1013 * fn = fn + ext * ext = ext[1:] * if trans: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPwriteTransProblem(self._scip, fn, ext, False)) * else: */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_trans); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1013, __pyx_L1_error) if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1014 * ext = ext[1:] * if trans: * PY_SCIP_CALL(SCIPwriteTransProblem(self._scip, fn, ext, False)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPwriteOrigProblem(self._scip, fn, ext, False)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1014, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_ext); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 1014, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPwriteTransProblem(__pyx_v_self->_scip, __pyx_t_8, __pyx_t_9, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1013 * fn = fn + ext * ext = ext[1:] * if trans: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPwriteTransProblem(self._scip, fn, ext, False)) * else: */ goto __pyx_L6; } /* "pyscipopt/scip.pyx":1016 * PY_SCIP_CALL(SCIPwriteTransProblem(self._scip, fn, ext, False)) * else: * PY_SCIP_CALL(SCIPwriteOrigProblem(self._scip, fn, ext, False)) # <<<<<<<<<<<<<< * print('wrote problem to file ' + str(fn)) * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 1016, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_ext); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1016, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPwriteOrigProblem(__pyx_v_self->_scip, __pyx_t_9, __pyx_t_8, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L6:; /* "pyscipopt/scip.pyx":1017 * else: * PY_SCIP_CALL(SCIPwriteOrigProblem(self._scip, fn, ext, False)) * print('wrote problem to file ' + str(fn)) # <<<<<<<<<<<<<< * * # Variable Functions */ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_wrote_problem_to_file, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1000 * self.setIntParam("propagating/maxrounds", 0) * * def writeProblem(self, filename='model.cip', trans=False): # <<<<<<<<<<<<<< * """Write current model/problem to a file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.writeProblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fn); __Pyx_XDECREF(__pyx_v_ext); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1021 * # Variable Functions * * def addVar(self, name='', vtype='C', lb=0.0, ub=None, obj=0.0, pricedVar = False): # <<<<<<<<<<<<<< * """Create a new variable. Default variable is non-negative and continuous. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_101addVar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_100addVar[] = "Create a new variable. Default variable is non-negative and continuous.\n\n :param name: name of the variable, generic if empty (Default value = '')\n :param vtype: type of the variable (Default value = 'C')\n :param lb: lower bound of the variable, use None for -infinity (Default value = 0.0)\n :param ub: upper bound of the variable, use None for +infinity (Default value = None)\n :param obj: objective value of variable (Default value = 0.0)\n :param pricedVar: is the variable a pricing candidate? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_101addVar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_vtype = 0; PyObject *__pyx_v_lb = 0; PyObject *__pyx_v_ub = 0; PyObject *__pyx_v_obj = 0; PyObject *__pyx_v_pricedVar = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addVar (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_vtype,&__pyx_n_s_lb,&__pyx_n_s_ub,&__pyx_n_s_obj,&__pyx_n_s_pricedVar,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[0] = ((PyObject *)__pyx_kp_u__84); values[1] = ((PyObject *)__pyx_n_u_C); values[2] = ((PyObject *)__pyx_float_0_0); values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)__pyx_float_0_0); values[5] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vtype); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pricedVar); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addVar") < 0)) __PYX_ERR(3, 1021, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = values[0]; __pyx_v_vtype = values[1]; __pyx_v_lb = values[2]; __pyx_v_ub = values[3]; __pyx_v_obj = values[4]; __pyx_v_pricedVar = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addVar", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1021, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_100addVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_vtype, __pyx_v_lb, __pyx_v_ub, __pyx_v_obj, __pyx_v_pricedVar); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_100addVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_vtype, PyObject *__pyx_v_lb, PyObject *__pyx_v_ub, PyObject *__pyx_v_obj, PyObject *__pyx_v_pricedVar) { PyObject *__pyx_v_cname = NULL; SCIP_VAR *__pyx_v_scip_var; PyObject *__pyx_v_pyVar = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; char *__pyx_t_6; SCIP_Real __pyx_t_7; SCIP_Real __pyx_t_8; SCIP_Real __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addVar", 0); __Pyx_INCREF(__pyx_v_name); __Pyx_INCREF(__pyx_v_vtype); __Pyx_INCREF(__pyx_v_lb); __Pyx_INCREF(__pyx_v_ub); /* "pyscipopt/scip.pyx":1034 * * # replace empty name with generic one * if name == '': # <<<<<<<<<<<<<< * name = 'x'+str(SCIPgetNVars(self._scip)+1) * */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_kp_u__84, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1034, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1035 * # replace empty name with generic one * if name == '': * name = 'x'+str(SCIPgetNVars(self._scip)+1) # <<<<<<<<<<<<<< * * cname = str_conversion(name) */ __pyx_t_2 = __Pyx_PyInt_From_long((SCIPgetNVars(__pyx_v_self->_scip) + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_n_u_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1034 * * # replace empty name with generic one * if name == '': # <<<<<<<<<<<<<< * name = 'x'+str(SCIPgetNVars(self._scip)+1) * */ } /* "pyscipopt/scip.pyx":1037 * name = 'x'+str(SCIPgetNVars(self._scip)+1) * * cname = str_conversion(name) # <<<<<<<<<<<<<< * if ub is None: * ub = SCIPinfinity(self._scip) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_cname = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1038 * * cname = str_conversion(name) * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * if lb is None: */ __pyx_t_1 = (__pyx_v_ub == Py_None); __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "pyscipopt/scip.pyx":1039 * cname = str_conversion(name) * if ub is None: * ub = SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * if lb is None: * lb = -SCIPinfinity(self._scip) */ __pyx_t_2 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_ub, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1038 * * cname = str_conversion(name) * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * if lb is None: */ } /* "pyscipopt/scip.pyx":1040 * if ub is None: * ub = SCIPinfinity(self._scip) * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * cdef SCIP_VAR* scip_var */ __pyx_t_5 = (__pyx_v_lb == Py_None); __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1041 * ub = SCIPinfinity(self._scip) * if lb is None: * lb = -SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * cdef SCIP_VAR* scip_var * vtype = vtype.upper() */ __pyx_t_2 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_lb, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1040 * if ub is None: * ub = SCIPinfinity(self._scip) * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * cdef SCIP_VAR* scip_var */ } /* "pyscipopt/scip.pyx":1043 * lb = -SCIPinfinity(self._scip) * cdef SCIP_VAR* scip_var * vtype = vtype.upper() # <<<<<<<<<<<<<< * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_vtype, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1044 * cdef SCIP_VAR* scip_var * vtype = vtype.upper() * if vtype in ['C', 'CONTINUOUS']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) * elif vtype in ['B', 'BINARY']: */ __Pyx_INCREF(__pyx_v_vtype); __pyx_t_2 = __pyx_v_vtype; __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 1044, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_CONTINUOUS, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 1044, __pyx_L1_error) __pyx_t_1 = __pyx_t_5; __pyx_L7_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "pyscipopt/scip.pyx":1045 * vtype = vtype.upper() * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) # <<<<<<<<<<<<<< * elif vtype in ['B', 'BINARY']: * lb = 0.0 */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_cname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1045, __pyx_L1_error) __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1045, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1045, __pyx_L1_error) __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1045, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateVarBasic(__pyx_v_self->_scip, (&__pyx_v_scip_var), __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, SCIP_VARTYPE_CONTINUOUS)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1044 * cdef SCIP_VAR* scip_var * vtype = vtype.upper() * if vtype in ['C', 'CONTINUOUS']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) * elif vtype in ['B', 'BINARY']: */ goto __pyx_L6; } /* "pyscipopt/scip.pyx":1046 * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) * elif vtype in ['B', 'BINARY']: # <<<<<<<<<<<<<< * lb = 0.0 * ub = 1.0 */ __Pyx_INCREF(__pyx_v_vtype); __pyx_t_2 = __pyx_v_vtype; __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_B, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1046, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_5 = __pyx_t_1; goto __pyx_L9_bool_binop_done; } __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_BINARY, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1046, __pyx_L1_error) __pyx_t_5 = __pyx_t_1; __pyx_L9_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1047 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) * elif vtype in ['B', 'BINARY']: * lb = 0.0 # <<<<<<<<<<<<<< * ub = 1.0 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_BINARY)) */ __Pyx_INCREF(__pyx_float_0_0); __Pyx_DECREF_SET(__pyx_v_lb, __pyx_float_0_0); /* "pyscipopt/scip.pyx":1048 * elif vtype in ['B', 'BINARY']: * lb = 0.0 * ub = 1.0 # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_BINARY)) * elif vtype in ['I', 'INTEGER']: */ __Pyx_INCREF(__pyx_float_1_0); __Pyx_DECREF_SET(__pyx_v_ub, __pyx_float_1_0); /* "pyscipopt/scip.pyx":1049 * lb = 0.0 * ub = 1.0 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_BINARY)) # <<<<<<<<<<<<<< * elif vtype in ['I', 'INTEGER']: * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_INTEGER)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_cname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1049, __pyx_L1_error) __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1049, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1049, __pyx_L1_error) __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1049, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateVarBasic(__pyx_v_self->_scip, (&__pyx_v_scip_var), __pyx_t_6, __pyx_t_9, __pyx_t_8, __pyx_t_7, SCIP_VARTYPE_BINARY)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1046 * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_CONTINUOUS)) * elif vtype in ['B', 'BINARY']: # <<<<<<<<<<<<<< * lb = 0.0 * ub = 1.0 */ goto __pyx_L6; } /* "pyscipopt/scip.pyx":1050 * ub = 1.0 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_BINARY)) * elif vtype in ['I', 'INTEGER']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_INTEGER)) * else: */ __Pyx_INCREF(__pyx_v_vtype); __pyx_t_2 = __pyx_v_vtype; __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_I, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 1050, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L11_bool_binop_done; } __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_INTEGER, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 1050, __pyx_L1_error) __pyx_t_1 = __pyx_t_5; __pyx_L11_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (likely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":1051 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_BINARY)) * elif vtype in ['I', 'INTEGER']: * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_INTEGER)) # <<<<<<<<<<<<<< * else: * raise Warning("unrecognized variable type") */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_cname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1051, __pyx_L1_error) __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_7 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1051, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1051, __pyx_L1_error) __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1051, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateVarBasic(__pyx_v_self->_scip, (&__pyx_v_scip_var), __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, SCIP_VARTYPE_INTEGER)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1050 * ub = 1.0 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_BINARY)) * elif vtype in ['I', 'INTEGER']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_INTEGER)) * else: */ goto __pyx_L6; } /* "pyscipopt/scip.pyx":1053 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_INTEGER)) * else: * raise Warning("unrecognized variable type") # <<<<<<<<<<<<<< * * if pricedVar: */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 1053, __pyx_L1_error) } __pyx_L6:; /* "pyscipopt/scip.pyx":1055 * raise Warning("unrecognized variable type") * * if pricedVar: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddPricedVar(self._scip, scip_var, 1.0)) * else: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_pricedVar); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 1055, __pyx_L1_error) if (__pyx_t_5) { /* "pyscipopt/scip.pyx":1056 * * if pricedVar: * PY_SCIP_CALL(SCIPaddPricedVar(self._scip, scip_var, 1.0)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPaddVar(self._scip, scip_var)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddPricedVar(__pyx_v_self->_scip, __pyx_v_scip_var, 1.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1055 * raise Warning("unrecognized variable type") * * if pricedVar: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddPricedVar(self._scip, scip_var, 1.0)) * else: */ goto __pyx_L13; } /* "pyscipopt/scip.pyx":1058 * PY_SCIP_CALL(SCIPaddPricedVar(self._scip, scip_var, 1.0)) * else: * PY_SCIP_CALL(SCIPaddVar(self._scip, scip_var)) # <<<<<<<<<<<<<< * * pyVar = Variable.create(scip_var) */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVar(__pyx_v_self->_scip, __pyx_v_scip_var)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L13:; /* "pyscipopt/scip.pyx":1060 * PY_SCIP_CALL(SCIPaddVar(self._scip, scip_var)) * * pyVar = Variable.create(scip_var) # <<<<<<<<<<<<<< * * #setting the variable data */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v_scip_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pyVar = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1063 * * #setting the variable data * SCIPvarSetData(scip_var, <SCIP_VARDATA*>pyVar) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseVar(self._scip, &scip_var)) * return pyVar */ SCIPvarSetData(__pyx_v_scip_var, ((SCIP_VARDATA *)__pyx_v_pyVar)); /* "pyscipopt/scip.pyx":1064 * #setting the variable data * SCIPvarSetData(scip_var, <SCIP_VARDATA*>pyVar) * PY_SCIP_CALL(SCIPreleaseVar(self._scip, &scip_var)) # <<<<<<<<<<<<<< * return pyVar * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseVar(__pyx_v_self->_scip, (&__pyx_v_scip_var))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1065 * SCIPvarSetData(scip_var, <SCIP_VARDATA*>pyVar) * PY_SCIP_CALL(SCIPreleaseVar(self._scip, &scip_var)) * return pyVar # <<<<<<<<<<<<<< * * def releaseVar(self, Variable var): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyVar); __pyx_r = __pyx_v_pyVar; goto __pyx_L0; /* "pyscipopt/scip.pyx":1021 * # Variable Functions * * def addVar(self, name='', vtype='C', lb=0.0, ub=None, obj=0.0, pricedVar = False): # <<<<<<<<<<<<<< * """Create a new variable. Default variable is non-negative and continuous. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.Model.addVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cname); __Pyx_XDECREF(__pyx_v_pyVar); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_vtype); __Pyx_XDECREF(__pyx_v_lb); __Pyx_XDECREF(__pyx_v_ub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1067 * return pyVar * * def releaseVar(self, Variable var): # <<<<<<<<<<<<<< * """Release the variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_103releaseVar(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_102releaseVar[] = "Release the variable.\n\n :param Variable var: variable to be released\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_103releaseVar(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("releaseVar (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1067, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_102releaseVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_102releaseVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("releaseVar", 0); /* "pyscipopt/scip.pyx":1073 * * """ * PY_SCIP_CALL(SCIPreleaseVar(self._scip, &var.scip_var)) # <<<<<<<<<<<<<< * * def getTransformedVar(self, Variable var): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseVar(__pyx_v_self->_scip, (&__pyx_v_var->scip_var))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1067 * return pyVar * * def releaseVar(self, Variable var): # <<<<<<<<<<<<<< * """Release the variable. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.releaseVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1075 * PY_SCIP_CALL(SCIPreleaseVar(self._scip, &var.scip_var)) * * def getTransformedVar(self, Variable var): # <<<<<<<<<<<<<< * """Retrieve the transformed variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_105getTransformedVar(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_104getTransformedVar[] = "Retrieve the transformed variable.\n\n :param Variable var: original variable to get the transformed of\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_105getTransformedVar(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTransformedVar (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1075, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_104getTransformedVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_104getTransformedVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { SCIP_VAR *__pyx_v__tvar; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTransformedVar", 0); /* "pyscipopt/scip.pyx":1082 * """ * cdef SCIP_VAR* _tvar * PY_SCIP_CALL(SCIPtransformVar(self._scip, var.scip_var, &_tvar)) # <<<<<<<<<<<<<< * return Variable.create(_tvar) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtransformVar(__pyx_v_self->_scip, __pyx_v_var->scip_var, (&__pyx_v__tvar))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1083 * cdef SCIP_VAR* _tvar * PY_SCIP_CALL(SCIPtransformVar(self._scip, var.scip_var, &_tvar)) * return Variable.create(_tvar) # <<<<<<<<<<<<<< * * def addVarLocks(self, Variable var, nlocksdown, nlocksup): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v__tvar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1075 * PY_SCIP_CALL(SCIPreleaseVar(self._scip, &var.scip_var)) * * def getTransformedVar(self, Variable var): # <<<<<<<<<<<<<< * """Retrieve the transformed variable. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getTransformedVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1085 * return Variable.create(_tvar) * * def addVarLocks(self, Variable var, nlocksdown, nlocksup): # <<<<<<<<<<<<<< * """adds given values to lock numbers of variable for rounding * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_107addVarLocks(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_106addVarLocks[] = "adds given values to lock numbers of variable for rounding\n\n :param Variable var: variable to adjust the locks for\n :param nlocksdown: new number of down locks\n :param nlocksup: new number of up locks\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_107addVarLocks(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_nlocksdown = 0; PyObject *__pyx_v_nlocksup = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addVarLocks (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_nlocksdown,&__pyx_n_s_nlocksup,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nlocksdown)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarLocks", 1, 3, 3, 1); __PYX_ERR(3, 1085, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nlocksup)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarLocks", 1, 3, 3, 2); __PYX_ERR(3, 1085, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addVarLocks") < 0)) __PYX_ERR(3, 1085, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_nlocksdown = values[1]; __pyx_v_nlocksup = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addVarLocks", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1085, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addVarLocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1085, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_106addVarLocks(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_nlocksdown, __pyx_v_nlocksup); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_106addVarLocks(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_nlocksdown, PyObject *__pyx_v_nlocksup) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addVarLocks", 0); /* "pyscipopt/scip.pyx":1093 * * """ * PY_SCIP_CALL(SCIPaddVarLocks(self._scip, var.scip_var, nlocksdown, nlocksup)) # <<<<<<<<<<<<<< * * def fixVar(self, Variable var, val): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nlocksdown); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1093, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_nlocksup); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1093, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarLocks(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1085 * return Variable.create(_tvar) * * def addVarLocks(self, Variable var, nlocksdown, nlocksup): # <<<<<<<<<<<<<< * """adds given values to lock numbers of variable for rounding * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.addVarLocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1095 * PY_SCIP_CALL(SCIPaddVarLocks(self._scip, var.scip_var, nlocksdown, nlocksup)) * * def fixVar(self, Variable var, val): # <<<<<<<<<<<<<< * """Fixes the variable var to the value val if possible. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_109fixVar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_108fixVar[] = "Fixes the variable var to the value val if possible.\n\n :param Variable var: variable to fix\n :param val: float, the fix value\n :return: tuple (infeasible, fixed) of booleans\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_109fixVar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_val = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fixVar (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fixVar", 1, 2, 2, 1); __PYX_ERR(3, 1095, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fixVar") < 0)) __PYX_ERR(3, 1095, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_val = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fixVar", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1095, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.fixVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1095, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_108fixVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_val); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_108fixVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_val) { SCIP_Bool __pyx_v_infeasible; SCIP_Bool __pyx_v_fixed; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fixVar", 0); /* "pyscipopt/scip.pyx":1105 * cdef SCIP_Bool infeasible * cdef SCIP_Bool fixed * PY_SCIP_CALL(SCIPfixVar(self._scip, var.scip_var, val, &infeasible, &fixed)) # <<<<<<<<<<<<<< * return infeasible, fixed * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1105, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfixVar(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3, (&__pyx_v_infeasible), (&__pyx_v_fixed))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1106 * cdef SCIP_Bool fixed * PY_SCIP_CALL(SCIPfixVar(self._scip, var.scip_var, val, &infeasible, &fixed)) * return infeasible, fixed # <<<<<<<<<<<<<< * * def delVar(self, Variable var): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_fixed); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1095 * PY_SCIP_CALL(SCIPaddVarLocks(self._scip, var.scip_var, nlocksdown, nlocksup)) * * def fixVar(self, Variable var, val): # <<<<<<<<<<<<<< * """Fixes the variable var to the value val if possible. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.fixVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1108 * return infeasible, fixed * * def delVar(self, Variable var): # <<<<<<<<<<<<<< * """Delete a variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_111delVar(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_110delVar[] = "Delete a variable.\n\n :param var: the variable which shall be deleted\n :return: bool, was deleting succesful\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_111delVar(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delVar (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1108, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_110delVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_110delVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { SCIP_Bool __pyx_v_deleted; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delVar", 0); /* "pyscipopt/scip.pyx":1116 * """ * cdef SCIP_Bool deleted * PY_SCIP_CALL(SCIPdelVar(self._scip, var.scip_var, &deleted)) # <<<<<<<<<<<<<< * return deleted * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPdelVar(__pyx_v_self->_scip, __pyx_v_var->scip_var, (&__pyx_v_deleted))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1117 * cdef SCIP_Bool deleted * PY_SCIP_CALL(SCIPdelVar(self._scip, var.scip_var, &deleted)) * return deleted # <<<<<<<<<<<<<< * * def tightenVarLb(self, Variable var, lb, force=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_deleted); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1108 * return infeasible, fixed * * def delVar(self, Variable var): # <<<<<<<<<<<<<< * """Delete a variable. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.delVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1119 * return deleted * * def tightenVarLb(self, Variable var, lb, force=False): # <<<<<<<<<<<<<< * """Tighten the lower bound in preprocessing or current node, if the bound is tighter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_113tightenVarLb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_112tightenVarLb[] = "Tighten the lower bound in preprocessing or current node, if the bound is tighter.\n\n :param var: SCIP variable\n :param lb: possible new lower bound\n :param force: force tightening even if below bound strengthening tolerance\n :return: tuple of bools, (infeasible, tightened)\n infeasible: whether new domain is empty\n tightened: whether the bound was tightened\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_113tightenVarLb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_lb = 0; PyObject *__pyx_v_force = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tightenVarLb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_lb,&__pyx_n_s_force,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tightenVarLb", 0, 2, 3, 1); __PYX_ERR(3, 1119, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tightenVarLb") < 0)) __PYX_ERR(3, 1119, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_lb = values[1]; __pyx_v_force = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tightenVarLb", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1119, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarLb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1119, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_112tightenVarLb(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_lb, __pyx_v_force); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_112tightenVarLb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb, PyObject *__pyx_v_force) { SCIP_Bool __pyx_v_infeasible; SCIP_Bool __pyx_v_tightened; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; SCIP_Bool __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tightenVarLb", 0); /* "pyscipopt/scip.pyx":1132 * cdef SCIP_Bool infeasible * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarLb(self._scip, var.scip_var, lb, force, &infeasible, &tightened)) # <<<<<<<<<<<<<< * return infeasible, tightened * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1132, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1132, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtightenVarLb(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3, __pyx_t_4, (&__pyx_v_infeasible), (&__pyx_v_tightened))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1133 * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarLb(self._scip, var.scip_var, lb, force, &infeasible, &tightened)) * return infeasible, tightened # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_tightened); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1119 * return deleted * * def tightenVarLb(self, Variable var, lb, force=False): # <<<<<<<<<<<<<< * """Tighten the lower bound in preprocessing or current node, if the bound is tighter. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarLb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1136 * * * def tightenVarUb(self, Variable var, ub, force=False): # <<<<<<<<<<<<<< * """Tighten the upper bound in preprocessing or current node, if the bound is tighter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_115tightenVarUb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_114tightenVarUb[] = "Tighten the upper bound in preprocessing or current node, if the bound is tighter.\n\n :param var: SCIP variable\n :param ub: possible new upper bound\n :param force: force tightening even if below bound strengthening tolerance\n :return: tuple of bools, (infeasible, tightened)\n infeasible: whether new domain is empty\n tightened: whether the bound was tightened\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_115tightenVarUb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_ub = 0; PyObject *__pyx_v_force = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tightenVarUb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_ub,&__pyx_n_s_force,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tightenVarUb", 0, 2, 3, 1); __PYX_ERR(3, 1136, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tightenVarUb") < 0)) __PYX_ERR(3, 1136, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_ub = values[1]; __pyx_v_force = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tightenVarUb", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1136, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarUb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1136, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_114tightenVarUb(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_ub, __pyx_v_force); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_114tightenVarUb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub, PyObject *__pyx_v_force) { SCIP_Bool __pyx_v_infeasible; SCIP_Bool __pyx_v_tightened; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; SCIP_Bool __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tightenVarUb", 0); /* "pyscipopt/scip.pyx":1149 * cdef SCIP_Bool infeasible * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarUb(self._scip, var.scip_var, ub, force, &infeasible, &tightened)) # <<<<<<<<<<<<<< * return infeasible, tightened * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1149, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1149, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtightenVarUb(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3, __pyx_t_4, (&__pyx_v_infeasible), (&__pyx_v_tightened))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1150 * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarUb(self._scip, var.scip_var, ub, force, &infeasible, &tightened)) * return infeasible, tightened # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_tightened); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1136 * * * def tightenVarUb(self, Variable var, ub, force=False): # <<<<<<<<<<<<<< * """Tighten the upper bound in preprocessing or current node, if the bound is tighter. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarUb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1153 * * * def tightenVarUbGlobal(self, Variable var, ub, force=False): # <<<<<<<<<<<<<< * """Tighten the global upper bound, if the bound is tighter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_117tightenVarUbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_116tightenVarUbGlobal[] = "Tighten the global upper bound, if the bound is tighter.\n\n :param var: SCIP variable\n :param ub: possible new upper bound\n :param force: force tightening even if below bound strengthening tolerance\n :return: tuple of bools, (infeasible, tightened)\n infeasible: whether new domain is empty\n tightened: whether the bound was tightened\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_117tightenVarUbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_ub = 0; PyObject *__pyx_v_force = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tightenVarUbGlobal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_ub,&__pyx_n_s_force,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tightenVarUbGlobal", 0, 2, 3, 1); __PYX_ERR(3, 1153, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tightenVarUbGlobal") < 0)) __PYX_ERR(3, 1153, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_ub = values[1]; __pyx_v_force = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tightenVarUbGlobal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1153, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarUbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1153, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_116tightenVarUbGlobal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_ub, __pyx_v_force); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_116tightenVarUbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub, PyObject *__pyx_v_force) { SCIP_Bool __pyx_v_infeasible; SCIP_Bool __pyx_v_tightened; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; SCIP_Bool __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tightenVarUbGlobal", 0); /* "pyscipopt/scip.pyx":1166 * cdef SCIP_Bool infeasible * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarUbGlobal(self._scip, var.scip_var, ub, force, &infeasible, &tightened)) # <<<<<<<<<<<<<< * return infeasible, tightened * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1166, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1166, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtightenVarUbGlobal(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3, __pyx_t_4, (&__pyx_v_infeasible), (&__pyx_v_tightened))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1167 * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarUbGlobal(self._scip, var.scip_var, ub, force, &infeasible, &tightened)) * return infeasible, tightened # <<<<<<<<<<<<<< * * def tightenVarLbGlobal(self, Variable var, lb, force=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_tightened); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1153 * * * def tightenVarUbGlobal(self, Variable var, ub, force=False): # <<<<<<<<<<<<<< * """Tighten the global upper bound, if the bound is tighter. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarUbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1169 * return infeasible, tightened * * def tightenVarLbGlobal(self, Variable var, lb, force=False): # <<<<<<<<<<<<<< * """Tighten the global upper bound, if the bound is tighter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_119tightenVarLbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_118tightenVarLbGlobal[] = "Tighten the global upper bound, if the bound is tighter.\n\n :param var: SCIP variable\n :param lb: possible new upper bound\n :param force: force tightening even if below bound strengthening tolerance\n :return: tuple of bools, (infeasible, tightened)\n infeasible: whether new domain is empty\n tightened: whether the bound was tightened\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_119tightenVarLbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_lb = 0; PyObject *__pyx_v_force = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tightenVarLbGlobal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_lb,&__pyx_n_s_force,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tightenVarLbGlobal", 0, 2, 3, 1); __PYX_ERR(3, 1169, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tightenVarLbGlobal") < 0)) __PYX_ERR(3, 1169, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_lb = values[1]; __pyx_v_force = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tightenVarLbGlobal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1169, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarLbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1169, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_118tightenVarLbGlobal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_lb, __pyx_v_force); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_118tightenVarLbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb, PyObject *__pyx_v_force) { SCIP_Bool __pyx_v_infeasible; SCIP_Bool __pyx_v_tightened; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; SCIP_Bool __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tightenVarLbGlobal", 0); /* "pyscipopt/scip.pyx":1182 * cdef SCIP_Bool infeasible * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarLbGlobal(self._scip, var.scip_var, lb, force, &infeasible, &tightened)) # <<<<<<<<<<<<<< * return infeasible, tightened * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1182, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1182, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtightenVarLbGlobal(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3, __pyx_t_4, (&__pyx_v_infeasible), (&__pyx_v_tightened))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1183 * cdef SCIP_Bool tightened * PY_SCIP_CALL(SCIPtightenVarLbGlobal(self._scip, var.scip_var, lb, force, &infeasible, &tightened)) * return infeasible, tightened # <<<<<<<<<<<<<< * * def chgVarLb(self, Variable var, lb): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_tightened); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1169 * return infeasible, tightened * * def tightenVarLbGlobal(self, Variable var, lb, force=False): # <<<<<<<<<<<<<< * """Tighten the global upper bound, if the bound is tighter. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.tightenVarLbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1185 * return infeasible, tightened * * def chgVarLb(self, Variable var, lb): # <<<<<<<<<<<<<< * """Changes the lower bound of the specified variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_121chgVarLb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_120chgVarLb[] = "Changes the lower bound of the specified variable.\n\n :param Variable var: variable to change bound of\n :param lb: new lower bound (set to None for -infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_121chgVarLb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_lb = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarLb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_lb,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarLb", 1, 2, 2, 1); __PYX_ERR(3, 1185, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarLb") < 0)) __PYX_ERR(3, 1185, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_lb = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarLb", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1185, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1185, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_120chgVarLb(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_lb); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_120chgVarLb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarLb", 0); __Pyx_INCREF(__pyx_v_lb); /* "pyscipopt/scip.pyx":1192 * * """ * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLb(self._scip, var.scip_var, lb)) */ __pyx_t_1 = (__pyx_v_lb == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1193 * """ * if lb is None: * lb = -SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarLb(self._scip, var.scip_var, lb)) * */ __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_lb, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1192 * * """ * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLb(self._scip, var.scip_var, lb)) */ } /* "pyscipopt/scip.pyx":1194 * if lb is None: * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLb(self._scip, var.scip_var, lb)) # <<<<<<<<<<<<<< * * def chgVarUb(self, Variable var, ub): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1194, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarLb(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1185 * return infeasible, tightened * * def chgVarLb(self, Variable var, lb): # <<<<<<<<<<<<<< * """Changes the lower bound of the specified variable. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_lb); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1196 * PY_SCIP_CALL(SCIPchgVarLb(self._scip, var.scip_var, lb)) * * def chgVarUb(self, Variable var, ub): # <<<<<<<<<<<<<< * """Changes the upper bound of the specified variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_123chgVarUb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_122chgVarUb[] = "Changes the upper bound of the specified variable.\n\n :param Variable var: variable to change bound of\n :param ub: new upper bound (set to None for +infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_123chgVarUb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_ub = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarUb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_ub,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarUb", 1, 2, 2, 1); __PYX_ERR(3, 1196, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarUb") < 0)) __PYX_ERR(3, 1196, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_ub = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarUb", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1196, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1196, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_122chgVarUb(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_ub); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_122chgVarUb(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarUb", 0); __Pyx_INCREF(__pyx_v_ub); /* "pyscipopt/scip.pyx":1203 * * """ * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUb(self._scip, var.scip_var, ub)) */ __pyx_t_1 = (__pyx_v_ub == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1204 * """ * if ub is None: * ub = SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarUb(self._scip, var.scip_var, ub)) * */ __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_ub, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1203 * * """ * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUb(self._scip, var.scip_var, ub)) */ } /* "pyscipopt/scip.pyx":1205 * if ub is None: * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUb(self._scip, var.scip_var, ub)) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1205, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarUb(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1196 * PY_SCIP_CALL(SCIPchgVarLb(self._scip, var.scip_var, lb)) * * def chgVarUb(self, Variable var, ub): # <<<<<<<<<<<<<< * """Changes the upper bound of the specified variable. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1208 * * * def chgVarLbGlobal(self, Variable var, lb): # <<<<<<<<<<<<<< * """Changes the global lower bound of the specified variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_125chgVarLbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_124chgVarLbGlobal[] = "Changes the global lower bound of the specified variable.\n\n :param Variable var: variable to change bound of\n :param lb: new lower bound (set to None for -infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_125chgVarLbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_lb = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarLbGlobal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_lb,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarLbGlobal", 1, 2, 2, 1); __PYX_ERR(3, 1208, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarLbGlobal") < 0)) __PYX_ERR(3, 1208, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_lb = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarLbGlobal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1208, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1208, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_124chgVarLbGlobal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_lb); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_124chgVarLbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarLbGlobal", 0); __Pyx_INCREF(__pyx_v_lb); /* "pyscipopt/scip.pyx":1215 * * """ * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLbGlobal(self._scip, var.scip_var, lb)) */ __pyx_t_1 = (__pyx_v_lb == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1216 * """ * if lb is None: * lb = -SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarLbGlobal(self._scip, var.scip_var, lb)) * */ __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_lb, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1215 * * """ * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLbGlobal(self._scip, var.scip_var, lb)) */ } /* "pyscipopt/scip.pyx":1217 * if lb is None: * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLbGlobal(self._scip, var.scip_var, lb)) # <<<<<<<<<<<<<< * * def chgVarUbGlobal(self, Variable var, ub): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1217, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarLbGlobal(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1208 * * * def chgVarLbGlobal(self, Variable var, lb): # <<<<<<<<<<<<<< * """Changes the global lower bound of the specified variable. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_lb); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1219 * PY_SCIP_CALL(SCIPchgVarLbGlobal(self._scip, var.scip_var, lb)) * * def chgVarUbGlobal(self, Variable var, ub): # <<<<<<<<<<<<<< * """Changes the global upper bound of the specified variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_127chgVarUbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_126chgVarUbGlobal[] = "Changes the global upper bound of the specified variable.\n\n :param Variable var: variable to change bound of\n :param ub: new upper bound (set to None for +infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_127chgVarUbGlobal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_ub = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarUbGlobal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_ub,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarUbGlobal", 1, 2, 2, 1); __PYX_ERR(3, 1219, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarUbGlobal") < 0)) __PYX_ERR(3, 1219, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_ub = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarUbGlobal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1219, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1219, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_126chgVarUbGlobal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_ub); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_126chgVarUbGlobal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarUbGlobal", 0); __Pyx_INCREF(__pyx_v_ub); /* "pyscipopt/scip.pyx":1226 * * """ * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUbGlobal(self._scip, var.scip_var, ub)) */ __pyx_t_1 = (__pyx_v_ub == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1227 * """ * if ub is None: * ub = SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarUbGlobal(self._scip, var.scip_var, ub)) * */ __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_ub, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1226 * * """ * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUbGlobal(self._scip, var.scip_var, ub)) */ } /* "pyscipopt/scip.pyx":1228 * if ub is None: * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUbGlobal(self._scip, var.scip_var, ub)) # <<<<<<<<<<<<<< * * def chgVarLbNode(self, Node node, Variable var, lb): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1228, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarUbGlobal(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1219 * PY_SCIP_CALL(SCIPchgVarLbGlobal(self._scip, var.scip_var, lb)) * * def chgVarUbGlobal(self, Variable var, ub): # <<<<<<<<<<<<<< * """Changes the global upper bound of the specified variable. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUbGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1230 * PY_SCIP_CALL(SCIPchgVarUbGlobal(self._scip, var.scip_var, ub)) * * def chgVarLbNode(self, Node node, Variable var, lb): # <<<<<<<<<<<<<< * """Changes the lower bound of the specified variable at the given node. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_129chgVarLbNode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_128chgVarLbNode[] = "Changes the lower bound of the specified variable at the given node.\n\n :param Variable var: variable to change bound of\n :param lb: new lower bound (set to None for -infinity)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_129chgVarLbNode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_lb = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarLbNode (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_node,&__pyx_n_s_var,&__pyx_n_s_lb,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarLbNode", 1, 3, 3, 1); __PYX_ERR(3, 1230, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarLbNode", 1, 3, 3, 2); __PYX_ERR(3, 1230, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarLbNode") < 0)) __PYX_ERR(3, 1230, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_node = ((struct __pyx_obj_9pyscipopt_4scip_Node *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_lb = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarLbNode", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1230, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLbNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_9pyscipopt_4scip_Node, 1, "node", 0))) __PYX_ERR(3, 1230, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1230, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_128chgVarLbNode(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_node, __pyx_v_var, __pyx_v_lb); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_128chgVarLbNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_lb) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarLbNode", 0); __Pyx_INCREF(__pyx_v_lb); /* "pyscipopt/scip.pyx":1237 * """ * * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLbNode(self._scip, node.scip_node, var.scip_var, lb)) */ __pyx_t_1 = (__pyx_v_lb == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1238 * * if lb is None: * lb = -SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarLbNode(self._scip, node.scip_node, var.scip_var, lb)) * */ __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_lb, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1237 * """ * * if lb is None: # <<<<<<<<<<<<<< * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLbNode(self._scip, node.scip_node, var.scip_var, lb)) */ } /* "pyscipopt/scip.pyx":1239 * if lb is None: * lb = -SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarLbNode(self._scip, node.scip_node, var.scip_var, lb)) # <<<<<<<<<<<<<< * * def chgVarUbNode(self, Node node, Variable var, ub): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1239, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarLbNode(__pyx_v_self->_scip, __pyx_v_node->scip_node, __pyx_v_var->scip_var, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1230 * PY_SCIP_CALL(SCIPchgVarUbGlobal(self._scip, var.scip_var, ub)) * * def chgVarLbNode(self, Node node, Variable var, lb): # <<<<<<<<<<<<<< * """Changes the lower bound of the specified variable at the given node. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLbNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_lb); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1241 * PY_SCIP_CALL(SCIPchgVarLbNode(self._scip, node.scip_node, var.scip_var, lb)) * * def chgVarUbNode(self, Node node, Variable var, ub): # <<<<<<<<<<<<<< * """Changes the upper bound of the specified variable at the given node. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_131chgVarUbNode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_130chgVarUbNode[] = "Changes the upper bound of the specified variable at the given node.\n\n :param Variable var: variable to change bound of\n :param ub: new upper bound (set to None for +infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_131chgVarUbNode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_ub = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarUbNode (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_node,&__pyx_n_s_var,&__pyx_n_s_ub,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarUbNode", 1, 3, 3, 1); __PYX_ERR(3, 1241, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarUbNode", 1, 3, 3, 2); __PYX_ERR(3, 1241, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarUbNode") < 0)) __PYX_ERR(3, 1241, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_node = ((struct __pyx_obj_9pyscipopt_4scip_Node *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_ub = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarUbNode", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1241, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUbNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_9pyscipopt_4scip_Node, 1, "node", 0))) __PYX_ERR(3, 1241, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1241, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_130chgVarUbNode(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_node, __pyx_v_var, __pyx_v_ub); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_130chgVarUbNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_ub) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarUbNode", 0); __Pyx_INCREF(__pyx_v_ub); /* "pyscipopt/scip.pyx":1248 * * """ * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUbNode(self._scip, node.scip_node, var.scip_var, ub)) */ __pyx_t_1 = (__pyx_v_ub == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1249 * """ * if ub is None: * ub = SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarUbNode(self._scip, node.scip_node, var.scip_var, ub)) * */ __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_ub, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1248 * * """ * if ub is None: # <<<<<<<<<<<<<< * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUbNode(self._scip, node.scip_node, var.scip_var, ub)) */ } /* "pyscipopt/scip.pyx":1250 * if ub is None: * ub = SCIPinfinity(self._scip) * PY_SCIP_CALL(SCIPchgVarUbNode(self._scip, node.scip_node, var.scip_var, ub)) # <<<<<<<<<<<<<< * * def chgVarType(self, Variable var, vtype): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_ub); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1250, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarUbNode(__pyx_v_self->_scip, __pyx_v_node->scip_node, __pyx_v_var->scip_var, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1241 * PY_SCIP_CALL(SCIPchgVarLbNode(self._scip, node.scip_node, var.scip_var, lb)) * * def chgVarUbNode(self, Node node, Variable var, ub): # <<<<<<<<<<<<<< * """Changes the upper bound of the specified variable at the given node. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUbNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1252 * PY_SCIP_CALL(SCIPchgVarUbNode(self._scip, node.scip_node, var.scip_var, ub)) * * def chgVarType(self, Variable var, vtype): # <<<<<<<<<<<<<< * """Changes the type of a variable * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_133chgVarType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_132chgVarType[] = "Changes the type of a variable\n\n :param Variable var: variable to change type of\n :param vtype: new variable type\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_133chgVarType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_vtype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_vtype,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarType", 1, 2, 2, 1); __PYX_ERR(3, 1252, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarType") < 0)) __PYX_ERR(3, 1252, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_vtype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1252, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1252, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_132chgVarType(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_vtype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_132chgVarType(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_vtype) { SCIP_Bool __pyx_v_infeasible; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarType", 0); /* "pyscipopt/scip.pyx":1260 * """ * cdef SCIP_Bool infeasible * if vtype in ['C', 'CONTINUOUS']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_CONTINUOUS, &infeasible)) * elif vtype in ['B', 'BINARY']: */ __Pyx_INCREF(__pyx_v_vtype); __pyx_t_1 = __pyx_v_vtype; __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 1260, __pyx_L1_error) if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_CONTINUOUS, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 1260, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pyscipopt/scip.pyx":1261 * cdef SCIP_Bool infeasible * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_CONTINUOUS, &infeasible)) # <<<<<<<<<<<<<< * elif vtype in ['B', 'BINARY']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarType(__pyx_v_self->_scip, __pyx_v_var->scip_var, SCIP_VARTYPE_CONTINUOUS, (&__pyx_v_infeasible))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1260 * """ * cdef SCIP_Bool infeasible * if vtype in ['C', 'CONTINUOUS']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_CONTINUOUS, &infeasible)) * elif vtype in ['B', 'BINARY']: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1262 * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_CONTINUOUS, &infeasible)) * elif vtype in ['B', 'BINARY']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) * elif vtype in ['I', 'INTEGER']: */ __Pyx_INCREF(__pyx_v_vtype); __pyx_t_1 = __pyx_v_vtype; __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_B, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 1262, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_BINARY, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 1262, __pyx_L1_error) __pyx_t_3 = __pyx_t_2; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1263 * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_CONTINUOUS, &infeasible)) * elif vtype in ['B', 'BINARY']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) # <<<<<<<<<<<<<< * elif vtype in ['I', 'INTEGER']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_INTEGER, &infeasible)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarType(__pyx_v_self->_scip, __pyx_v_var->scip_var, SCIP_VARTYPE_BINARY, (&__pyx_v_infeasible))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1262 * if vtype in ['C', 'CONTINUOUS']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_CONTINUOUS, &infeasible)) * elif vtype in ['B', 'BINARY']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) * elif vtype in ['I', 'INTEGER']: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1264 * elif vtype in ['B', 'BINARY']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) * elif vtype in ['I', 'INTEGER']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_INTEGER, &infeasible)) * else: */ __Pyx_INCREF(__pyx_v_vtype); __pyx_t_1 = __pyx_v_vtype; __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_I, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 1264, __pyx_L1_error) if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L8_bool_binop_done; } __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_INTEGER, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 1264, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L8_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (likely(__pyx_t_3)) { /* "pyscipopt/scip.pyx":1265 * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) * elif vtype in ['I', 'INTEGER']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_INTEGER, &infeasible)) # <<<<<<<<<<<<<< * else: * raise Warning("unrecognized variable type") */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarType(__pyx_v_self->_scip, __pyx_v_var->scip_var, SCIP_VARTYPE_INTEGER, (&__pyx_v_infeasible))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1264 * elif vtype in ['B', 'BINARY']: * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_BINARY, &infeasible)) * elif vtype in ['I', 'INTEGER']: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_INTEGER, &infeasible)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1267 * PY_SCIP_CALL(SCIPchgVarType(self._scip, var.scip_var, SCIP_VARTYPE_INTEGER, &infeasible)) * else: * raise Warning("unrecognized variable type") # <<<<<<<<<<<<<< * if infeasible: * print('could not change variable type of variable %s' % var) */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 1267, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":1268 * else: * raise Warning("unrecognized variable type") * if infeasible: # <<<<<<<<<<<<<< * print('could not change variable type of variable %s' % var) * */ __pyx_t_3 = (__pyx_v_infeasible != 0); if (__pyx_t_3) { /* "pyscipopt/scip.pyx":1269 * raise Warning("unrecognized variable type") * if infeasible: * print('could not change variable type of variable %s' % var) # <<<<<<<<<<<<<< * * def getVars(self, transformed=False): */ __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_could_not_change_variable_type_o, ((PyObject *)__pyx_v_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":1268 * else: * raise Warning("unrecognized variable type") * if infeasible: # <<<<<<<<<<<<<< * print('could not change variable type of variable %s' % var) * */ } /* "pyscipopt/scip.pyx":1252 * PY_SCIP_CALL(SCIPchgVarUbNode(self._scip, node.scip_node, var.scip_var, ub)) * * def chgVarType(self, Variable var, vtype): # <<<<<<<<<<<<<< * """Changes the type of a variable * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1271 * print('could not change variable type of variable %s' % var) * * def getVars(self, transformed=False): # <<<<<<<<<<<<<< * """Retrieve all variables. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_135getVars(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_134getVars[] = "Retrieve all variables.\n\n :param transformed: get transformed variables instead of original (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_135getVars(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_transformed = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVars (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transformed,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transformed); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVars") < 0)) __PYX_ERR(3, 1271, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_transformed = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getVars", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1271, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getVars", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_134getVars(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_transformed); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_134getVars(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_transformed) { SCIP_VAR **__pyx_v__vars; int __pyx_v__nvars; CYTHON_UNUSED PyObject *__pyx_v_vars = NULL; int __pyx_9genexpr11__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVars", 0); /* "pyscipopt/scip.pyx":1280 * cdef SCIP_VAR* _var * cdef int _nvars * vars = [] # <<<<<<<<<<<<<< * * if transformed: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_vars = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1282 * vars = [] * * if transformed: # <<<<<<<<<<<<<< * _vars = SCIPgetVars(self._scip) * _nvars = SCIPgetNVars(self._scip) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_transformed); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 1282, __pyx_L1_error) if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1283 * * if transformed: * _vars = SCIPgetVars(self._scip) # <<<<<<<<<<<<<< * _nvars = SCIPgetNVars(self._scip) * else: */ __pyx_v__vars = SCIPgetVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":1284 * if transformed: * _vars = SCIPgetVars(self._scip) * _nvars = SCIPgetNVars(self._scip) # <<<<<<<<<<<<<< * else: * _vars = SCIPgetOrigVars(self._scip) */ __pyx_v__nvars = SCIPgetNVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":1282 * vars = [] * * if transformed: # <<<<<<<<<<<<<< * _vars = SCIPgetVars(self._scip) * _nvars = SCIPgetNVars(self._scip) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1286 * _nvars = SCIPgetNVars(self._scip) * else: * _vars = SCIPgetOrigVars(self._scip) # <<<<<<<<<<<<<< * _nvars = SCIPgetNOrigVars(self._scip) * */ /*else*/ { __pyx_v__vars = SCIPgetOrigVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":1287 * else: * _vars = SCIPgetOrigVars(self._scip) * _nvars = SCIPgetNOrigVars(self._scip) # <<<<<<<<<<<<<< * * return [Variable.create(_vars[i]) for i in range(_nvars)] */ __pyx_v__nvars = SCIPgetNOrigVars(__pyx_v_self->_scip); } __pyx_L3:; /* "pyscipopt/scip.pyx":1289 * _nvars = SCIPgetNOrigVars(self._scip) * * return [Variable.create(_vars[i]) for i in range(_nvars)] # <<<<<<<<<<<<<< * * def getNVars(self): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v__nvars; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_9genexpr11__pyx_v_i = __pyx_t_5; __pyx_t_6 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v__vars[__pyx_9genexpr11__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(3, 1289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1271 * print('could not change variable type of variable %s' % var) * * def getVars(self, transformed=False): # <<<<<<<<<<<<<< * """Retrieve all variables. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.getVars", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_vars); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1291 * return [Variable.create(_vars[i]) for i in range(_nvars)] * * def getNVars(self): # <<<<<<<<<<<<<< * """Retrieve number of variables in the problems""" * return SCIPgetNVars(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_137getNVars(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_136getNVars[] = "Retrieve number of variables in the problems"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_137getNVars(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNVars (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_136getNVars(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_136getNVars(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNVars", 0); /* "pyscipopt/scip.pyx":1293 * def getNVars(self): * """Retrieve number of variables in the problems""" * return SCIPgetNVars(self._scip) # <<<<<<<<<<<<<< * * def getNConss(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNVars(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1291 * return [Variable.create(_vars[i]) for i in range(_nvars)] * * def getNVars(self): # <<<<<<<<<<<<<< * """Retrieve number of variables in the problems""" * return SCIPgetNVars(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNVars", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1295 * return SCIPgetNVars(self._scip) * * def getNConss(self): # <<<<<<<<<<<<<< * """Retrieve the number of constraints.""" * return SCIPgetNConss(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_139getNConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_138getNConss[] = "Retrieve the number of constraints."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_139getNConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNConss (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_138getNConss(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_138getNConss(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNConss", 0); /* "pyscipopt/scip.pyx":1297 * def getNConss(self): * """Retrieve the number of constraints.""" * return SCIPgetNConss(self._scip) # <<<<<<<<<<<<<< * * def updateNodeLowerbound(self, Node node, lb): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNConss(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1295 * return SCIPgetNVars(self._scip) * * def getNConss(self): # <<<<<<<<<<<<<< * """Retrieve the number of constraints.""" * return SCIPgetNConss(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNConss", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1299 * return SCIPgetNConss(self._scip) * * def updateNodeLowerbound(self, Node node, lb): # <<<<<<<<<<<<<< * """if given value is larger than the node's lower bound (in transformed problem), * sets the node's lower bound to the new value */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_141updateNodeLowerbound(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_140updateNodeLowerbound[] = "if given value is larger than the node's lower bound (in transformed problem),\n sets the node's lower bound to the new value\n\n :param node: Node, the node to update\n :param newbound: float, new bound (if greater) for the node\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_141updateNodeLowerbound(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node = 0; PyObject *__pyx_v_lb = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("updateNodeLowerbound (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_node,&__pyx_n_s_lb,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("updateNodeLowerbound", 1, 2, 2, 1); __PYX_ERR(3, 1299, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateNodeLowerbound") < 0)) __PYX_ERR(3, 1299, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_node = ((struct __pyx_obj_9pyscipopt_4scip_Node *)values[0]); __pyx_v_lb = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("updateNodeLowerbound", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1299, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.updateNodeLowerbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_9pyscipopt_4scip_Node, 1, "node", 0))) __PYX_ERR(3, 1299, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_140updateNodeLowerbound(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_node, __pyx_v_lb); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_140updateNodeLowerbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, PyObject *__pyx_v_lb) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("updateNodeLowerbound", 0); /* "pyscipopt/scip.pyx":1307 * * """ * PY_SCIP_CALL(SCIPupdateNodeLowerbound(self._scip, node.scip_node, lb)) # <<<<<<<<<<<<<< * * # LP Methods */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_lb); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1307, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPupdateNodeLowerbound(__pyx_v_self->_scip, __pyx_v_node->scip_node, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1299 * return SCIPgetNConss(self._scip) * * def updateNodeLowerbound(self, Node node, lb): # <<<<<<<<<<<<<< * """if given value is larger than the node's lower bound (in transformed problem), * sets the node's lower bound to the new value */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.updateNodeLowerbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1310 * * # LP Methods * def getLPSolstat(self): # <<<<<<<<<<<<<< * """Gets solution status of current LP""" * return SCIPgetLPSolstat(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_143getLPSolstat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_142getLPSolstat[] = "Gets solution status of current LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_143getLPSolstat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPSolstat (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_142getLPSolstat(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_142getLPSolstat(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPSolstat", 0); /* "pyscipopt/scip.pyx":1312 * def getLPSolstat(self): * """Gets solution status of current LP""" * return SCIPgetLPSolstat(self._scip) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIPgetLPSolstat(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1310 * * # LP Methods * def getLPSolstat(self): # <<<<<<<<<<<<<< * """Gets solution status of current LP""" * return SCIPgetLPSolstat(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPSolstat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1315 * * * def constructLP(self): # <<<<<<<<<<<<<< * """makes sure that the LP of the current node is loaded and * may be accessed through the LP information methods */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_145constructLP(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_144constructLP[] = "makes sure that the LP of the current node is loaded and\n may be accessed through the LP information methods\n\n :return: bool cutoff, i.e. can the node be cut off?\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_145constructLP(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("constructLP (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_144constructLP(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_144constructLP(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_Bool __pyx_v_cutoff; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("constructLP", 0); /* "pyscipopt/scip.pyx":1323 * """ * cdef SCIP_Bool cutoff * PY_SCIP_CALL(SCIPconstructLP(self._scip, &cutoff)) # <<<<<<<<<<<<<< * return cutoff * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPconstructLP(__pyx_v_self->_scip, (&__pyx_v_cutoff))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1324 * cdef SCIP_Bool cutoff * PY_SCIP_CALL(SCIPconstructLP(self._scip, &cutoff)) * return cutoff # <<<<<<<<<<<<<< * * def getLPObjVal(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_cutoff); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1315 * * * def constructLP(self): # <<<<<<<<<<<<<< * """makes sure that the LP of the current node is loaded and * may be accessed through the LP information methods */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.constructLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1326 * return cutoff * * def getLPObjVal(self): # <<<<<<<<<<<<<< * """gets objective value of current LP (which is the sum of column and loose objective value)""" * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_147getLPObjVal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_146getLPObjVal[] = "gets objective value of current LP (which is the sum of column and loose objective value)"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_147getLPObjVal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPObjVal (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_146getLPObjVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_146getLPObjVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPObjVal", 0); /* "pyscipopt/scip.pyx":1329 * """gets objective value of current LP (which is the sum of column and loose objective value)""" * * return SCIPgetLPObjval(self._scip) # <<<<<<<<<<<<<< * * def getLPColsData(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetLPObjval(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1326 * return cutoff * * def getLPObjVal(self): # <<<<<<<<<<<<<< * """gets objective value of current LP (which is the sum of column and loose objective value)""" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPObjVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1331 * return SCIPgetLPObjval(self._scip) * * def getLPColsData(self): # <<<<<<<<<<<<<< * """Retrieve current LP columns""" * cdef SCIP_COL** cols */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_149getLPColsData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_148getLPColsData[] = "Retrieve current LP columns"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_149getLPColsData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPColsData (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_148getLPColsData(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_148getLPColsData(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_COL **__pyx_v_cols; int __pyx_v_ncols; int __pyx_9genexpr12__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPColsData", 0); /* "pyscipopt/scip.pyx":1336 * cdef int ncols * * PY_SCIP_CALL(SCIPgetLPColsData(self._scip, &cols, &ncols)) # <<<<<<<<<<<<<< * return [Column.create(cols[i]) for i in range(ncols)] * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPColsData(__pyx_v_self->_scip, (&__pyx_v_cols), (&__pyx_v_ncols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1337 * * PY_SCIP_CALL(SCIPgetLPColsData(self._scip, &cols, &ncols)) * return [Column.create(cols[i]) for i in range(ncols)] # <<<<<<<<<<<<<< * * def getLPRowsData(self): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_ncols; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr12__pyx_v_i = __pyx_t_7; __pyx_t_2 = __pyx_f_9pyscipopt_4scip_6Column_create((__pyx_v_cols[__pyx_9genexpr12__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 1337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1331 * return SCIPgetLPObjval(self._scip) * * def getLPColsData(self): # <<<<<<<<<<<<<< * """Retrieve current LP columns""" * cdef SCIP_COL** cols */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPColsData", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1339 * return [Column.create(cols[i]) for i in range(ncols)] * * def getLPRowsData(self): # <<<<<<<<<<<<<< * """Retrieve current LP rows""" * cdef SCIP_ROW** rows */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_151getLPRowsData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_150getLPRowsData[] = "Retrieve current LP rows"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_151getLPRowsData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPRowsData (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_150getLPRowsData(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_150getLPRowsData(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_ROW **__pyx_v_rows; int __pyx_v_nrows; int __pyx_9genexpr13__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPRowsData", 0); /* "pyscipopt/scip.pyx":1344 * cdef int nrows * * PY_SCIP_CALL(SCIPgetLPRowsData(self._scip, &rows, &nrows)) # <<<<<<<<<<<<<< * return [Row.create(rows[i]) for i in range(nrows)] * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPRowsData(__pyx_v_self->_scip, (&__pyx_v_rows), (&__pyx_v_nrows))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1345 * * PY_SCIP_CALL(SCIPgetLPRowsData(self._scip, &rows, &nrows)) * return [Row.create(rows[i]) for i in range(nrows)] # <<<<<<<<<<<<<< * * def getNLPRows(self): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_nrows; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr13__pyx_v_i = __pyx_t_7; __pyx_t_2 = __pyx_f_9pyscipopt_4scip_3Row_create((__pyx_v_rows[__pyx_9genexpr13__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 1345, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1339 * return [Column.create(cols[i]) for i in range(ncols)] * * def getLPRowsData(self): # <<<<<<<<<<<<<< * """Retrieve current LP rows""" * cdef SCIP_ROW** rows */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPRowsData", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1347 * return [Row.create(rows[i]) for i in range(nrows)] * * def getNLPRows(self): # <<<<<<<<<<<<<< * """Retrieve the number of rows currently in the LP""" * return SCIPgetNLPRows(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_153getNLPRows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_152getNLPRows[] = "Retrieve the number of rows currently in the LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_153getNLPRows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNLPRows (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_152getNLPRows(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_152getNLPRows(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNLPRows", 0); /* "pyscipopt/scip.pyx":1349 * def getNLPRows(self): * """Retrieve the number of rows currently in the LP""" * return SCIPgetNLPRows(self._scip) # <<<<<<<<<<<<<< * * def getNLPCols(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNLPRows(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1347 * return [Row.create(rows[i]) for i in range(nrows)] * * def getNLPRows(self): # <<<<<<<<<<<<<< * """Retrieve the number of rows currently in the LP""" * return SCIPgetNLPRows(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNLPRows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1351 * return SCIPgetNLPRows(self._scip) * * def getNLPCols(self): # <<<<<<<<<<<<<< * """Retrieve the number of cols currently in the LP""" * return SCIPgetNLPCols(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_155getNLPCols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_154getNLPCols[] = "Retrieve the number of cols currently in the LP"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_155getNLPCols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNLPCols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_154getNLPCols(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_154getNLPCols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNLPCols", 0); /* "pyscipopt/scip.pyx":1353 * def getNLPCols(self): * """Retrieve the number of cols currently in the LP""" * return SCIPgetNLPCols(self._scip) # <<<<<<<<<<<<<< * * def getLPBasisInd(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNLPCols(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1351 * return SCIPgetNLPRows(self._scip) * * def getNLPCols(self): # <<<<<<<<<<<<<< * """Retrieve the number of cols currently in the LP""" * return SCIPgetNLPCols(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNLPCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1355 * return SCIPgetNLPCols(self._scip) * * def getLPBasisInd(self): # <<<<<<<<<<<<<< * """Gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * cdef int nrows = SCIPgetNLPRows(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_157getLPBasisInd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_156getLPBasisInd[] = "Gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_157getLPBasisInd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPBasisInd (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_156getLPBasisInd(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_156getLPBasisInd(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { int __pyx_v_nrows; int *__pyx_v_inds; PyObject *__pyx_v_result = NULL; int __pyx_9genexpr14__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPBasisInd", 0); /* "pyscipopt/scip.pyx":1357 * def getLPBasisInd(self): * """Gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * cdef int nrows = SCIPgetNLPRows(self._scip) # <<<<<<<<<<<<<< * cdef int* inds = <int *> malloc(nrows * sizeof(int)) * */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":1358 * """Gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * cdef int nrows = SCIPgetNLPRows(self._scip) * cdef int* inds = <int *> malloc(nrows * sizeof(int)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPgetLPBasisInd(self._scip, inds)) */ __pyx_v_inds = ((int *)malloc((__pyx_v_nrows * (sizeof(int))))); /* "pyscipopt/scip.pyx":1360 * cdef int* inds = <int *> malloc(nrows * sizeof(int)) * * PY_SCIP_CALL(SCIPgetLPBasisInd(self._scip, inds)) # <<<<<<<<<<<<<< * result = [inds[i] for i in range(nrows)] * free(inds) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPBasisInd(__pyx_v_self->_scip, __pyx_v_inds)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1361 * * PY_SCIP_CALL(SCIPgetLPBasisInd(self._scip, inds)) * result = [inds[i] for i in range(nrows)] # <<<<<<<<<<<<<< * free(inds) * return result */ { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_nrows; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr14__pyx_v_i = __pyx_t_7; __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_inds[__pyx_9genexpr14__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 1361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1362 * PY_SCIP_CALL(SCIPgetLPBasisInd(self._scip, inds)) * result = [inds[i] for i in range(nrows)] * free(inds) # <<<<<<<<<<<<<< * return result * */ free(__pyx_v_inds); /* "pyscipopt/scip.pyx":1363 * result = [inds[i] for i in range(nrows)] * free(inds) * return result # <<<<<<<<<<<<<< * * def getLPBInvRow(self, row): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pyscipopt/scip.pyx":1355 * return SCIPgetNLPCols(self._scip) * * def getLPBasisInd(self): # <<<<<<<<<<<<<< * """Gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1""" * cdef int nrows = SCIPgetNLPRows(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPBasisInd", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1365 * return result * * def getLPBInvRow(self, row): # <<<<<<<<<<<<<< * """gets a row from the inverse basis matrix B^-1""" * # TODO: sparsity information */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_159getLPBInvRow(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_158getLPBInvRow[] = "gets a row from the inverse basis matrix B^-1"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_159getLPBInvRow(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPBInvRow (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_158getLPBInvRow(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_row)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_158getLPBInvRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_v_nrows; SCIP_Real *__pyx_v_coefs; PyObject *__pyx_v_result = NULL; int __pyx_9genexpr15__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPBInvRow", 0); /* "pyscipopt/scip.pyx":1368 * """gets a row from the inverse basis matrix B^-1""" * # TODO: sparsity information * cdef int nrows = SCIPgetNLPRows(self._scip) # <<<<<<<<<<<<<< * cdef SCIP_Real* coefs = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":1369 * # TODO: sparsity information * cdef int nrows = SCIPgetNLPRows(self._scip) * cdef SCIP_Real* coefs = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPgetLPBInvRow(self._scip, row, coefs, NULL, NULL)) */ __pyx_v_coefs = ((SCIP_Real *)malloc((__pyx_v_nrows * (sizeof(SCIP_Real))))); /* "pyscipopt/scip.pyx":1371 * cdef SCIP_Real* coefs = <SCIP_Real*> malloc(nrows * sizeof(SCIP_Real)) * * PY_SCIP_CALL(SCIPgetLPBInvRow(self._scip, row, coefs, NULL, NULL)) # <<<<<<<<<<<<<< * result = [coefs[i] for i in range(nrows)] * free(coefs) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_row); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1371, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPBInvRow(__pyx_v_self->_scip, __pyx_t_3, __pyx_v_coefs, NULL, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1372 * * PY_SCIP_CALL(SCIPgetLPBInvRow(self._scip, row, coefs, NULL, NULL)) * result = [coefs[i] for i in range(nrows)] # <<<<<<<<<<<<<< * free(coefs) * return result */ { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_nrows; __pyx_t_6 = __pyx_t_3; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr15__pyx_v_i = __pyx_t_7; __pyx_t_2 = PyFloat_FromDouble((__pyx_v_coefs[__pyx_9genexpr15__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 1372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1373 * PY_SCIP_CALL(SCIPgetLPBInvRow(self._scip, row, coefs, NULL, NULL)) * result = [coefs[i] for i in range(nrows)] * free(coefs) # <<<<<<<<<<<<<< * return result * */ free(__pyx_v_coefs); /* "pyscipopt/scip.pyx":1374 * result = [coefs[i] for i in range(nrows)] * free(coefs) * return result # <<<<<<<<<<<<<< * * def getLPBInvARow(self, row): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pyscipopt/scip.pyx":1365 * return result * * def getLPBInvRow(self, row): # <<<<<<<<<<<<<< * """gets a row from the inverse basis matrix B^-1""" * # TODO: sparsity information */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPBInvRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1376 * return result * * def getLPBInvARow(self, row): # <<<<<<<<<<<<<< * """gets a row from B^-1 * A""" * # TODO: sparsity information */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_161getLPBInvARow(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_160getLPBInvARow[] = "gets a row from B^-1 * A"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_161getLPBInvARow(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPBInvARow (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_160getLPBInvARow(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_row)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_160getLPBInvARow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_v_ncols; SCIP_Real *__pyx_v_coefs; PyObject *__pyx_v_result = NULL; int __pyx_9genexpr16__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPBInvARow", 0); /* "pyscipopt/scip.pyx":1379 * """gets a row from B^-1 * A""" * # TODO: sparsity information * cdef int ncols = SCIPgetNLPCols(self._scip) # <<<<<<<<<<<<<< * cdef SCIP_Real* coefs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * */ __pyx_v_ncols = SCIPgetNLPCols(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":1380 * # TODO: sparsity information * cdef int ncols = SCIPgetNLPCols(self._scip) * cdef SCIP_Real* coefs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPgetLPBInvARow(self._scip, row, NULL, coefs, NULL, NULL)) */ __pyx_v_coefs = ((SCIP_Real *)malloc((__pyx_v_ncols * (sizeof(SCIP_Real))))); /* "pyscipopt/scip.pyx":1382 * cdef SCIP_Real* coefs = <SCIP_Real*> malloc(ncols * sizeof(SCIP_Real)) * * PY_SCIP_CALL(SCIPgetLPBInvARow(self._scip, row, NULL, coefs, NULL, NULL)) # <<<<<<<<<<<<<< * result = [coefs[i] for i in range(ncols)] * free(coefs) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_row); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1382, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPBInvARow(__pyx_v_self->_scip, __pyx_t_3, NULL, __pyx_v_coefs, NULL, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1383 * * PY_SCIP_CALL(SCIPgetLPBInvARow(self._scip, row, NULL, coefs, NULL, NULL)) * result = [coefs[i] for i in range(ncols)] # <<<<<<<<<<<<<< * free(coefs) * return result */ { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_ncols; __pyx_t_6 = __pyx_t_3; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr16__pyx_v_i = __pyx_t_7; __pyx_t_2 = PyFloat_FromDouble((__pyx_v_coefs[__pyx_9genexpr16__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 1383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1384 * PY_SCIP_CALL(SCIPgetLPBInvARow(self._scip, row, NULL, coefs, NULL, NULL)) * result = [coefs[i] for i in range(ncols)] * free(coefs) # <<<<<<<<<<<<<< * return result * */ free(__pyx_v_coefs); /* "pyscipopt/scip.pyx":1385 * result = [coefs[i] for i in range(ncols)] * free(coefs) * return result # <<<<<<<<<<<<<< * * def isLPSolBasic(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pyscipopt/scip.pyx":1376 * return result * * def getLPBInvARow(self, row): # <<<<<<<<<<<<<< * """gets a row from B^-1 * A""" * # TODO: sparsity information */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPBInvARow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1387 * return result * * def isLPSolBasic(self): # <<<<<<<<<<<<<< * """returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis""" * return SCIPisLPSolBasic(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_163isLPSolBasic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_162isLPSolBasic[] = "returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_163isLPSolBasic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isLPSolBasic (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_162isLPSolBasic(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_162isLPSolBasic(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isLPSolBasic", 0); /* "pyscipopt/scip.pyx":1389 * def isLPSolBasic(self): * """returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis""" * return SCIPisLPSolBasic(self._scip) # <<<<<<<<<<<<<< * * #TODO: documentation!! */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPisLPSolBasic(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1387 * return result * * def isLPSolBasic(self): # <<<<<<<<<<<<<< * """returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis""" * return SCIPisLPSolBasic(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.isLPSolBasic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1393 * #TODO: documentation!! * # LP Row Methods * def createEmptyRowSepa(self, Sepa sepa, name="row", lhs = 0.0, rhs = None, local = True, modifiable = False, removable = True): # <<<<<<<<<<<<<< * """creates and captures an LP row without any coefficients from a separator * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_165createEmptyRowSepa(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_164createEmptyRowSepa[] = "creates and captures an LP row without any coefficients from a separator\n\n :param sepa: separator that creates the row\n :param name: name of row (Default value = \"row\")\n :param lhs: left hand side of row (Default value = 0)\n :param rhs: right hand side of row (Default value = None)\n :param local: is row only valid locally? (Default value = True)\n :param modifiable: is row modifiable during node processing (subject to column generation)? (Default value = False)\n :param removable: should the row be removed from the LP due to aging or cleanup? (Default value = True)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_165createEmptyRowSepa(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_sepa = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_rhs = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_removable = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createEmptyRowSepa (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sepa,&__pyx_n_s_name,&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_removable,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = ((PyObject *)__pyx_n_u_row); values[2] = ((PyObject *)__pyx_float_0_0); values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_False); values[6] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sepa)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createEmptyRowSepa") < 0)) __PYX_ERR(3, 1393, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)values[0]); __pyx_v_name = values[1]; __pyx_v_lhs = values[2]; __pyx_v_rhs = values[3]; __pyx_v_local = values[4]; __pyx_v_modifiable = values[5]; __pyx_v_removable = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("createEmptyRowSepa", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1393, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.createEmptyRowSepa", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sepa), __pyx_ptype_9pyscipopt_4scip_Sepa, 1, "sepa", 0))) __PYX_ERR(3, 1393, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_164createEmptyRowSepa(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_sepa, __pyx_v_name, __pyx_v_lhs, __pyx_v_rhs, __pyx_v_local, __pyx_v_modifiable, __pyx_v_removable); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_164createEmptyRowSepa(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_sepa, PyObject *__pyx_v_name, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_removable) { SCIP_ROW *__pyx_v_row; SCIP_SEPA *__pyx_v_scip_sepa; PyObject *__pyx_v_PyRow = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; char const *__pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; char const *__pyx_t_8; SCIP_Real __pyx_t_9; SCIP_Real __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createEmptyRowSepa", 0); __Pyx_INCREF(__pyx_v_lhs); __Pyx_INCREF(__pyx_v_rhs); /* "pyscipopt/scip.pyx":1405 * """ * cdef SCIP_ROW* row * lhs = -SCIPinfinity(self._scip) if lhs is None else lhs # <<<<<<<<<<<<<< * rhs = SCIPinfinity(self._scip) if rhs is None else rhs * scip_sepa = SCIPfindSepa(self._scip, str_conversion(sepa.name)) */ __pyx_t_2 = (__pyx_v_lhs == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_v_lhs); __pyx_t_1 = __pyx_v_lhs; } __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1406 * cdef SCIP_ROW* row * lhs = -SCIPinfinity(self._scip) if lhs is None else lhs * rhs = SCIPinfinity(self._scip) if rhs is None else rhs # <<<<<<<<<<<<<< * scip_sepa = SCIPfindSepa(self._scip, str_conversion(sepa.name)) * PY_SCIP_CALL(SCIPcreateEmptyRowSepa(self._scip, &row, scip_sepa, str_conversion(name), lhs, rhs, local, modifiable, removable)) */ __pyx_t_2 = (__pyx_v_rhs == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_v_rhs); __pyx_t_1 = __pyx_v_rhs; } __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1407 * lhs = -SCIPinfinity(self._scip) if lhs is None else lhs * rhs = SCIPinfinity(self._scip) if rhs is None else rhs * scip_sepa = SCIPfindSepa(self._scip, str_conversion(sepa.name)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateEmptyRowSepa(self._scip, &row, scip_sepa, str_conversion(name), lhs, rhs, local, modifiable, removable)) * PyRow = Row.create(row) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sepa->name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sepa->name); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 1407, __pyx_L1_error) __pyx_v_scip_sepa = SCIPfindSepa(__pyx_v_self->_scip, __pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1408 * rhs = SCIPinfinity(self._scip) if rhs is None else rhs * scip_sepa = SCIPfindSepa(self._scip, str_conversion(sepa.name)) * PY_SCIP_CALL(SCIPcreateEmptyRowSepa(self._scip, &row, scip_sepa, str_conversion(name), lhs, rhs, local, modifiable, removable)) # <<<<<<<<<<<<<< * PyRow = Row.create(row) * return PyRow */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1408, __pyx_L1_error) __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_lhs); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1408, __pyx_L1_error) __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_10 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1408, __pyx_L1_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1408, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_modifiable); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1408, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1408, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateEmptyRowSepa(__pyx_v_self->_scip, (&__pyx_v_row), __pyx_v_scip_sepa, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1409 * scip_sepa = SCIPfindSepa(self._scip, str_conversion(sepa.name)) * PY_SCIP_CALL(SCIPcreateEmptyRowSepa(self._scip, &row, scip_sepa, str_conversion(name), lhs, rhs, local, modifiable, removable)) * PyRow = Row.create(row) # <<<<<<<<<<<<<< * return PyRow * */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_3Row_create(__pyx_v_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyRow = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1410 * PY_SCIP_CALL(SCIPcreateEmptyRowSepa(self._scip, &row, scip_sepa, str_conversion(name), lhs, rhs, local, modifiable, removable)) * PyRow = Row.create(row) * return PyRow # <<<<<<<<<<<<<< * * def createEmptyRowUnspec(self, name="row", lhs = 0.0, rhs = None, local = True, modifiable = False, removable = True): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_PyRow); __pyx_r = __pyx_v_PyRow; goto __pyx_L0; /* "pyscipopt/scip.pyx":1393 * #TODO: documentation!! * # LP Row Methods * def createEmptyRowSepa(self, Sepa sepa, name="row", lhs = 0.0, rhs = None, local = True, modifiable = False, removable = True): # <<<<<<<<<<<<<< * """creates and captures an LP row without any coefficients from a separator * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.createEmptyRowSepa", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_PyRow); __Pyx_XDECREF(__pyx_v_lhs); __Pyx_XDECREF(__pyx_v_rhs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1412 * return PyRow * * def createEmptyRowUnspec(self, name="row", lhs = 0.0, rhs = None, local = True, modifiable = False, removable = True): # <<<<<<<<<<<<<< * """creates and captures an LP row without any coefficients from an unspecified source * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_167createEmptyRowUnspec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_166createEmptyRowUnspec[] = "creates and captures an LP row without any coefficients from an unspecified source\n\n :param name: name of row (Default value = \"row\")\n :param lhs: left hand side of row (Default value = 0)\n :param rhs: right hand side of row (Default value = None)\n :param local: is row only valid locally? (Default value = True)\n :param modifiable: is row modifiable during node processing (subject to column generation)? (Default value = False)\n :param removable: should the row be removed from the LP due to aging or cleanup? (Default value = True)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_167createEmptyRowUnspec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_rhs = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_removable = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createEmptyRowUnspec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_removable,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[0] = ((PyObject *)__pyx_n_u_row); values[1] = ((PyObject *)__pyx_float_0_0); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_False); values[5] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createEmptyRowUnspec") < 0)) __PYX_ERR(3, 1412, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = values[0]; __pyx_v_lhs = values[1]; __pyx_v_rhs = values[2]; __pyx_v_local = values[3]; __pyx_v_modifiable = values[4]; __pyx_v_removable = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("createEmptyRowUnspec", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1412, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.createEmptyRowUnspec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_166createEmptyRowUnspec(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_lhs, __pyx_v_rhs, __pyx_v_local, __pyx_v_modifiable, __pyx_v_removable); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_166createEmptyRowUnspec(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_removable) { SCIP_ROW *__pyx_v_row; PyObject *__pyx_v_PyRow = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; char const *__pyx_t_7; SCIP_Real __pyx_t_8; SCIP_Real __pyx_t_9; SCIP_Bool __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createEmptyRowUnspec", 0); __Pyx_INCREF(__pyx_v_lhs); __Pyx_INCREF(__pyx_v_rhs); /* "pyscipopt/scip.pyx":1423 * """ * cdef SCIP_ROW* row * lhs = -SCIPinfinity(self._scip) if lhs is None else lhs # <<<<<<<<<<<<<< * rhs = SCIPinfinity(self._scip) if rhs is None else rhs * PY_SCIP_CALL(SCIPcreateEmptyRowUnspec(self._scip, &row, str_conversion(name), lhs, rhs, local, modifiable, removable)) */ __pyx_t_2 = (__pyx_v_lhs == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_v_lhs); __pyx_t_1 = __pyx_v_lhs; } __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1424 * cdef SCIP_ROW* row * lhs = -SCIPinfinity(self._scip) if lhs is None else lhs * rhs = SCIPinfinity(self._scip) if rhs is None else rhs # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateEmptyRowUnspec(self._scip, &row, str_conversion(name), lhs, rhs, local, modifiable, removable)) * PyRow = Row.create(row) */ __pyx_t_2 = (__pyx_v_rhs == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_v_rhs); __pyx_t_1 = __pyx_v_rhs; } __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1425 * lhs = -SCIPinfinity(self._scip) if lhs is None else lhs * rhs = SCIPinfinity(self._scip) if rhs is None else rhs * PY_SCIP_CALL(SCIPcreateEmptyRowUnspec(self._scip, &row, str_conversion(name), lhs, rhs, local, modifiable, removable)) # <<<<<<<<<<<<<< * PyRow = Row.create(row) * return PyRow */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(3, 1425, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_lhs); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1425, __pyx_L1_error) __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1425, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1425, __pyx_L1_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_modifiable); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1425, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1425, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateEmptyRowUnspec(__pyx_v_self->_scip, (&__pyx_v_row), __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1426 * rhs = SCIPinfinity(self._scip) if rhs is None else rhs * PY_SCIP_CALL(SCIPcreateEmptyRowUnspec(self._scip, &row, str_conversion(name), lhs, rhs, local, modifiable, removable)) * PyRow = Row.create(row) # <<<<<<<<<<<<<< * return PyRow * */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_3Row_create(__pyx_v_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyRow = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1427 * PY_SCIP_CALL(SCIPcreateEmptyRowUnspec(self._scip, &row, str_conversion(name), lhs, rhs, local, modifiable, removable)) * PyRow = Row.create(row) * return PyRow # <<<<<<<<<<<<<< * * def getRowActivity(self, Row row): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_PyRow); __pyx_r = __pyx_v_PyRow; goto __pyx_L0; /* "pyscipopt/scip.pyx":1412 * return PyRow * * def createEmptyRowUnspec(self, name="row", lhs = 0.0, rhs = None, local = True, modifiable = False, removable = True): # <<<<<<<<<<<<<< * """creates and captures an LP row without any coefficients from an unspecified source * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.createEmptyRowUnspec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_PyRow); __Pyx_XDECREF(__pyx_v_lhs); __Pyx_XDECREF(__pyx_v_rhs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1429 * return PyRow * * def getRowActivity(self, Row row): # <<<<<<<<<<<<<< * """returns the activity of a row in the last LP or pseudo solution""" * return SCIPgetRowActivity(self._scip, row.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_169getRowActivity(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_168getRowActivity[] = "returns the activity of a row in the last LP or pseudo solution"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_169getRowActivity(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRowActivity (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 1429, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_168getRowActivity(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_168getRowActivity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRowActivity", 0); /* "pyscipopt/scip.pyx":1431 * def getRowActivity(self, Row row): * """returns the activity of a row in the last LP or pseudo solution""" * return SCIPgetRowActivity(self._scip, row.scip_row) # <<<<<<<<<<<<<< * * def getRowLPActivity(self, Row row): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetRowActivity(__pyx_v_self->_scip, __pyx_v_row->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1429 * return PyRow * * def getRowActivity(self, Row row): # <<<<<<<<<<<<<< * """returns the activity of a row in the last LP or pseudo solution""" * return SCIPgetRowActivity(self._scip, row.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getRowActivity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1433 * return SCIPgetRowActivity(self._scip, row.scip_row) * * def getRowLPActivity(self, Row row): # <<<<<<<<<<<<<< * """returns the activity of a row in the last LP solution""" * return SCIPgetRowLPActivity(self._scip, row.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_171getRowLPActivity(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_170getRowLPActivity[] = "returns the activity of a row in the last LP solution"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_171getRowLPActivity(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRowLPActivity (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 1433, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_170getRowLPActivity(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_170getRowLPActivity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRowLPActivity", 0); /* "pyscipopt/scip.pyx":1435 * def getRowLPActivity(self, Row row): * """returns the activity of a row in the last LP solution""" * return SCIPgetRowLPActivity(self._scip, row.scip_row) # <<<<<<<<<<<<<< * * # TODO: do we need this? (also do we need release var??) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetRowLPActivity(__pyx_v_self->_scip, __pyx_v_row->scip_row)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1433 * return SCIPgetRowActivity(self._scip, row.scip_row) * * def getRowLPActivity(self, Row row): # <<<<<<<<<<<<<< * """returns the activity of a row in the last LP solution""" * return SCIPgetRowLPActivity(self._scip, row.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getRowLPActivity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1438 * * # TODO: do we need this? (also do we need release var??) * def releaseRow(self, Row row not None): # <<<<<<<<<<<<<< * """decreases usage counter of LP row, and frees memory if necessary""" * PY_SCIP_CALL(SCIPreleaseRow(self._scip, &row.scip_row)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_173releaseRow(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_172releaseRow[] = "decreases usage counter of LP row, and frees memory if necessary"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_173releaseRow(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("releaseRow (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 0, "row", 0))) __PYX_ERR(3, 1438, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_172releaseRow(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_172releaseRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("releaseRow", 0); /* "pyscipopt/scip.pyx":1440 * def releaseRow(self, Row row not None): * """decreases usage counter of LP row, and frees memory if necessary""" * PY_SCIP_CALL(SCIPreleaseRow(self._scip, &row.scip_row)) # <<<<<<<<<<<<<< * * def cacheRowExtensions(self, Row row not None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseRow(__pyx_v_self->_scip, (&__pyx_v_row->scip_row))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1438 * * # TODO: do we need this? (also do we need release var??) * def releaseRow(self, Row row not None): # <<<<<<<<<<<<<< * """decreases usage counter of LP row, and frees memory if necessary""" * PY_SCIP_CALL(SCIPreleaseRow(self._scip, &row.scip_row)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.releaseRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1442 * PY_SCIP_CALL(SCIPreleaseRow(self._scip, &row.scip_row)) * * def cacheRowExtensions(self, Row row not None): # <<<<<<<<<<<<<< * """informs row, that all subsequent additions of variables to the row should be cached and not directly applied; * after all additions were applied, flushRowExtensions() must be called; */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_175cacheRowExtensions(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_174cacheRowExtensions[] = "informs row, that all subsequent additions of variables to the row should be cached and not directly applied;\n after all additions were applied, flushRowExtensions() must be called;\n while the caching of row extensions is activated, information methods of the row give invalid results;\n caching should be used, if a row is build with addVarToRow() calls variable by variable to increase the performance"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_175cacheRowExtensions(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cacheRowExtensions (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 0, "row", 0))) __PYX_ERR(3, 1442, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_174cacheRowExtensions(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_174cacheRowExtensions(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cacheRowExtensions", 0); /* "pyscipopt/scip.pyx":1447 * while the caching of row extensions is activated, information methods of the row give invalid results; * caching should be used, if a row is build with addVarToRow() calls variable by variable to increase the performance""" * PY_SCIP_CALL(SCIPcacheRowExtensions(self._scip, row.scip_row)) # <<<<<<<<<<<<<< * * def flushRowExtensions(self, Row row not None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcacheRowExtensions(__pyx_v_self->_scip, __pyx_v_row->scip_row)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1442 * PY_SCIP_CALL(SCIPreleaseRow(self._scip, &row.scip_row)) * * def cacheRowExtensions(self, Row row not None): # <<<<<<<<<<<<<< * """informs row, that all subsequent additions of variables to the row should be cached and not directly applied; * after all additions were applied, flushRowExtensions() must be called; */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.cacheRowExtensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1449 * PY_SCIP_CALL(SCIPcacheRowExtensions(self._scip, row.scip_row)) * * def flushRowExtensions(self, Row row not None): # <<<<<<<<<<<<<< * """flushes all cached row extensions after a call of cacheRowExtensions() and merges coefficients with equal columns into a single coefficient""" * PY_SCIP_CALL(SCIPflushRowExtensions(self._scip, row.scip_row)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_177flushRowExtensions(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_176flushRowExtensions[] = "flushes all cached row extensions after a call of cacheRowExtensions() and merges coefficients with equal columns into a single coefficient"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_177flushRowExtensions(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("flushRowExtensions (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 0, "row", 0))) __PYX_ERR(3, 1449, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_176flushRowExtensions(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_176flushRowExtensions(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flushRowExtensions", 0); /* "pyscipopt/scip.pyx":1451 * def flushRowExtensions(self, Row row not None): * """flushes all cached row extensions after a call of cacheRowExtensions() and merges coefficients with equal columns into a single coefficient""" * PY_SCIP_CALL(SCIPflushRowExtensions(self._scip, row.scip_row)) # <<<<<<<<<<<<<< * * def addVarToRow(self, Row row not None, Variable var not None, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPflushRowExtensions(__pyx_v_self->_scip, __pyx_v_row->scip_row)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1449 * PY_SCIP_CALL(SCIPcacheRowExtensions(self._scip, row.scip_row)) * * def flushRowExtensions(self, Row row not None): # <<<<<<<<<<<<<< * """flushes all cached row extensions after a call of cacheRowExtensions() and merges coefficients with equal columns into a single coefficient""" * PY_SCIP_CALL(SCIPflushRowExtensions(self._scip, row.scip_row)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.flushRowExtensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1453 * PY_SCIP_CALL(SCIPflushRowExtensions(self._scip, row.scip_row)) * * def addVarToRow(self, Row row not None, Variable var not None, value): # <<<<<<<<<<<<<< * """resolves variable to columns and adds them with the coefficient to the row""" * PY_SCIP_CALL(SCIPaddVarToRow(self._scip, row.scip_row, var.scip_var, value)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_179addVarToRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_178addVarToRow[] = "resolves variable to columns and adds them with the coefficient to the row"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_179addVarToRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addVarToRow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_var,&__pyx_n_s_value,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarToRow", 1, 3, 3, 1); __PYX_ERR(3, 1453, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarToRow", 1, 3, 3, 2); __PYX_ERR(3, 1453, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addVarToRow") < 0)) __PYX_ERR(3, 1453, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_row = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_value = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addVarToRow", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1453, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addVarToRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 0, "row", 0))) __PYX_ERR(3, 1453, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 0, "var", 0))) __PYX_ERR(3, 1453, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_178addVarToRow(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_row, __pyx_v_var, __pyx_v_value); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_178addVarToRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addVarToRow", 0); /* "pyscipopt/scip.pyx":1455 * def addVarToRow(self, Row row not None, Variable var not None, value): * """resolves variable to columns and adds them with the coefficient to the row""" * PY_SCIP_CALL(SCIPaddVarToRow(self._scip, row.scip_row, var.scip_var, value)) # <<<<<<<<<<<<<< * * def printRow(self, Row row not None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1455, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarToRow(__pyx_v_self->_scip, __pyx_v_row->scip_row, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1453 * PY_SCIP_CALL(SCIPflushRowExtensions(self._scip, row.scip_row)) * * def addVarToRow(self, Row row not None, Variable var not None, value): # <<<<<<<<<<<<<< * """resolves variable to columns and adds them with the coefficient to the row""" * PY_SCIP_CALL(SCIPaddVarToRow(self._scip, row.scip_row, var.scip_var, value)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addVarToRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1457 * PY_SCIP_CALL(SCIPaddVarToRow(self._scip, row.scip_row, var.scip_var, value)) * * def printRow(self, Row row not None): # <<<<<<<<<<<<<< * """Prints row.""" * PY_SCIP_CALL(SCIPprintRow(self._scip, row.scip_row, NULL)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_181printRow(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_180printRow[] = "Prints row."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_181printRow(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printRow (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 0, "row", 0))) __PYX_ERR(3, 1457, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_180printRow(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_180printRow(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("printRow", 0); /* "pyscipopt/scip.pyx":1459 * def printRow(self, Row row not None): * """Prints row.""" * PY_SCIP_CALL(SCIPprintRow(self._scip, row.scip_row, NULL)) # <<<<<<<<<<<<<< * * # Cutting Plane Methods */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintRow(__pyx_v_self->_scip, __pyx_v_row->scip_row, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1457 * PY_SCIP_CALL(SCIPaddVarToRow(self._scip, row.scip_row, var.scip_var, value)) * * def printRow(self, Row row not None): # <<<<<<<<<<<<<< * """Prints row.""" * PY_SCIP_CALL(SCIPprintRow(self._scip, row.scip_row, NULL)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.printRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1462 * * # Cutting Plane Methods * def addPoolCut(self, Row row not None): # <<<<<<<<<<<<<< * """if not already existing, adds row to global cut pool""" * PY_SCIP_CALL(SCIPaddPoolCut(self._scip, row.scip_row)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_183addPoolCut(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_182addPoolCut[] = "if not already existing, adds row to global cut pool"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_183addPoolCut(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addPoolCut (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 0, "row", 0))) __PYX_ERR(3, 1462, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_182addPoolCut(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_182addPoolCut(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addPoolCut", 0); /* "pyscipopt/scip.pyx":1464 * def addPoolCut(self, Row row not None): * """if not already existing, adds row to global cut pool""" * PY_SCIP_CALL(SCIPaddPoolCut(self._scip, row.scip_row)) # <<<<<<<<<<<<<< * * def getCutEfficacy(self, Row cut not None, Solution sol = None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddPoolCut(__pyx_v_self->_scip, __pyx_v_row->scip_row)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1462 * * # Cutting Plane Methods * def addPoolCut(self, Row row not None): # <<<<<<<<<<<<<< * """if not already existing, adds row to global cut pool""" * PY_SCIP_CALL(SCIPaddPoolCut(self._scip, row.scip_row)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.addPoolCut", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1466 * PY_SCIP_CALL(SCIPaddPoolCut(self._scip, row.scip_row)) * * def getCutEfficacy(self, Row cut not None, Solution sol = None): # <<<<<<<<<<<<<< * """returns efficacy of the cut with respect to the given primal solution or the current LP solution: e = -feasibility/norm""" * return SCIPgetCutEfficacy(self._scip, NULL if sol is None else sol.sol, cut.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_185getCutEfficacy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_184getCutEfficacy[] = "returns efficacy of the cut with respect to the given primal solution or the current LP solution: e = -feasibility/norm"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_185getCutEfficacy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut = 0; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCutEfficacy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cut,&__pyx_n_s_sol,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cut)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sol); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCutEfficacy") < 0)) __PYX_ERR(3, 1466, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cut = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getCutEfficacy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1466, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getCutEfficacy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cut), __pyx_ptype_9pyscipopt_4scip_Row, 0, "cut", 0))) __PYX_ERR(3, 1466, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "sol", 0))) __PYX_ERR(3, 1466, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_184getCutEfficacy(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cut, __pyx_v_sol); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_184getCutEfficacy(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations void *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCutEfficacy", 0); /* "pyscipopt/scip.pyx":1468 * def getCutEfficacy(self, Row cut not None, Solution sol = None): * """returns efficacy of the cut with respect to the given primal solution or the current LP solution: e = -feasibility/norm""" * return SCIPgetCutEfficacy(self._scip, NULL if sol is None else sol.sol, cut.scip_row) # <<<<<<<<<<<<<< * * def isCutEfficacious(self, Row cut not None, Solution sol = None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = (((PyObject *)__pyx_v_sol) == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = NULL; } else { __pyx_t_1 = __pyx_v_sol->sol; } __pyx_t_3 = PyFloat_FromDouble(SCIPgetCutEfficacy(__pyx_v_self->_scip, __pyx_t_1, __pyx_v_cut->scip_row)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1466 * PY_SCIP_CALL(SCIPaddPoolCut(self._scip, row.scip_row)) * * def getCutEfficacy(self, Row cut not None, Solution sol = None): # <<<<<<<<<<<<<< * """returns efficacy of the cut with respect to the given primal solution or the current LP solution: e = -feasibility/norm""" * return SCIPgetCutEfficacy(self._scip, NULL if sol is None else sol.sol, cut.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.getCutEfficacy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1470 * return SCIPgetCutEfficacy(self._scip, NULL if sol is None else sol.sol, cut.scip_row) * * def isCutEfficacious(self, Row cut not None, Solution sol = None): # <<<<<<<<<<<<<< * """ returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater than the minimal cut efficacy""" * return SCIPisCutEfficacious(self._scip, NULL if sol is None else sol.sol, cut.scip_row) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_187isCutEfficacious(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_186isCutEfficacious[] = " returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater than the minimal cut efficacy"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_187isCutEfficacious(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut = 0; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isCutEfficacious (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cut,&__pyx_n_s_sol,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cut)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sol); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isCutEfficacious") < 0)) __PYX_ERR(3, 1470, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cut = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isCutEfficacious", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1470, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.isCutEfficacious", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cut), __pyx_ptype_9pyscipopt_4scip_Row, 0, "cut", 0))) __PYX_ERR(3, 1470, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "sol", 0))) __PYX_ERR(3, 1470, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_186isCutEfficacious(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cut, __pyx_v_sol); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_186isCutEfficacious(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations void *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isCutEfficacious", 0); /* "pyscipopt/scip.pyx":1472 * def isCutEfficacious(self, Row cut not None, Solution sol = None): * """ returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater than the minimal cut efficacy""" * return SCIPisCutEfficacious(self._scip, NULL if sol is None else sol.sol, cut.scip_row) # <<<<<<<<<<<<<< * * def addCut(self, Row cut not None, forcecut = False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = (((PyObject *)__pyx_v_sol) == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = NULL; } else { __pyx_t_1 = __pyx_v_sol->sol; } __pyx_t_3 = __Pyx_PyBool_FromLong(SCIPisCutEfficacious(__pyx_v_self->_scip, __pyx_t_1, __pyx_v_cut->scip_row)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1470 * return SCIPgetCutEfficacy(self._scip, NULL if sol is None else sol.sol, cut.scip_row) * * def isCutEfficacious(self, Row cut not None, Solution sol = None): # <<<<<<<<<<<<<< * """ returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater than the minimal cut efficacy""" * return SCIPisCutEfficacious(self._scip, NULL if sol is None else sol.sol, cut.scip_row) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.isCutEfficacious", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1474 * return SCIPisCutEfficacious(self._scip, NULL if sol is None else sol.sol, cut.scip_row) * * def addCut(self, Row cut not None, forcecut = False): # <<<<<<<<<<<<<< * """adds cut to separation storage and returns whether cut has been detected to be infeasible for local bounds""" * cdef SCIP_Bool infeasible */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_189addCut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_188addCut[] = "adds cut to separation storage and returns whether cut has been detected to be infeasible for local bounds"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_189addCut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut = 0; PyObject *__pyx_v_forcecut = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addCut (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cut,&__pyx_n_s_forcecut,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cut)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_forcecut); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCut") < 0)) __PYX_ERR(3, 1474, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cut = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_forcecut = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addCut", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1474, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addCut", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cut), __pyx_ptype_9pyscipopt_4scip_Row, 0, "cut", 0))) __PYX_ERR(3, 1474, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_188addCut(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cut, __pyx_v_forcecut); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_188addCut(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_cut, PyObject *__pyx_v_forcecut) { SCIP_Bool __pyx_v_infeasible; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addCut", 0); /* "pyscipopt/scip.pyx":1477 * """adds cut to separation storage and returns whether cut has been detected to be infeasible for local bounds""" * cdef SCIP_Bool infeasible * PY_SCIP_CALL(SCIPaddRow(self._scip, cut.scip_row, forcecut, &infeasible)) # <<<<<<<<<<<<<< * return infeasible * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_forcecut); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1477, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddRow(__pyx_v_self->_scip, __pyx_v_cut->scip_row, __pyx_t_3, (&__pyx_v_infeasible))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1478 * cdef SCIP_Bool infeasible * PY_SCIP_CALL(SCIPaddRow(self._scip, cut.scip_row, forcecut, &infeasible)) * return infeasible # <<<<<<<<<<<<<< * * def getNCuts(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1474 * return SCIPisCutEfficacious(self._scip, NULL if sol is None else sol.sol, cut.scip_row) * * def addCut(self, Row cut not None, forcecut = False): # <<<<<<<<<<<<<< * """adds cut to separation storage and returns whether cut has been detected to be infeasible for local bounds""" * cdef SCIP_Bool infeasible */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addCut", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1480 * return infeasible * * def getNCuts(self): # <<<<<<<<<<<<<< * """Retrieve total number of cuts in storage""" * return SCIPgetNCuts(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_191getNCuts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_190getNCuts[] = "Retrieve total number of cuts in storage"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_191getNCuts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNCuts (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_190getNCuts(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_190getNCuts(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNCuts", 0); /* "pyscipopt/scip.pyx":1482 * def getNCuts(self): * """Retrieve total number of cuts in storage""" * return SCIPgetNCuts(self._scip) # <<<<<<<<<<<<<< * * def getNCutsApplied(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNCuts(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1480 * return infeasible * * def getNCuts(self): # <<<<<<<<<<<<<< * """Retrieve total number of cuts in storage""" * return SCIPgetNCuts(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNCuts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1484 * return SCIPgetNCuts(self._scip) * * def getNCutsApplied(self): # <<<<<<<<<<<<<< * """Retrieve number of currently applied cuts""" * return SCIPgetNCutsApplied(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_193getNCutsApplied(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_192getNCutsApplied[] = "Retrieve number of currently applied cuts"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_193getNCutsApplied(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNCutsApplied (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_192getNCutsApplied(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_192getNCutsApplied(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNCutsApplied", 0); /* "pyscipopt/scip.pyx":1486 * def getNCutsApplied(self): * """Retrieve number of currently applied cuts""" * return SCIPgetNCutsApplied(self._scip) # <<<<<<<<<<<<<< * * # Constraint functions */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNCutsApplied(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1484 * return SCIPgetNCuts(self._scip) * * def getNCutsApplied(self): # <<<<<<<<<<<<<< * """Retrieve number of currently applied cuts""" * return SCIPgetNCutsApplied(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNCutsApplied", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1489 * * # Constraint functions * def addCons(self, cons, name='', initial=True, separate=True, # <<<<<<<<<<<<<< * enforce=True, check=True, propagate=True, local=False, * modifiable=False, dynamic=False, removable=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_195addCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_194addCons[] = "Add a linear or quadratic constraint.\n\n :param cons: list of coefficients\n :param name: the name of the constraint, generic name if empty (Default value = '')\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked during for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param modifiable: is the constraint modifiable (subject to column generation)? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_195addCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cons = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addCons (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)__pyx_kp_u__84); values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1490 * # Constraint functions * def addCons(self, cons, name='', initial=True, separate=True, * enforce=True, check=True, propagate=True, local=False, # <<<<<<<<<<<<<< * modifiable=False, dynamic=False, removable=False, * stickingatnode=False): */ values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); values[7] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1491 * def addCons(self, cons, name='', initial=True, separate=True, * enforce=True, check=True, propagate=True, local=False, * modifiable=False, dynamic=False, removable=False, # <<<<<<<<<<<<<< * stickingatnode=False): * """Add a linear or quadratic constraint. */ values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); values[10] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1492 * enforce=True, check=True, propagate=True, local=False, * modifiable=False, dynamic=False, removable=False, * stickingatnode=False): # <<<<<<<<<<<<<< * """Add a linear or quadratic constraint. * */ values[11] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCons") < 0)) __PYX_ERR(3, 1489, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cons = values[0]; __pyx_v_name = values[1]; __pyx_v_initial = values[2]; __pyx_v_separate = values[3]; __pyx_v_enforce = values[4]; __pyx_v_check = values[5]; __pyx_v_propagate = values[6]; __pyx_v_local = values[7]; __pyx_v_modifiable = values[8]; __pyx_v_dynamic = values[9]; __pyx_v_removable = values[10]; __pyx_v_stickingatnode = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addCons", 0, 1, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1489, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_194addCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_modifiable, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1489 * * # Constraint functions * def addCons(self, cons, name='', initial=True, separate=True, # <<<<<<<<<<<<<< * enforce=True, check=True, propagate=True, local=False, * modifiable=False, dynamic=False, removable=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_194addCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_cons, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { PyObject *__pyx_v_kwargs = NULL; PyObject *__pyx_v_deg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addCons", 0); __Pyx_INCREF(__pyx_v_name); /* "pyscipopt/scip.pyx":1509 * * """ * assert isinstance(cons, ExprCons), "given constraint is not ExprCons but %s" % cons.__class__.__name__ # <<<<<<<<<<<<<< * * # replace empty name with generic one */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_cons, __pyx_ptype_9pyscipopt_4scip_ExprCons); if (unlikely(!(__pyx_t_1 != 0))) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_constraint_is_not_ExprCons, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 1509, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1512 * * # replace empty name with generic one * if name == '': # <<<<<<<<<<<<<< * name = 'c'+str(SCIPgetNConss(self._scip)+1) * */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_kp_u__84, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1512, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1513 * # replace empty name with generic one * if name == '': * name = 'c'+str(SCIPgetNConss(self._scip)+1) # <<<<<<<<<<<<<< * * kwargs = dict(name=name, initial=initial, separate=separate, */ __pyx_t_2 = __Pyx_PyInt_From_long((SCIPgetNConss(__pyx_v_self->_scip) + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_n_u_c, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1512 * * # replace empty name with generic one * if name == '': # <<<<<<<<<<<<<< * name = 'c'+str(SCIPgetNConss(self._scip)+1) * */ } /* "pyscipopt/scip.pyx":1515 * name = 'c'+str(SCIPgetNConss(self._scip)+1) * * kwargs = dict(name=name, initial=initial, separate=separate, # <<<<<<<<<<<<<< * enforce=enforce, check=check, * propagate=propagate, local=local, */ __pyx_t_2 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_initial, __pyx_v_initial) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_separate, __pyx_v_separate) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) /* "pyscipopt/scip.pyx":1516 * * kwargs = dict(name=name, initial=initial, separate=separate, * enforce=enforce, check=check, # <<<<<<<<<<<<<< * propagate=propagate, local=local, * modifiable=modifiable, dynamic=dynamic, */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_enforce, __pyx_v_enforce) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_check, __pyx_v_check) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) /* "pyscipopt/scip.pyx":1517 * kwargs = dict(name=name, initial=initial, separate=separate, * enforce=enforce, check=check, * propagate=propagate, local=local, # <<<<<<<<<<<<<< * modifiable=modifiable, dynamic=dynamic, * removable=removable, */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_propagate, __pyx_v_propagate) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_local, __pyx_v_local) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) /* "pyscipopt/scip.pyx":1518 * enforce=enforce, check=check, * propagate=propagate, local=local, * modifiable=modifiable, dynamic=dynamic, # <<<<<<<<<<<<<< * removable=removable, * stickingatnode=stickingatnode) */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_modifiable, __pyx_v_modifiable) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dynamic, __pyx_v_dynamic) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) /* "pyscipopt/scip.pyx":1519 * propagate=propagate, local=local, * modifiable=modifiable, dynamic=dynamic, * removable=removable, # <<<<<<<<<<<<<< * stickingatnode=stickingatnode) * kwargs['lhs'] = -SCIPinfinity(self._scip) if cons._lhs is None else cons._lhs */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_removable, __pyx_v_removable) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) /* "pyscipopt/scip.pyx":1520 * modifiable=modifiable, dynamic=dynamic, * removable=removable, * stickingatnode=stickingatnode) # <<<<<<<<<<<<<< * kwargs['lhs'] = -SCIPinfinity(self._scip) if cons._lhs is None else cons._lhs * kwargs['rhs'] = SCIPinfinity(self._scip) if cons._rhs is None else cons._rhs */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_stickingatnode, __pyx_v_stickingatnode) < 0) __PYX_ERR(3, 1515, __pyx_L1_error) __pyx_v_kwargs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1521 * removable=removable, * stickingatnode=stickingatnode) * kwargs['lhs'] = -SCIPinfinity(self._scip) if cons._lhs is None else cons._lhs # <<<<<<<<<<<<<< * kwargs['rhs'] = SCIPinfinity(self._scip) if cons._rhs is None else cons._rhs * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_lhs_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((__pyx_t_1 != 0)) { __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_lhs_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_lhs, __pyx_t_2) < 0)) __PYX_ERR(3, 1521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1522 * stickingatnode=stickingatnode) * kwargs['lhs'] = -SCIPinfinity(self._scip) if cons._lhs is None else cons._lhs * kwargs['rhs'] = SCIPinfinity(self._scip) if cons._rhs is None else cons._rhs # <<<<<<<<<<<<<< * * deg = cons.expr.degree() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_rhs_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((__pyx_t_1 != 0)) { __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_rhs_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_rhs, __pyx_t_2) < 0)) __PYX_ERR(3, 1522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1524 * kwargs['rhs'] = SCIPinfinity(self._scip) if cons._rhs is None else cons._rhs * * deg = cons.expr.degree() # <<<<<<<<<<<<<< * if deg <= 1: * return self._addLinCons(cons, **kwargs) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_degree); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_deg = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1525 * * deg = cons.expr.degree() * if deg <= 1: # <<<<<<<<<<<<<< * return self._addLinCons(cons, **kwargs) * elif deg <= 2: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_deg, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1525, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1526 * deg = cons.expr.degree() * if deg <= 1: * return self._addLinCons(cons, **kwargs) # <<<<<<<<<<<<<< * elif deg <= 2: * return self._addQuadCons(cons, **kwargs) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addLinCons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_cons); __Pyx_GIVEREF(__pyx_v_cons); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_cons); __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1525 * * deg = cons.expr.degree() * if deg <= 1: # <<<<<<<<<<<<<< * return self._addLinCons(cons, **kwargs) * elif deg <= 2: */ } /* "pyscipopt/scip.pyx":1527 * if deg <= 1: * return self._addLinCons(cons, **kwargs) * elif deg <= 2: # <<<<<<<<<<<<<< * return self._addQuadCons(cons, **kwargs) * elif deg == float('inf'): # general nonlinear */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_deg, __pyx_int_2, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1527, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1528 * return self._addLinCons(cons, **kwargs) * elif deg <= 2: * return self._addQuadCons(cons, **kwargs) # <<<<<<<<<<<<<< * elif deg == float('inf'): # general nonlinear * return self._addGenNonlinearCons(cons, **kwargs) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addQuadCons); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_cons); __Pyx_GIVEREF(__pyx_v_cons); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cons); __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1527 * if deg <= 1: * return self._addLinCons(cons, **kwargs) * elif deg <= 2: # <<<<<<<<<<<<<< * return self._addQuadCons(cons, **kwargs) * elif deg == float('inf'): # general nonlinear */ } /* "pyscipopt/scip.pyx":1529 * elif deg <= 2: * return self._addQuadCons(cons, **kwargs) * elif deg == float('inf'): # general nonlinear # <<<<<<<<<<<<<< * return self._addGenNonlinearCons(cons, **kwargs) * else: */ __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_n_u_inf); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_RichCompare(__pyx_v_deg, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1529, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1529, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "pyscipopt/scip.pyx":1530 * return self._addQuadCons(cons, **kwargs) * elif deg == float('inf'): # general nonlinear * return self._addGenNonlinearCons(cons, **kwargs) # <<<<<<<<<<<<<< * else: * return self._addNonlinearCons(cons, **kwargs) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addGenNonlinearCons); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cons); __Pyx_GIVEREF(__pyx_v_cons); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cons); __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1529 * elif deg <= 2: * return self._addQuadCons(cons, **kwargs) * elif deg == float('inf'): # general nonlinear # <<<<<<<<<<<<<< * return self._addGenNonlinearCons(cons, **kwargs) * else: */ } /* "pyscipopt/scip.pyx":1532 * return self._addGenNonlinearCons(cons, **kwargs) * else: * return self._addNonlinearCons(cons, **kwargs) # <<<<<<<<<<<<<< * * def _addLinCons(self, ExprCons lincons, **kwargs): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addNonlinearCons); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_cons); __Pyx_GIVEREF(__pyx_v_cons); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cons); __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pyscipopt/scip.pyx":1489 * * # Constraint functions * def addCons(self, cons, name='', initial=True, separate=True, # <<<<<<<<<<<<<< * enforce=True, check=True, propagate=True, local=False, * modifiable=False, dynamic=False, removable=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_deg); __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1534 * return self._addNonlinearCons(cons, **kwargs) * * def _addLinCons(self, ExprCons lincons, **kwargs): # <<<<<<<<<<<<<< * assert isinstance(lincons, ExprCons), "given constraint is not ExprCons but %s" % lincons.__class__.__name__ * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_197_addLinCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_197_addLinCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_lincons = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_addLinCons (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lincons,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lincons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "_addLinCons") < 0)) __PYX_ERR(3, 1534, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_lincons = ((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_addLinCons", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1534, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pyscipopt.scip.Model._addLinCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lincons), __pyx_ptype_9pyscipopt_4scip_ExprCons, 1, "lincons", 0))) __PYX_ERR(3, 1534, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_196_addLinCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_lincons, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_196_addLinCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_lincons, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_terms = NULL; SCIP_CONS *__pyx_v_scip_cons; PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_coeff = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; PyObject *__pyx_v_PyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; char *__pyx_t_8; SCIP_Real __pyx_t_9; SCIP_Real __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; SCIP_Bool __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; int __pyx_t_23; int __pyx_t_24; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_addLinCons", 0); /* "pyscipopt/scip.pyx":1535 * * def _addLinCons(self, ExprCons lincons, **kwargs): * assert isinstance(lincons, ExprCons), "given constraint is not ExprCons but %s" % lincons.__class__.__name__ # <<<<<<<<<<<<<< * * assert lincons.expr.degree() <= 1, "given constraint is not linear, degree == %d" % lincons.expr.degree() */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lincons), __pyx_ptype_9pyscipopt_4scip_ExprCons); if (unlikely(!(__pyx_t_1 != 0))) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_lincons), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_constraint_is_not_ExprCons, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 1535, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1537 * assert isinstance(lincons, ExprCons), "given constraint is not ExprCons but %s" % lincons.__class__.__name__ * * assert lincons.expr.degree() <= 1, "given constraint is not linear, degree == %d" % lincons.expr.degree() # <<<<<<<<<<<<<< * terms = lincons.expr.terms * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lincons->expr, __pyx_n_s_degree); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lincons->expr, __pyx_n_s_degree); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_constraint_is_not_linear_d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 1537, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1538 * * assert lincons.expr.degree() <= 1, "given constraint is not linear, degree == %d" % lincons.expr.degree() * terms = lincons.expr.terms # <<<<<<<<<<<<<< * * cdef SCIP_CONS* scip_cons */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lincons->expr, __pyx_n_s_terms); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_terms = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1541 * * cdef SCIP_CONS* scip_cons * PY_SCIP_CALL(SCIPcreateConsLinear( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), 0, NULL, NULL, * kwargs['lhs'], kwargs['rhs'], kwargs['initial'], */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pyscipopt/scip.pyx":1542 * cdef SCIP_CONS* scip_cons * PY_SCIP_CALL(SCIPcreateConsLinear( * self._scip, &scip_cons, str_conversion(kwargs['name']), 0, NULL, NULL, # <<<<<<<<<<<<<< * kwargs['lhs'], kwargs['rhs'], kwargs['initial'], * kwargs['separate'], kwargs['enforce'], kwargs['check'], */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_t_4); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1542, __pyx_L1_error) /* "pyscipopt/scip.pyx":1543 * PY_SCIP_CALL(SCIPcreateConsLinear( * self._scip, &scip_cons, str_conversion(kwargs['name']), 0, NULL, NULL, * kwargs['lhs'], kwargs['rhs'], kwargs['initial'], # <<<<<<<<<<<<<< * kwargs['separate'], kwargs['enforce'], kwargs['check'], * kwargs['propagate'], kwargs['local'], kwargs['modifiable'], */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_lhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_rhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_10 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_initial); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1544 * self._scip, &scip_cons, str_conversion(kwargs['name']), 0, NULL, NULL, * kwargs['lhs'], kwargs['rhs'], kwargs['initial'], * kwargs['separate'], kwargs['enforce'], kwargs['check'], # <<<<<<<<<<<<<< * kwargs['propagate'], kwargs['local'], kwargs['modifiable'], * kwargs['dynamic'], kwargs['removable'], kwargs['stickingatnode'])) */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_separate); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_enforce); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_check); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1545 * kwargs['lhs'], kwargs['rhs'], kwargs['initial'], * kwargs['separate'], kwargs['enforce'], kwargs['check'], * kwargs['propagate'], kwargs['local'], kwargs['modifiable'], # <<<<<<<<<<<<<< * kwargs['dynamic'], kwargs['removable'], kwargs['stickingatnode'])) * */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_propagate); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_local); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_modifiable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1546 * kwargs['separate'], kwargs['enforce'], kwargs['check'], * kwargs['propagate'], kwargs['local'], kwargs['modifiable'], * kwargs['dynamic'], kwargs['removable'], kwargs['stickingatnode'])) # <<<<<<<<<<<<<< * * for key, coeff in terms.items(): */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_dynamic); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_removable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_stickingatnode); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1541 * * cdef SCIP_CONS* scip_cons * PY_SCIP_CALL(SCIPcreateConsLinear( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), 0, NULL, NULL, * kwargs['lhs'], kwargs['rhs'], kwargs['initial'], */ __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsLinear(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_8, 0, NULL, NULL, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1548 * kwargs['dynamic'], kwargs['removable'], kwargs['stickingatnode'])) * * for key, coeff in terms.items(): # <<<<<<<<<<<<<< * var = <Variable>key[0] * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) */ __pyx_t_21 = 0; if (unlikely(__pyx_v_terms == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(3, 1548, __pyx_L1_error) } __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_terms, 0, __pyx_n_s_items, (&__pyx_t_22), (&__pyx_t_23)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_24 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_22, &__pyx_t_21, &__pyx_t_3, &__pyx_t_5, NULL, __pyx_t_23); if (unlikely(__pyx_t_24 == 0)) break; if (unlikely(__pyx_t_24 == -1)) __PYX_ERR(3, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_coeff, __pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1549 * * for key, coeff in terms.items(): * var = <Variable>key[0] # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) * */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1550 * for key, coeff in terms.items(): * var = <Variable>key[0] * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_coeff); if (unlikely((__pyx_t_10 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1550, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCoefLinear(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, ((SCIP_Real)__pyx_t_10))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1552 * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1553 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_PyCons = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1554 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * * return PyCons */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1556 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * * return PyCons # <<<<<<<<<<<<<< * * def _addQuadCons(self, ExprCons quadcons, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_PyCons); __pyx_r = __pyx_v_PyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1534 * return self._addNonlinearCons(cons, **kwargs) * * def _addLinCons(self, ExprCons lincons, **kwargs): # <<<<<<<<<<<<<< * assert isinstance(lincons, ExprCons), "given constraint is not ExprCons but %s" % lincons.__class__.__name__ * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model._addLinCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_terms); __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_coeff); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XDECREF(__pyx_v_PyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1558 * return PyCons * * def _addQuadCons(self, ExprCons quadcons, **kwargs): # <<<<<<<<<<<<<< * terms = quadcons.expr.terms * assert quadcons.expr.degree() <= 2, "given constraint is not quadratic, degree == %d" % quadcons.expr.degree() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_199_addQuadCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_199_addQuadCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_quadcons = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_addQuadCons (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_quadcons,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_quadcons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "_addQuadCons") < 0)) __PYX_ERR(3, 1558, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_quadcons = ((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_addQuadCons", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1558, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pyscipopt.scip.Model._addQuadCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_quadcons), __pyx_ptype_9pyscipopt_4scip_ExprCons, 1, "quadcons", 0))) __PYX_ERR(3, 1558, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_198_addQuadCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_quadcons, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_198_addQuadCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_quadcons, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_terms = NULL; SCIP_CONS *__pyx_v_scip_cons; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_c = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var1 = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var2 = NULL; PyObject *__pyx_v_PyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; char const *__pyx_t_8; SCIP_Real __pyx_t_9; SCIP_Real __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_t_22; int __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_addQuadCons", 0); /* "pyscipopt/scip.pyx":1559 * * def _addQuadCons(self, ExprCons quadcons, **kwargs): * terms = quadcons.expr.terms # <<<<<<<<<<<<<< * assert quadcons.expr.degree() <= 2, "given constraint is not quadratic, degree == %d" % quadcons.expr.degree() * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_quadcons->expr, __pyx_n_s_terms); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_terms = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1560 * def _addQuadCons(self, ExprCons quadcons, **kwargs): * terms = quadcons.expr.terms * assert quadcons.expr.degree() <= 2, "given constraint is not quadratic, degree == %d" % quadcons.expr.degree() # <<<<<<<<<<<<<< * * cdef SCIP_CONS* scip_cons */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_quadcons->expr, __pyx_n_s_degree); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_quadcons->expr, __pyx_n_s_degree); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_constraint_is_not_quadrati, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 1560, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1563 * * cdef SCIP_CONS* scip_cons * PY_SCIP_CALL(SCIPcreateConsQuadratic( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), * 0, NULL, NULL, # linear */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pyscipopt/scip.pyx":1564 * cdef SCIP_CONS* scip_cons * PY_SCIP_CALL(SCIPcreateConsQuadratic( * self._scip, &scip_cons, str_conversion(kwargs['name']), # <<<<<<<<<<<<<< * 0, NULL, NULL, # linear * 0, NULL, NULL, NULL, # quadratc */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1564, __pyx_L1_error) /* "pyscipopt/scip.pyx":1567 * 0, NULL, NULL, # linear * 0, NULL, NULL, NULL, # quadratc * kwargs['lhs'], kwargs['rhs'], # <<<<<<<<<<<<<< * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_lhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_9 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_rhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_10 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1568 * 0, NULL, NULL, NULL, # quadratc * kwargs['lhs'], kwargs['rhs'], * kwargs['initial'], kwargs['separate'], kwargs['enforce'], # <<<<<<<<<<<<<< * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'])) */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_initial); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_separate); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_enforce); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1569 * kwargs['lhs'], kwargs['rhs'], * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], # <<<<<<<<<<<<<< * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'])) * */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_check); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_propagate); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_local); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1570 * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'])) # <<<<<<<<<<<<<< * * for v, c in terms.items(): */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_modifiable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_dynamic); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_removable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1563 * * cdef SCIP_CONS* scip_cons * PY_SCIP_CALL(SCIPcreateConsQuadratic( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), * 0, NULL, NULL, # linear */ __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsQuadratic(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_8, 0, NULL, NULL, 0, NULL, NULL, NULL, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1572 * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'])) * * for v, c in terms.items(): # <<<<<<<<<<<<<< * if len(v) == 1: # linear * var = <Variable>v[0] */ __pyx_t_20 = 0; if (unlikely(__pyx_v_terms == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(3, 1572, __pyx_L1_error) } __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_terms, 0, __pyx_n_s_items, (&__pyx_t_21), (&__pyx_t_22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_23 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_21, &__pyx_t_20, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_22); if (unlikely(__pyx_t_23 == 0)) break; if (unlikely(__pyx_t_23 == -1)) __PYX_ERR(3, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1573 * * for v, c in terms.items(): * if len(v) == 1: # linear # <<<<<<<<<<<<<< * var = <Variable>v[0] * PY_SCIP_CALL(SCIPaddLinearVarQuadratic(self._scip, scip_cons, var.scip_var, c)) */ __pyx_t_24 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_24 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1573, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_24 == 1) != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":1574 * for v, c in terms.items(): * if len(v) == 1: # linear * var = <Variable>v[0] # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddLinearVarQuadratic(self._scip, scip_cons, var.scip_var, c)) * else: # quadratic */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_2)); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1575 * if len(v) == 1: # linear * var = <Variable>v[0] * PY_SCIP_CALL(SCIPaddLinearVarQuadratic(self._scip, scip_cons, var.scip_var, c)) # <<<<<<<<<<<<<< * else: # quadratic * assert len(v) == 2, 'term length must be 1 or 2 but it is %s' % len(v) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_c); if (unlikely((__pyx_t_10 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1575, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddLinearVarQuadratic(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, __pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1573 * * for v, c in terms.items(): * if len(v) == 1: # linear # <<<<<<<<<<<<<< * var = <Variable>v[0] * PY_SCIP_CALL(SCIPaddLinearVarQuadratic(self._scip, scip_cons, var.scip_var, c)) */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":1577 * PY_SCIP_CALL(SCIPaddLinearVarQuadratic(self._scip, scip_cons, var.scip_var, c)) * else: # quadratic * assert len(v) == 2, 'term length must be 1 or 2 but it is %s' % len(v) # <<<<<<<<<<<<<< * var1, var2 = <Variable>v[0], <Variable>v[1] * PY_SCIP_CALL(SCIPaddBilinTermQuadratic(self._scip, scip_cons, var1.scip_var, var2.scip_var, c)) */ /*else*/ { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_24 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_24 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1577, __pyx_L1_error) if (unlikely(!((__pyx_t_24 == 2) != 0))) { __pyx_t_25 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_25 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1577, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_25); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_term_length_must_be_1_or_2_but_i, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(3, 1577, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1578 * else: # quadratic * assert len(v) == 2, 'term length must be 1 or 2 but it is %s' % len(v) * var1, var2 = <Variable>v[0], <Variable>v[1] # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddBilinTermQuadratic(self._scip, scip_cons, var1.scip_var, var2.scip_var, c)) * */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_var1, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_var2, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1579 * assert len(v) == 2, 'term length must be 1 or 2 but it is %s' % len(v) * var1, var2 = <Variable>v[0], <Variable>v[1] * PY_SCIP_CALL(SCIPaddBilinTermQuadratic(self._scip, scip_cons, var1.scip_var, var2.scip_var, c)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_c); if (unlikely((__pyx_t_10 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1579, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddBilinTermQuadratic(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var1->scip_var, __pyx_v_var2->scip_var, __pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1581 * PY_SCIP_CALL(SCIPaddBilinTermQuadratic(self._scip, scip_cons, var1.scip_var, var2.scip_var, c)) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1582 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * return PyCons */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_PyCons = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1583 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * return PyCons * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1584 * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * return PyCons # <<<<<<<<<<<<<< * * def _addNonlinearCons(self, ExprCons cons, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_PyCons); __pyx_r = __pyx_v_PyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1558 * return PyCons * * def _addQuadCons(self, ExprCons quadcons, **kwargs): # <<<<<<<<<<<<<< * terms = quadcons.expr.terms * assert quadcons.expr.degree() <= 2, "given constraint is not quadratic, degree == %d" % quadcons.expr.degree() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model._addQuadCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_terms); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_c); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XDECREF((PyObject *)__pyx_v_var1); __Pyx_XDECREF((PyObject *)__pyx_v_var2); __Pyx_XDECREF(__pyx_v_PyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1586 * return PyCons * * def _addNonlinearCons(self, ExprCons cons, **kwargs): # <<<<<<<<<<<<<< * cdef SCIP_EXPR* expr * cdef SCIP_EXPR** varexprs */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_201_addNonlinearCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_201_addNonlinearCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_cons = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_addNonlinearCons (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "_addNonlinearCons") < 0)) __PYX_ERR(3, 1586, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_addNonlinearCons", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1586, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pyscipopt.scip.Model._addNonlinearCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_ExprCons, 1, "cons", 0))) __PYX_ERR(3, 1586, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_200_addNonlinearCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_200_addNonlinearCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_cons, PyObject *__pyx_v_kwargs) { SCIP_EXPR *__pyx_v_expr; SCIP_EXPR **__pyx_v_varexprs; SCIP_EXPRDATA_MONOMIAL **__pyx_v_monomials; int *__pyx_v_idxs; SCIP_EXPRTREE *__pyx_v_exprtree; SCIP_VAR **__pyx_v_vars; SCIP_CONS *__pyx_v_scip_cons; PyObject *__pyx_v_terms = NULL; PyObject *__pyx_v_variables = NULL; PyObject *__pyx_v_varindex = NULL; PyObject *__pyx_v_idx = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_term = NULL; PyObject *__pyx_v_coef = NULL; PyObject *__pyx_v_j = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_PyCons = NULL; PyObject *__pyx_9genexpr17__pyx_v_term = NULL; PyObject *__pyx_9genexpr17__pyx_v_var = NULL; PyObject *__pyx_9genexpr18__pyx_v_idx = NULL; PyObject *__pyx_9genexpr18__pyx_v_var = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; SCIP_Real __pyx_t_16; SCIP_VAR *__pyx_t_17; char const *__pyx_t_18; SCIP_Real __pyx_t_19; SCIP_Bool __pyx_t_20; SCIP_Bool __pyx_t_21; SCIP_Bool __pyx_t_22; SCIP_Bool __pyx_t_23; SCIP_Bool __pyx_t_24; SCIP_Bool __pyx_t_25; SCIP_Bool __pyx_t_26; SCIP_Bool __pyx_t_27; SCIP_Bool __pyx_t_28; SCIP_Bool __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_addNonlinearCons", 0); /* "pyscipopt/scip.pyx":1595 * cdef SCIP_CONS* scip_cons * * terms = cons.expr.terms # <<<<<<<<<<<<<< * * # collect variables */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons->expr, __pyx_n_s_terms); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_terms = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1598 * * # collect variables * variables = {var.ptr():var for term in terms for var in term} # <<<<<<<<<<<<<< * variables = list(variables.values()) * varindex = {var.ptr():idx for (idx,var) in enumerate(variables)} */ { /* enter inner scope */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_terms)) || PyTuple_CheckExact(__pyx_v_terms)) { __pyx_t_2 = __pyx_v_terms; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_terms); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1598, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(3, 1598, __pyx_L5_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(3, 1598, __pyx_L5_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1598, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_term, __pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_9genexpr17__pyx_v_term)) || PyTuple_CheckExact(__pyx_9genexpr17__pyx_v_term)) { __pyx_t_5 = __pyx_9genexpr17__pyx_v_term; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_9genexpr17__pyx_v_term); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1598, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(3, 1598, __pyx_L5_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(3, 1598, __pyx_L5_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1598, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_var, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr17__pyx_v_var, __pyx_n_s_ptr); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_8, (PyObject*)__pyx_9genexpr17__pyx_v_var))) __PYX_ERR(3, 1598, __pyx_L5_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_term); __pyx_9genexpr17__pyx_v_term = 0; __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_var); __pyx_9genexpr17__pyx_v_var = 0; goto __pyx_L10_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_term); __pyx_9genexpr17__pyx_v_term = 0; __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_var); __pyx_9genexpr17__pyx_v_var = 0; goto __pyx_L1_error; __pyx_L10_exit_scope:; } /* exit inner scope */ __pyx_v_variables = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1599 * # collect variables * variables = {var.ptr():var for term in terms for var in term} * variables = list(variables.values()) # <<<<<<<<<<<<<< * varindex = {var.ptr():idx for (idx,var) in enumerate(variables)} * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_variables, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1600 * variables = {var.ptr():var for term in terms for var in term} * variables = list(variables.values()) * varindex = {var.ptr():idx for (idx,var) in enumerate(variables)} # <<<<<<<<<<<<<< * * # create variable expressions */ { /* enter inner scope */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { __pyx_t_5 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1600, __pyx_L13_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(3, 1600, __pyx_L13_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(3, 1600, __pyx_L13_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_4(__pyx_t_5); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1600, __pyx_L13_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_var, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_idx, __pyx_t_1); __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_8; __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr18__pyx_v_var, __pyx_n_s_ptr); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_t_8, (PyObject*)__pyx_9genexpr18__pyx_v_idx))) __PYX_ERR(3, 1600, __pyx_L13_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_idx); __pyx_9genexpr18__pyx_v_idx = 0; __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_var); __pyx_9genexpr18__pyx_v_var = 0; goto __pyx_L16_exit_scope; __pyx_L13_error:; __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_idx); __pyx_9genexpr18__pyx_v_idx = 0; __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_var); __pyx_9genexpr18__pyx_v_var = 0; goto __pyx_L1_error; __pyx_L16_exit_scope:; } /* exit inner scope */ __pyx_v_varindex = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1603 * * # create variable expressions * varexprs = <SCIP_EXPR**> malloc(len(varindex) * sizeof(SCIP_EXPR*)) # <<<<<<<<<<<<<< * for idx in varindex.values(): * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &expr, SCIP_EXPR_VARIDX, <int>idx) ) */ __pyx_t_3 = PyDict_Size(__pyx_v_varindex); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1603, __pyx_L1_error) __pyx_v_varexprs = ((SCIP_EXPR **)malloc((__pyx_t_3 * (sizeof(SCIP_EXPR *))))); /* "pyscipopt/scip.pyx":1604 * # create variable expressions * varexprs = <SCIP_EXPR**> malloc(len(varindex) * sizeof(SCIP_EXPR*)) * for idx in varindex.values(): # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &expr, SCIP_EXPR_VARIDX, <int>idx) ) * varexprs[idx] = expr */ __pyx_t_3 = 0; __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_varindex, 1, __pyx_n_s_values, (&__pyx_t_6), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; while (1) { __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_3, NULL, &__pyx_t_1, NULL, __pyx_t_11); if (unlikely(__pyx_t_12 == 0)) break; if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(3, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1605 * varexprs = <SCIP_EXPR**> malloc(len(varindex) * sizeof(SCIP_EXPR*)) * for idx in varindex.values(): * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &expr, SCIP_EXPR_VARIDX, <int>idx) ) # <<<<<<<<<<<<<< * varexprs[idx] = expr * */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1605, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&__pyx_v_expr), SCIP_EXPR_VARIDX, ((int)__pyx_t_12))); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1606 * for idx in varindex.values(): * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &expr, SCIP_EXPR_VARIDX, <int>idx) ) * varexprs[idx] = expr # <<<<<<<<<<<<<< * * # create monomials for terms */ __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1606, __pyx_L1_error) (__pyx_v_varexprs[__pyx_t_13]) = __pyx_v_expr; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1609 * * # create monomials for terms * monomials = <SCIP_EXPRDATA_MONOMIAL**> malloc(len(terms) * sizeof(SCIP_EXPRDATA_MONOMIAL*)) # <<<<<<<<<<<<<< * for i, (term, coef) in enumerate(terms.items()): * idxs = <int*> malloc(len(term) * sizeof(int)) */ __pyx_t_6 = PyObject_Length(__pyx_v_terms); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1609, __pyx_L1_error) __pyx_v_monomials = ((SCIP_EXPRDATA_MONOMIAL **)malloc((__pyx_t_6 * (sizeof(SCIP_EXPRDATA_MONOMIAL *))))); /* "pyscipopt/scip.pyx":1610 * # create monomials for terms * monomials = <SCIP_EXPRDATA_MONOMIAL**> malloc(len(terms) * sizeof(SCIP_EXPRDATA_MONOMIAL*)) * for i, (term, coef) in enumerate(terms.items()): # <<<<<<<<<<<<<< * idxs = <int*> malloc(len(term) * sizeof(int)) * for j, var in enumerate(term): */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; __pyx_t_6 = 0; if (unlikely(__pyx_v_terms == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(3, 1610, __pyx_L1_error) } __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_terms, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_6, &__pyx_t_5, &__pyx_t_8, NULL, __pyx_t_11); if (unlikely(__pyx_t_12 == 0)) break; if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(3, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_8; __pyx_t_8 = 0; /* "pyscipopt/scip.pyx":1611 * monomials = <SCIP_EXPRDATA_MONOMIAL**> malloc(len(terms) * sizeof(SCIP_EXPRDATA_MONOMIAL*)) * for i, (term, coef) in enumerate(terms.items()): * idxs = <int*> malloc(len(term) * sizeof(int)) # <<<<<<<<<<<<<< * for j, var in enumerate(term): * idxs[j] = varindex[var.ptr()] */ __pyx_t_13 = PyObject_Length(__pyx_v_term); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1611, __pyx_L1_error) __pyx_v_idxs = ((int *)malloc((__pyx_t_13 * (sizeof(int))))); /* "pyscipopt/scip.pyx":1612 * for i, (term, coef) in enumerate(terms.items()): * idxs = <int*> malloc(len(term) * sizeof(int)) * for j, var in enumerate(term): # <<<<<<<<<<<<<< * idxs[j] = varindex[var.ptr()] * PY_SCIP_CALL( SCIPexprCreateMonomial(SCIPblkmem(self._scip), &monomials[i], <SCIP_Real>coef, <int>len(term), idxs, NULL) ) */ __Pyx_INCREF(__pyx_int_0); __pyx_t_8 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_term)) || PyTuple_CheckExact(__pyx_v_term)) { __pyx_t_5 = __pyx_v_term; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0; __pyx_t_4 = NULL; } else { __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_term); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1612, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(3, 1612, __pyx_L1_error) #else __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(3, 1612, __pyx_L1_error) #else __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } } else { __pyx_t_9 = __pyx_t_4(__pyx_t_5); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1612, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_9); } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_8); __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = __pyx_t_9; __pyx_t_9 = 0; /* "pyscipopt/scip.pyx":1613 * idxs = <int*> malloc(len(term) * sizeof(int)) * for j, var in enumerate(term): * idxs[j] = varindex[var.ptr()] # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreateMonomial(SCIPblkmem(self._scip), &monomials[i], <SCIP_Real>coef, <int>len(term), idxs, NULL) ) * free(idxs) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_ptr); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_9 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_10); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_varindex, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_10); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1613, __pyx_L1_error) (__pyx_v_idxs[__pyx_t_15]) = __pyx_t_12; /* "pyscipopt/scip.pyx":1612 * for i, (term, coef) in enumerate(terms.items()): * idxs = <int*> malloc(len(term) * sizeof(int)) * for j, var in enumerate(term): # <<<<<<<<<<<<<< * idxs[j] = varindex[var.ptr()] * PY_SCIP_CALL( SCIPexprCreateMonomial(SCIPblkmem(self._scip), &monomials[i], <SCIP_Real>coef, <int>len(term), idxs, NULL) ) */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyscipopt/scip.pyx":1614 * for j, var in enumerate(term): * idxs[j] = varindex[var.ptr()] * PY_SCIP_CALL( SCIPexprCreateMonomial(SCIPblkmem(self._scip), &monomials[i], <SCIP_Real>coef, <int>len(term), idxs, NULL) ) # <<<<<<<<<<<<<< * free(idxs) * */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1614, __pyx_L1_error) __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_v_coef); if (unlikely((__pyx_t_16 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1614, __pyx_L1_error) __pyx_t_15 = PyObject_Length(__pyx_v_term); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1614, __pyx_L1_error) __pyx_t_10 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreateMonomial(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_monomials[__pyx_t_13])), ((SCIP_Real)__pyx_t_16), ((int)__pyx_t_15), __pyx_v_idxs, NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyscipopt/scip.pyx":1615 * idxs[j] = varindex[var.ptr()] * PY_SCIP_CALL( SCIPexprCreateMonomial(SCIPblkmem(self._scip), &monomials[i], <SCIP_Real>coef, <int>len(term), idxs, NULL) ) * free(idxs) # <<<<<<<<<<<<<< * * # create polynomial from monomials */ free(__pyx_v_idxs); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1618 * * # create polynomial from monomials * PY_SCIP_CALL( SCIPexprCreatePolynomial(SCIPblkmem(self._scip), &expr, # <<<<<<<<<<<<<< * <int>len(varindex), varexprs, * <int>len(terms), monomials, 0.0, <SCIP_Bool>True) ) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "pyscipopt/scip.pyx":1619 * # create polynomial from monomials * PY_SCIP_CALL( SCIPexprCreatePolynomial(SCIPblkmem(self._scip), &expr, * <int>len(varindex), varexprs, # <<<<<<<<<<<<<< * <int>len(terms), monomials, 0.0, <SCIP_Bool>True) ) * */ __pyx_t_3 = PyDict_Size(__pyx_v_varindex); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1619, __pyx_L1_error) /* "pyscipopt/scip.pyx":1620 * PY_SCIP_CALL( SCIPexprCreatePolynomial(SCIPblkmem(self._scip), &expr, * <int>len(varindex), varexprs, * <int>len(terms), monomials, 0.0, <SCIP_Bool>True) ) # <<<<<<<<<<<<<< * * # create expression tree */ __pyx_t_6 = PyObject_Length(__pyx_v_terms); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1620, __pyx_L1_error) /* "pyscipopt/scip.pyx":1618 * * # create polynomial from monomials * PY_SCIP_CALL( SCIPexprCreatePolynomial(SCIPblkmem(self._scip), &expr, # <<<<<<<<<<<<<< * <int>len(varindex), varexprs, * <int>len(terms), monomials, 0.0, <SCIP_Bool>True) ) */ __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreatePolynomial(SCIPblkmem(__pyx_v_self->_scip), (&__pyx_v_expr), ((int)__pyx_t_3), __pyx_v_varexprs, ((int)__pyx_t_6), __pyx_v_monomials, 0.0, ((SCIP_Bool)1))); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1623 * * # create expression tree * PY_SCIP_CALL( SCIPexprtreeCreate(SCIPblkmem(self._scip), &exprtree, expr, <int>len(variables), 0, NULL) ) # <<<<<<<<<<<<<< * vars = <SCIP_VAR**> malloc(len(variables) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(variables): # same as varindex */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1623, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprtreeCreate(SCIPblkmem(__pyx_v_self->_scip), (&__pyx_v_exprtree), __pyx_v_expr, ((int)__pyx_t_6), 0, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1624 * # create expression tree * PY_SCIP_CALL( SCIPexprtreeCreate(SCIPblkmem(self._scip), &exprtree, expr, <int>len(variables), 0, NULL) ) * vars = <SCIP_VAR**> malloc(len(variables) * sizeof(SCIP_VAR*)) # <<<<<<<<<<<<<< * for idx, var in enumerate(variables): # same as varindex * vars[idx] = (<Variable>var).scip_var */ __pyx_t_6 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1624, __pyx_L1_error) __pyx_v_vars = ((SCIP_VAR **)malloc((__pyx_t_6 * (sizeof(SCIP_VAR *))))); /* "pyscipopt/scip.pyx":1625 * PY_SCIP_CALL( SCIPexprtreeCreate(SCIPblkmem(self._scip), &exprtree, expr, <int>len(variables), 0, NULL) ) * vars = <SCIP_VAR**> malloc(len(variables) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(variables): # same as varindex # <<<<<<<<<<<<<< * vars[idx] = (<Variable>var).scip_var * PY_SCIP_CALL( SCIPexprtreeSetVars(exprtree, <int>len(variables), vars) ) */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { __pyx_t_1 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_4 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1625, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(3, 1625, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(3, 1625, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1625, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_2); __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_8; __pyx_t_8 = 0; /* "pyscipopt/scip.pyx":1626 * vars = <SCIP_VAR**> malloc(len(variables) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(variables): # same as varindex * vars[idx] = (<Variable>var).scip_var # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprtreeSetVars(exprtree, <int>len(variables), vars) ) * */ __pyx_t_17 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)->scip_var; __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1626, __pyx_L1_error) (__pyx_v_vars[__pyx_t_3]) = __pyx_t_17; /* "pyscipopt/scip.pyx":1625 * PY_SCIP_CALL( SCIPexprtreeCreate(SCIPblkmem(self._scip), &exprtree, expr, <int>len(variables), 0, NULL) ) * vars = <SCIP_VAR**> malloc(len(variables) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(variables): # same as varindex # <<<<<<<<<<<<<< * vars[idx] = (<Variable>var).scip_var * PY_SCIP_CALL( SCIPexprtreeSetVars(exprtree, <int>len(variables), vars) ) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1627 * for idx, var in enumerate(variables): # same as varindex * vars[idx] = (<Variable>var).scip_var * PY_SCIP_CALL( SCIPexprtreeSetVars(exprtree, <int>len(variables), vars) ) # <<<<<<<<<<<<<< * * # create nonlinear constraint for exprtree */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1627, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprtreeSetVars(__pyx_v_exprtree, ((int)__pyx_t_6), __pyx_v_vars)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1630 * * # create nonlinear constraint for exprtree * PY_SCIP_CALL( SCIPcreateConsNonlinear( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), * 0, NULL, NULL, # linear */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "pyscipopt/scip.pyx":1631 * # create nonlinear constraint for exprtree * PY_SCIP_CALL( SCIPcreateConsNonlinear( * self._scip, &scip_cons, str_conversion(kwargs['name']), # <<<<<<<<<<<<<< * 0, NULL, NULL, # linear * 1, &exprtree, NULL, # nonlinear */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_18 = __Pyx_PyObject_AsString(__pyx_t_8); if (unlikely((!__pyx_t_18) && PyErr_Occurred())) __PYX_ERR(3, 1631, __pyx_L1_error) /* "pyscipopt/scip.pyx":1634 * 0, NULL, NULL, # linear * 1, &exprtree, NULL, # nonlinear * kwargs['lhs'], kwargs['rhs'], # <<<<<<<<<<<<<< * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_lhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_rhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_19 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1635 * 1, &exprtree, NULL, # nonlinear * kwargs['lhs'], kwargs['rhs'], * kwargs['initial'], kwargs['separate'], kwargs['enforce'], # <<<<<<<<<<<<<< * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_initial); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_separate); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_21 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_enforce); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_22 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1636 * kwargs['lhs'], kwargs['rhs'], * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], # <<<<<<<<<<<<<< * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], * kwargs['stickingatnode']) ) */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_check); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_23 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_propagate); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_24 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_local); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_25 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1637 * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], # <<<<<<<<<<<<<< * kwargs['stickingatnode']) ) * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_modifiable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_26 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_dynamic); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_27 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_removable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_28 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1638 * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], * kwargs['stickingatnode']) ) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_stickingatnode); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_29 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1638, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1630 * * # create nonlinear constraint for exprtree * PY_SCIP_CALL( SCIPcreateConsNonlinear( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), * 0, NULL, NULL, # linear */ __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsNonlinear(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_18, 0, NULL, NULL, 1, (&__pyx_v_exprtree), NULL, __pyx_t_16, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_27, __pyx_t_28, __pyx_t_29)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1639 * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], * kwargs['stickingatnode']) ) * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1640 * kwargs['stickingatnode']) ) * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_PyCons = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1641 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) * free(vars) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1642 * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) # <<<<<<<<<<<<<< * free(vars) * free(monomials) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprtreeFree((&__pyx_v_exprtree))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1643 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) * free(vars) # <<<<<<<<<<<<<< * free(monomials) * free(varexprs) */ free(__pyx_v_vars); /* "pyscipopt/scip.pyx":1644 * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) * free(vars) * free(monomials) # <<<<<<<<<<<<<< * free(varexprs) * return PyCons */ free(__pyx_v_monomials); /* "pyscipopt/scip.pyx":1645 * free(vars) * free(monomials) * free(varexprs) # <<<<<<<<<<<<<< * return PyCons * */ free(__pyx_v_varexprs); /* "pyscipopt/scip.pyx":1646 * free(monomials) * free(varexprs) * return PyCons # <<<<<<<<<<<<<< * * def _addGenNonlinearCons(self, ExprCons cons, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_PyCons); __pyx_r = __pyx_v_PyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1586 * return PyCons * * def _addNonlinearCons(self, ExprCons cons, **kwargs): # <<<<<<<<<<<<<< * cdef SCIP_EXPR* expr * cdef SCIP_EXPR** varexprs */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("pyscipopt.scip.Model._addNonlinearCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_terms); __Pyx_XDECREF(__pyx_v_variables); __Pyx_XDECREF(__pyx_v_varindex); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_term); __Pyx_XDECREF(__pyx_v_coef); __Pyx_XDECREF(__pyx_v_j); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_PyCons); __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_term); __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_var); __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_idx); __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_var); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1648 * return PyCons * * def _addGenNonlinearCons(self, ExprCons cons, **kwargs): # <<<<<<<<<<<<<< * cdef SCIP_EXPR** childrenexpr * cdef SCIP_EXPR** scipexprs */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_203_addGenNonlinearCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_203_addGenNonlinearCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_cons = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_addGenNonlinearCons (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "_addGenNonlinearCons") < 0)) __PYX_ERR(3, 1648, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_addGenNonlinearCons", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1648, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pyscipopt.scip.Model._addGenNonlinearCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_ExprCons, 1, "cons", 0))) __PYX_ERR(3, 1648, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_202_addGenNonlinearCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_202_addGenNonlinearCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v_cons, PyObject *__pyx_v_kwargs) { SCIP_EXPR **__pyx_v_childrenexpr; SCIP_EXPR **__pyx_v_scipexprs; SCIP_EXPRTREE *__pyx_v_exprtree; SCIP_CONS *__pyx_v_scip_cons; int __pyx_v_nchildren; PyObject *__pyx_v_expr = NULL; PyObject *__pyx_v_nodes = NULL; PyObject *__pyx_v_op2idx = NULL; PyObject *__pyx_v_nvars = NULL; PyObject *__pyx_v_node = NULL; SCIP_VAR **__pyx_v_vars; PyObject *__pyx_v_varpos = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_op = NULL; PyObject *__pyx_v_opidx = NULL; PyObject *__pyx_v_pyvar = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_v_pos = NULL; PyObject *__pyx_v_valuenode = NULL; PyObject *__pyx_v_exponent = NULL; PyObject *__pyx_v_PyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; Py_ssize_t __pyx_t_9; SCIP_EXPROP __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; SCIP_VAR *__pyx_t_14; SCIP_Real __pyx_t_15; int __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; char const *__pyx_t_20; SCIP_Real __pyx_t_21; SCIP_Bool __pyx_t_22; SCIP_Bool __pyx_t_23; SCIP_Bool __pyx_t_24; SCIP_Bool __pyx_t_25; SCIP_Bool __pyx_t_26; SCIP_Bool __pyx_t_27; SCIP_Bool __pyx_t_28; SCIP_Bool __pyx_t_29; SCIP_Bool __pyx_t_30; SCIP_Bool __pyx_t_31; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_addGenNonlinearCons", 0); /* "pyscipopt/scip.pyx":1656 * * # get arrays from python's expression tree * expr = cons.expr # <<<<<<<<<<<<<< * nodes = expr_to_nodes(expr) * op2idx = Operator.operatorIndexDic */ __pyx_t_1 = __pyx_v_cons->expr; __Pyx_INCREF(__pyx_t_1); __pyx_v_expr = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1657 * # get arrays from python's expression tree * expr = cons.expr * nodes = expr_to_nodes(expr) # <<<<<<<<<<<<<< * op2idx = Operator.operatorIndexDic * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_expr_to_nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_expr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_expr); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nodes = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1658 * expr = cons.expr * nodes = expr_to_nodes(expr) * op2idx = Operator.operatorIndexDic # <<<<<<<<<<<<<< * * # in nodes we have a list of tuples: each tuple is of the form */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Operator); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_operatorIndexDic); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_op2idx = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1668 * # Note2: we need to compute the number of variable operators to find out * # how many variables are there. * nvars = 0 # <<<<<<<<<<<<<< * for node in nodes: * if op2idx[node[0]] == SCIP_EXPR_VARIDX: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_nvars = __pyx_int_0; /* "pyscipopt/scip.pyx":1669 * # how many variables are there. * nvars = 0 * for node in nodes: # <<<<<<<<<<<<<< * if op2idx[node[0]] == SCIP_EXPR_VARIDX: * nvars += 1 */ if (likely(PyList_CheckExact(__pyx_v_nodes)) || PyTuple_CheckExact(__pyx_v_nodes)) { __pyx_t_2 = __pyx_v_nodes; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1669, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(3, 1669, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(3, 1669, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1669, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1670 * nvars = 0 * for node in nodes: * if op2idx[node[0]] == SCIP_EXPR_VARIDX: # <<<<<<<<<<<<<< * nvars += 1 * vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_node, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_op2idx, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_VARIDX); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1671 * for node in nodes: * if op2idx[node[0]] == SCIP_EXPR_VARIDX: * nvars += 1 # <<<<<<<<<<<<<< * vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) * */ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_nvars, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_nvars, __pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1670 * nvars = 0 * for node in nodes: * if op2idx[node[0]] == SCIP_EXPR_VARIDX: # <<<<<<<<<<<<<< * nvars += 1 * vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) */ } /* "pyscipopt/scip.pyx":1669 * # how many variables are there. * nvars = 0 * for node in nodes: # <<<<<<<<<<<<<< * if op2idx[node[0]] == SCIP_EXPR_VARIDX: * nvars += 1 */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1672 * if op2idx[node[0]] == SCIP_EXPR_VARIDX: * nvars += 1 * vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) # <<<<<<<<<<<<<< * * varpos = 0 */ __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(SCIP_VAR *))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Multiply(__pyx_v_nvars, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_vars = ((SCIP_VAR **)malloc(__pyx_t_8)); /* "pyscipopt/scip.pyx":1674 * vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) * * varpos = 0 # <<<<<<<<<<<<<< * scipexprs = <SCIP_EXPR**> malloc(len(nodes) * sizeof(SCIP_EXPR*)) * for i,node in enumerate(nodes): */ __Pyx_INCREF(__pyx_int_0); __pyx_v_varpos = __pyx_int_0; /* "pyscipopt/scip.pyx":1675 * * varpos = 0 * scipexprs = <SCIP_EXPR**> malloc(len(nodes) * sizeof(SCIP_EXPR*)) # <<<<<<<<<<<<<< * for i,node in enumerate(nodes): * op = node[0] */ __pyx_t_4 = PyObject_Length(__pyx_v_nodes); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1675, __pyx_L1_error) __pyx_v_scipexprs = ((SCIP_EXPR **)malloc((__pyx_t_4 * (sizeof(SCIP_EXPR *))))); /* "pyscipopt/scip.pyx":1676 * varpos = 0 * scipexprs = <SCIP_EXPR**> malloc(len(nodes) * sizeof(SCIP_EXPR*)) * for i,node in enumerate(nodes): # <<<<<<<<<<<<<< * op = node[0] * opidx = op2idx[op] */ __Pyx_INCREF(__pyx_int_0); __pyx_t_6 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_nodes)) || PyTuple_CheckExact(__pyx_v_nodes)) { __pyx_t_2 = __pyx_v_nodes; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1676, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(3, 1676, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(3, 1676, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1676, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1677 * scipexprs = <SCIP_EXPR**> malloc(len(nodes) * sizeof(SCIP_EXPR*)) * for i,node in enumerate(nodes): * op = node[0] # <<<<<<<<<<<<<< * opidx = op2idx[op] * if opidx == SCIP_EXPR_VARIDX: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_node, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1678 * for i,node in enumerate(nodes): * op = node[0] * opidx = op2idx[op] # <<<<<<<<<<<<<< * if opidx == SCIP_EXPR_VARIDX: * assert len(node[1]) == 1 */ __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_op2idx, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_opidx, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1679 * op = node[0] * opidx = op2idx[op] * if opidx == SCIP_EXPR_VARIDX: # <<<<<<<<<<<<<< * assert len(node[1]) == 1 * pyvar = node[1][0] # for vars we store the actual var! */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_VARIDX); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1680 * opidx = op2idx[op] * if opidx == SCIP_EXPR_VARIDX: * assert len(node[1]) == 1 # <<<<<<<<<<<<<< * pyvar = node[1][0] # for vars we store the actual var! * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <int>varpos) ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!((__pyx_t_9 == 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 1680, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1681 * if opidx == SCIP_EXPR_VARIDX: * assert len(node[1]) == 1 * pyvar = node[1][0] # for vars we store the actual var! # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <int>varpos) ) * vars[varpos] = (<Variable>pyvar).scip_var */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_pyvar, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1682 * assert len(node[1]) == 1 * pyvar = node[1][0] # for vars we store the actual var! * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <int>varpos) ) # <<<<<<<<<<<<<< * vars[varpos] = (<Variable>pyvar).scip_var * varpos += 1 */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1682, __pyx_L1_error) __pyx_t_10 = ((SCIP_EXPROP)__Pyx_PyInt_As_SCIP_EXPROP(__pyx_v_opidx)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1682, __pyx_L1_error) __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_varpos); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1682, __pyx_L1_error) __pyx_t_12 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_scipexprs[__pyx_t_9])), __pyx_t_10, ((int)__pyx_t_11))); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1683 * pyvar = node[1][0] # for vars we store the actual var! * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <int>varpos) ) * vars[varpos] = (<Variable>pyvar).scip_var # <<<<<<<<<<<<<< * varpos += 1 * continue */ __pyx_t_14 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_pyvar)->scip_var; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_varpos); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1683, __pyx_L1_error) (__pyx_v_vars[__pyx_t_9]) = __pyx_t_14; /* "pyscipopt/scip.pyx":1684 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <int>varpos) ) * vars[varpos] = (<Variable>pyvar).scip_var * varpos += 1 # <<<<<<<<<<<<<< * continue * if opidx == SCIP_EXPR_CONST: */ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_varpos, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_varpos, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1685 * vars[varpos] = (<Variable>pyvar).scip_var * varpos += 1 * continue # <<<<<<<<<<<<<< * if opidx == SCIP_EXPR_CONST: * assert len(node[1]) == 1 */ goto __pyx_L6_continue; /* "pyscipopt/scip.pyx":1679 * op = node[0] * opidx = op2idx[op] * if opidx == SCIP_EXPR_VARIDX: # <<<<<<<<<<<<<< * assert len(node[1]) == 1 * pyvar = node[1][0] # for vars we store the actual var! */ } /* "pyscipopt/scip.pyx":1686 * varpos += 1 * continue * if opidx == SCIP_EXPR_CONST: # <<<<<<<<<<<<<< * assert len(node[1]) == 1 * value = node[1][0] */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_CONST); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1687 * continue * if opidx == SCIP_EXPR_CONST: * assert len(node[1]) == 1 # <<<<<<<<<<<<<< * value = node[1][0] * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <SCIP_Real>value) ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!((__pyx_t_9 == 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 1687, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1688 * if opidx == SCIP_EXPR_CONST: * assert len(node[1]) == 1 * value = node[1][0] # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <SCIP_Real>value) ) * continue */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1689 * assert len(node[1]) == 1 * value = node[1][0] * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <SCIP_Real>value) ) # <<<<<<<<<<<<<< * continue * if opidx == SCIP_EXPR_SUM or opidx == SCIP_EXPR_PRODUCT: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1689, __pyx_L1_error) __pyx_t_10 = ((SCIP_EXPROP)__Pyx_PyInt_As_SCIP_EXPROP(__pyx_v_opidx)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1689, __pyx_L1_error) __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_15 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1689, __pyx_L1_error) __pyx_t_12 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_scipexprs[__pyx_t_9])), __pyx_t_10, ((SCIP_Real)__pyx_t_15))); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1690 * value = node[1][0] * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <SCIP_Real>value) ) * continue # <<<<<<<<<<<<<< * if opidx == SCIP_EXPR_SUM or opidx == SCIP_EXPR_PRODUCT: * nchildren = len(node[1]) */ goto __pyx_L6_continue; /* "pyscipopt/scip.pyx":1686 * varpos += 1 * continue * if opidx == SCIP_EXPR_CONST: # <<<<<<<<<<<<<< * assert len(node[1]) == 1 * value = node[1][0] */ } /* "pyscipopt/scip.pyx":1691 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <SCIP_Real>value) ) * continue * if opidx == SCIP_EXPR_SUM or opidx == SCIP_EXPR_PRODUCT: # <<<<<<<<<<<<<< * nchildren = len(node[1]) * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 1691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_16) { } else { __pyx_t_7 = __pyx_t_16; goto __pyx_L11_bool_binop_done; } __pyx_t_3 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_PRODUCT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 1691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __pyx_t_16; __pyx_L11_bool_binop_done:; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1692 * continue * if opidx == SCIP_EXPR_SUM or opidx == SCIP_EXPR_PRODUCT: * nchildren = len(node[1]) # <<<<<<<<<<<<<< * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) * for c, pos in enumerate(node[1]): */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nchildren = __pyx_t_9; /* "pyscipopt/scip.pyx":1693 * if opidx == SCIP_EXPR_SUM or opidx == SCIP_EXPR_PRODUCT: * nchildren = len(node[1]) * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) # <<<<<<<<<<<<<< * for c, pos in enumerate(node[1]): * childrenexpr[c] = scipexprs[pos] */ __pyx_v_childrenexpr = ((SCIP_EXPR **)malloc((__pyx_v_nchildren * (sizeof(SCIP_EXPR *))))); /* "pyscipopt/scip.pyx":1694 * nchildren = len(node[1]) * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) * for c, pos in enumerate(node[1]): # <<<<<<<<<<<<<< * childrenexpr[c] = scipexprs[pos] * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, nchildren, childrenexpr) ) */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_12 = __pyx_t_3; __Pyx_INCREF(__pyx_t_12); __pyx_t_9 = 0; __pyx_t_17 = NULL; } else { __pyx_t_9 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 1694, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_17)) { if (likely(PyList_CheckExact(__pyx_t_12))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_12)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 1694, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_12, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_12)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 1694, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_12, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1694, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1695 * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) * for c, pos in enumerate(node[1]): * childrenexpr[c] = scipexprs[pos] # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, nchildren, childrenexpr) ) * */ __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_pos); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1695, __pyx_L1_error) __pyx_t_19 = __Pyx_PyIndex_AsSsize_t(__pyx_v_c); if (unlikely((__pyx_t_19 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1695, __pyx_L1_error) (__pyx_v_childrenexpr[__pyx_t_19]) = (__pyx_v_scipexprs[__pyx_t_18]); /* "pyscipopt/scip.pyx":1694 * nchildren = len(node[1]) * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) * for c, pos in enumerate(node[1]): # <<<<<<<<<<<<<< * childrenexpr[c] = scipexprs[pos] * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, nchildren, childrenexpr) ) */ } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1696 * for c, pos in enumerate(node[1]): * childrenexpr[c] = scipexprs[pos] * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, nchildren, childrenexpr) ) # <<<<<<<<<<<<<< * * free(childrenexpr); */ __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1696, __pyx_L1_error) __pyx_t_10 = ((SCIP_EXPROP)__Pyx_PyInt_As_SCIP_EXPROP(__pyx_v_opidx)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1696, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_scipexprs[__pyx_t_9])), __pyx_t_10, __pyx_v_nchildren, __pyx_v_childrenexpr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1698 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, nchildren, childrenexpr) ) * * free(childrenexpr); # <<<<<<<<<<<<<< * continue * if opidx == SCIP_EXPR_REALPOWER: */ free(__pyx_v_childrenexpr); /* "pyscipopt/scip.pyx":1699 * * free(childrenexpr); * continue # <<<<<<<<<<<<<< * if opidx == SCIP_EXPR_REALPOWER: * # the second child is the exponent which is a const */ goto __pyx_L6_continue; /* "pyscipopt/scip.pyx":1691 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, <SCIP_Real>value) ) * continue * if opidx == SCIP_EXPR_SUM or opidx == SCIP_EXPR_PRODUCT: # <<<<<<<<<<<<<< * nchildren = len(node[1]) * childrenexpr = <SCIP_EXPR**> malloc(nchildren * sizeof(SCIP_EXPR*)) */ } /* "pyscipopt/scip.pyx":1700 * free(childrenexpr); * continue * if opidx == SCIP_EXPR_REALPOWER: # <<<<<<<<<<<<<< * # the second child is the exponent which is a const * valuenode = nodes[node[1][1]] */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_REALPOWER); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1702 * if opidx == SCIP_EXPR_REALPOWER: * # the second child is the exponent which is a const * valuenode = nodes[node[1][1]] # <<<<<<<<<<<<<< * assert op2idx[valuenode[0]] == SCIP_EXPR_CONST * exponent = valuenode[1][0] */ __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_valuenode, __pyx_t_12); __pyx_t_12 = 0; /* "pyscipopt/scip.pyx":1703 * # the second child is the exponent which is a const * valuenode = nodes[node[1][1]] * assert op2idx[valuenode[0]] == SCIP_EXPR_CONST # <<<<<<<<<<<<<< * exponent = valuenode[1][0] * if float(exponent).is_integer(): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_valuenode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_op2idx, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_CONST); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 1703, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1704 * valuenode = nodes[node[1][1]] * assert op2idx[valuenode[0]] == SCIP_EXPR_CONST * exponent = valuenode[1][0] # <<<<<<<<<<<<<< * if float(exponent).is_integer(): * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], SCIP_EXPR_INTPOWER, scipexprs[node[1][0]], <int>exponent) ) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_valuenode, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_exponent, __pyx_t_12); __pyx_t_12 = 0; /* "pyscipopt/scip.pyx":1705 * assert op2idx[valuenode[0]] == SCIP_EXPR_CONST * exponent = valuenode[1][0] * if float(exponent).is_integer(): # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], SCIP_EXPR_INTPOWER, scipexprs[node[1][0]], <int>exponent) ) * else: */ __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_v_exponent); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_integer); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_12 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1706 * exponent = valuenode[1][0] * if float(exponent).is_integer(): * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], SCIP_EXPR_INTPOWER, scipexprs[node[1][0]], <int>exponent) ) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]], <SCIP_Real>exponent) ) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1706, __pyx_L1_error) __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_13); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_exponent); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1706, __pyx_L1_error) __pyx_t_13 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_scipexprs[__pyx_t_9])), SCIP_EXPR_INTPOWER, (__pyx_v_scipexprs[__pyx_t_18]), ((int)__pyx_t_11))); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_12 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pyscipopt/scip.pyx":1705 * assert op2idx[valuenode[0]] == SCIP_EXPR_CONST * exponent = valuenode[1][0] * if float(exponent).is_integer(): # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], SCIP_EXPR_INTPOWER, scipexprs[node[1][0]], <int>exponent) ) * else: */ goto __pyx_L16; } /* "pyscipopt/scip.pyx":1708 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], SCIP_EXPR_INTPOWER, scipexprs[node[1][0]], <int>exponent) ) * else: * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]], <SCIP_Real>exponent) ) # <<<<<<<<<<<<<< * continue * if opidx == SCIP_EXPR_EXP or opidx == SCIP_EXPR_LOG or opidx == SCIP_EXPR_SQRT or opidx == SCIP_EXPR_ABS: */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1708, __pyx_L1_error) __pyx_t_10 = ((SCIP_EXPROP)__Pyx_PyInt_As_SCIP_EXPROP(__pyx_v_opidx)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1708, __pyx_L1_error) __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_exponent); if (unlikely((__pyx_t_15 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1708, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_scipexprs[__pyx_t_18])), __pyx_t_10, (__pyx_v_scipexprs[__pyx_t_9]), ((SCIP_Real)__pyx_t_15))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_12 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __pyx_L16:; /* "pyscipopt/scip.pyx":1709 * else: * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]], <SCIP_Real>exponent) ) * continue # <<<<<<<<<<<<<< * if opidx == SCIP_EXPR_EXP or opidx == SCIP_EXPR_LOG or opidx == SCIP_EXPR_SQRT or opidx == SCIP_EXPR_ABS: * assert len(node[1]) == 1 */ goto __pyx_L6_continue; /* "pyscipopt/scip.pyx":1700 * free(childrenexpr); * continue * if opidx == SCIP_EXPR_REALPOWER: # <<<<<<<<<<<<<< * # the second child is the exponent which is a const * valuenode = nodes[node[1][1]] */ } /* "pyscipopt/scip.pyx":1710 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]], <SCIP_Real>exponent) ) * continue * if opidx == SCIP_EXPR_EXP or opidx == SCIP_EXPR_LOG or opidx == SCIP_EXPR_SQRT or opidx == SCIP_EXPR_ABS: # <<<<<<<<<<<<<< * assert len(node[1]) == 1 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]]) ) */ __pyx_t_12 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_EXP); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_16) { } else { __pyx_t_7 = __pyx_t_16; goto __pyx_L18_bool_binop_done; } __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_16) { } else { __pyx_t_7 = __pyx_t_16; goto __pyx_L18_bool_binop_done; } __pyx_t_12 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_SQRT); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_16) { } else { __pyx_t_7 = __pyx_t_16; goto __pyx_L18_bool_binop_done; } __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_ABS); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = PyObject_RichCompare(__pyx_v_opidx, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __pyx_t_16; __pyx_L18_bool_binop_done:; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":1711 * continue * if opidx == SCIP_EXPR_EXP or opidx == SCIP_EXPR_LOG or opidx == SCIP_EXPR_SQRT or opidx == SCIP_EXPR_ABS: * assert len(node[1]) == 1 # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]]) ) * continue */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!((__pyx_t_9 == 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 1711, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1712 * if opidx == SCIP_EXPR_EXP or opidx == SCIP_EXPR_LOG or opidx == SCIP_EXPR_SQRT or opidx == SCIP_EXPR_ABS: * assert len(node[1]) == 1 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]]) ) # <<<<<<<<<<<<<< * continue * # default: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1712, __pyx_L1_error) __pyx_t_10 = ((SCIP_EXPROP)__Pyx_PyInt_As_SCIP_EXPROP(__pyx_v_opidx)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1712, __pyx_L1_error) __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_13); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprCreate(SCIPblkmem(__pyx_v_self->_scip), (&(__pyx_v_scipexprs[__pyx_t_9])), __pyx_t_10, (__pyx_v_scipexprs[__pyx_t_18]))); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_12 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pyscipopt/scip.pyx":1713 * assert len(node[1]) == 1 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]]) ) * continue # <<<<<<<<<<<<<< * # default: * raise NotImplementedError */ goto __pyx_L6_continue; /* "pyscipopt/scip.pyx":1710 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]], <SCIP_Real>exponent) ) * continue * if opidx == SCIP_EXPR_EXP or opidx == SCIP_EXPR_LOG or opidx == SCIP_EXPR_SQRT or opidx == SCIP_EXPR_ABS: # <<<<<<<<<<<<<< * assert len(node[1]) == 1 * PY_SCIP_CALL( SCIPexprCreate(SCIPblkmem(self._scip), &scipexprs[i], opidx, scipexprs[node[1][0]]) ) */ } /* "pyscipopt/scip.pyx":1715 * continue * # default: * raise NotImplementedError # <<<<<<<<<<<<<< * assert varpos == nvars * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(3, 1715, __pyx_L1_error) /* "pyscipopt/scip.pyx":1676 * varpos = 0 * scipexprs = <SCIP_EXPR**> malloc(len(nodes) * sizeof(SCIP_EXPR*)) * for i,node in enumerate(nodes): # <<<<<<<<<<<<<< * op = node[0] * opidx = op2idx[op] */ __pyx_L6_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1716 * # default: * raise NotImplementedError * assert varpos == nvars # <<<<<<<<<<<<<< * * # create expression tree */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_6 = PyObject_RichCompare(__pyx_v_varpos, __pyx_v_nvars, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1716, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 1716, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 1716, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1719 * * # create expression tree * PY_SCIP_CALL( SCIPexprtreeCreate(SCIPblkmem(self._scip), &exprtree, scipexprs[len(nodes) - 1], nvars, 0, NULL) ); # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprtreeSetVars(exprtree, <int>nvars, vars) ); * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Length(__pyx_v_nodes); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1719, __pyx_L1_error) __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_nvars); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1719, __pyx_L1_error) __pyx_t_12 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprtreeCreate(SCIPblkmem(__pyx_v_self->_scip), (&__pyx_v_exprtree), (__pyx_v_scipexprs[(__pyx_t_4 - 1)]), __pyx_t_11, 0, NULL)); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1720 * # create expression tree * PY_SCIP_CALL( SCIPexprtreeCreate(SCIPblkmem(self._scip), &exprtree, scipexprs[len(nodes) - 1], nvars, 0, NULL) ); * PY_SCIP_CALL( SCIPexprtreeSetVars(exprtree, <int>nvars, vars) ); # <<<<<<<<<<<<<< * * # create nonlinear constraint for exprtree */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_nvars); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1720, __pyx_L1_error) __pyx_t_12 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprtreeSetVars(__pyx_v_exprtree, ((int)__pyx_t_11), __pyx_v_vars)); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1723 * * # create nonlinear constraint for exprtree * PY_SCIP_CALL( SCIPcreateConsNonlinear( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), * 0, NULL, NULL, # linear */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pyscipopt/scip.pyx":1724 * # create nonlinear constraint for exprtree * PY_SCIP_CALL( SCIPcreateConsNonlinear( * self._scip, &scip_cons, str_conversion(kwargs['name']), # <<<<<<<<<<<<<< * 0, NULL, NULL, # linear * 1, &exprtree, NULL, # nonlinear */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_12 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_20 = __Pyx_PyObject_AsString(__pyx_t_12); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) __PYX_ERR(3, 1724, __pyx_L1_error) /* "pyscipopt/scip.pyx":1727 * 0, NULL, NULL, # linear * 1, &exprtree, NULL, # nonlinear * kwargs['lhs'], kwargs['rhs'], # <<<<<<<<<<<<<< * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_lhs); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_15 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_rhs); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1728 * 1, &exprtree, NULL, # nonlinear * kwargs['lhs'], kwargs['rhs'], * kwargs['initial'], kwargs['separate'], kwargs['enforce'], # <<<<<<<<<<<<<< * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_initial); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_22 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_separate); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_23 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_enforce); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_24 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1729 * kwargs['lhs'], kwargs['rhs'], * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], # <<<<<<<<<<<<<< * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], * kwargs['stickingatnode']) ) */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_25 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_propagate); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_26 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_local); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_27 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1730 * kwargs['initial'], kwargs['separate'], kwargs['enforce'], * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], # <<<<<<<<<<<<<< * kwargs['stickingatnode']) ) * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_modifiable); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_28 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_dynamic); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_29 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_removable); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_30 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1731 * kwargs['check'], kwargs['propagate'], kwargs['local'], * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], * kwargs['stickingatnode']) ) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_stickingatnode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_31 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1731, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1723 * * # create nonlinear constraint for exprtree * PY_SCIP_CALL( SCIPcreateConsNonlinear( # <<<<<<<<<<<<<< * self._scip, &scip_cons, str_conversion(kwargs['name']), * 0, NULL, NULL, # linear */ __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsNonlinear(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_20, 0, NULL, NULL, 1, (&__pyx_v_exprtree), NULL, __pyx_t_15, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_27, __pyx_t_28, __pyx_t_29, __pyx_t_30, __pyx_t_31)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1732 * kwargs['modifiable'], kwargs['dynamic'], kwargs['removable'], * kwargs['stickingatnode']) ) * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1733 * kwargs['stickingatnode']) ) * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) */ __pyx_t_6 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_PyCons = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1734 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1735 * PyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * PY_SCIP_CALL( SCIPexprtreeFree(&exprtree) ) # <<<<<<<<<<<<<< * * # free more memory */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPexprtreeFree((&__pyx_v_exprtree))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1738 * * # free more memory * free(scipexprs) # <<<<<<<<<<<<<< * free(vars) * */ free(__pyx_v_scipexprs); /* "pyscipopt/scip.pyx":1739 * # free more memory * free(scipexprs) * free(vars) # <<<<<<<<<<<<<< * * return PyCons */ free(__pyx_v_vars); /* "pyscipopt/scip.pyx":1741 * free(vars) * * return PyCons # <<<<<<<<<<<<<< * * def addConsCoeff(self, Constraint cons, Variable var, coeff): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_PyCons); __pyx_r = __pyx_v_PyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1648 * return PyCons * * def _addGenNonlinearCons(self, ExprCons cons, **kwargs): # <<<<<<<<<<<<<< * cdef SCIP_EXPR** childrenexpr * cdef SCIP_EXPR** scipexprs */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pyscipopt.scip.Model._addGenNonlinearCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_expr); __Pyx_XDECREF(__pyx_v_nodes); __Pyx_XDECREF(__pyx_v_op2idx); __Pyx_XDECREF(__pyx_v_nvars); __Pyx_XDECREF(__pyx_v_node); __Pyx_XDECREF(__pyx_v_varpos); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_op); __Pyx_XDECREF(__pyx_v_opidx); __Pyx_XDECREF(__pyx_v_pyvar); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_c); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_valuenode); __Pyx_XDECREF(__pyx_v_exponent); __Pyx_XDECREF(__pyx_v_PyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1743 * return PyCons * * def addConsCoeff(self, Constraint cons, Variable var, coeff): # <<<<<<<<<<<<<< * """Add coefficient to the linear constraint (if non-zero). * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_205addConsCoeff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_204addConsCoeff[] = "Add coefficient to the linear constraint (if non-zero).\n\n :param Constraint cons: constraint to be changed\n :param Variable var: variable to be added\n :param coeff: coefficient of new variable\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_205addConsCoeff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_coeff = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsCoeff (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_var,&__pyx_n_s_coeff,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsCoeff", 1, 3, 3, 1); __PYX_ERR(3, 1743, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coeff)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsCoeff", 1, 3, 3, 2); __PYX_ERR(3, 1743, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsCoeff") < 0)) __PYX_ERR(3, 1743, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_coeff = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsCoeff", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1743, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsCoeff", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 1743, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 1743, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_204addConsCoeff(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_var, __pyx_v_coeff); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_204addConsCoeff(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_coeff) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsCoeff", 0); /* "pyscipopt/scip.pyx":1751 * * """ * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, cons.scip_cons, var.scip_var, coeff)) # <<<<<<<<<<<<<< * * def addConsNode(self, Node node, Constraint cons, Node validnode=None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_coeff); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1751, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCoefLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1743 * return PyCons * * def addConsCoeff(self, Constraint cons, Variable var, coeff): # <<<<<<<<<<<<<< * """Add coefficient to the linear constraint (if non-zero). * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsCoeff", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1753 * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, cons.scip_cons, var.scip_var, coeff)) * * def addConsNode(self, Node node, Constraint cons, Node validnode=None): # <<<<<<<<<<<<<< * """Add a constraint to the given node * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_207addConsNode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_206addConsNode[] = "Add a constraint to the given node\n\n :param Node node: node to add the constraint to\n :param Constraint cons: constraint to add\n :param Node validnode: more global node where cons is also valid\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_207addConsNode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node = 0; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_validnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsNode (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_node,&__pyx_n_s_cons,&__pyx_n_s_validnode,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Node *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsNode", 0, 2, 3, 1); __PYX_ERR(3, 1753, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validnode); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsNode") < 0)) __PYX_ERR(3, 1753, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_node = ((struct __pyx_obj_9pyscipopt_4scip_Node *)values[0]); __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[1]); __pyx_v_validnode = ((struct __pyx_obj_9pyscipopt_4scip_Node *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsNode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1753, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_9pyscipopt_4scip_Node, 1, "node", 0))) __PYX_ERR(3, 1753, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 1753, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_validnode), __pyx_ptype_9pyscipopt_4scip_Node, 1, "validnode", 0))) __PYX_ERR(3, 1753, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_206addConsNode(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_node, __pyx_v_cons, __pyx_v_validnode); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_206addConsNode(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_node, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_validnode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsNode", 0); /* "pyscipopt/scip.pyx":1761 * * """ * if isinstance(validnode, Node): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, validnode.scip_node)) * else: */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_validnode), __pyx_ptype_9pyscipopt_4scip_Node); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1762 * """ * if isinstance(validnode, Node): * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, validnode.scip_node)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, NULL)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddConsNode(__pyx_v_self->_scip, __pyx_v_node->scip_node, __pyx_v_cons->scip_cons, __pyx_v_validnode->scip_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1761 * * """ * if isinstance(validnode, Node): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, validnode.scip_node)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1764 * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, validnode.scip_node)) * else: * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, NULL)) # <<<<<<<<<<<<<< * * def addConsLocal(self, Constraint cons, Node validnode=None): */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddConsNode(__pyx_v_self->_scip, __pyx_v_node->scip_node, __pyx_v_cons->scip_cons, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":1753 * PY_SCIP_CALL(SCIPaddCoefLinear(self._scip, cons.scip_cons, var.scip_var, coeff)) * * def addConsNode(self, Node node, Constraint cons, Node validnode=None): # <<<<<<<<<<<<<< * """Add a constraint to the given node * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1766 * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, NULL)) * * def addConsLocal(self, Constraint cons, Node validnode=None): # <<<<<<<<<<<<<< * """Add a constraint to the current node * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_209addConsLocal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_208addConsLocal[] = "Add a constraint to the current node\n\n :param Constraint cons: constraint to add\n :param Node validnode: more global node where cons is also valid\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_209addConsLocal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_validnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsLocal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_validnode,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Node *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validnode); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsLocal") < 0)) __PYX_ERR(3, 1766, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_validnode = ((struct __pyx_obj_9pyscipopt_4scip_Node *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsLocal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1766, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsLocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 1766, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_validnode), __pyx_ptype_9pyscipopt_4scip_Node, 1, "validnode", 0))) __PYX_ERR(3, 1766, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_208addConsLocal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_validnode); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_208addConsLocal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Node *__pyx_v_validnode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsLocal", 0); /* "pyscipopt/scip.pyx":1773 * * """ * if isinstance(validnode, Node): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, validnode.scip_node)) * else: */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_validnode), __pyx_ptype_9pyscipopt_4scip_Node); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":1774 * """ * if isinstance(validnode, Node): * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, validnode.scip_node)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, NULL)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddConsLocal(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_validnode->scip_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1773 * * """ * if isinstance(validnode, Node): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, validnode.scip_node)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1776 * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, validnode.scip_node)) * else: * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, NULL)) # <<<<<<<<<<<<<< * * def addConsSOS1(self, vars, weights=None, name="SOS1cons", */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddConsLocal(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":1766 * PY_SCIP_CALL(SCIPaddConsNode(self._scip, node.scip_node, cons.scip_cons, NULL)) * * def addConsLocal(self, Constraint cons, Node validnode=None): # <<<<<<<<<<<<<< * """Add a constraint to the current node * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsLocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1778 * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, NULL)) * * def addConsSOS1(self, vars, weights=None, name="SOS1cons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_211addConsSOS1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_210addConsSOS1[] = "Add an SOS1 constraint.\n\n :param vars: list of variables to be included\n :param weights: list of weights (Default value = None)\n :param name: name of the constraint (Default value = \"SOS1cons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_211addConsSOS1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vars = 0; PyObject *__pyx_v_weights = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsSOS1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vars,&__pyx_n_s_weights,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)__pyx_n_u_SOS1cons); /* "pyscipopt/scip.pyx":1779 * * def addConsSOS1(self, vars, weights=None, name="SOS1cons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1780 * def addConsSOS1(self, vars, weights=None, name="SOS1cons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add an SOS1 constraint. */ values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1781 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add an SOS1 constraint. * */ values[10] = ((PyObject *)Py_False); values[11] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsSOS1") < 0)) __PYX_ERR(3, 1778, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vars = values[0]; __pyx_v_weights = values[1]; __pyx_v_name = values[2]; __pyx_v_initial = values[3]; __pyx_v_separate = values[4]; __pyx_v_enforce = values[5]; __pyx_v_check = values[6]; __pyx_v_propagate = values[7]; __pyx_v_local = values[8]; __pyx_v_dynamic = values[9]; __pyx_v_removable = values[10]; __pyx_v_stickingatnode = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsSOS1", 0, 1, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1778, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsSOS1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_210addConsSOS1(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_vars, __pyx_v_weights, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1778 * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, NULL)) * * def addConsSOS1(self, vars, weights=None, name="SOS1cons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_210addConsSOS1(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_weights, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; PyObject *__pyx_v_v = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; Py_ssize_t __pyx_v_nvars; Py_ssize_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_Bool __pyx_t_7; SCIP_Bool __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; PyObject *(*__pyx_t_19)(PyObject *); Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; SCIP_Real __pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsSOS1", 0); /* "pyscipopt/scip.pyx":1801 * cdef int _nvars * * PY_SCIP_CALL(SCIPcreateConsSOS1(self._scip, &scip_cons, str_conversion(name), 0, NULL, NULL, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1801, __pyx_L1_error) /* "pyscipopt/scip.pyx":1802 * * PY_SCIP_CALL(SCIPcreateConsSOS1(self._scip, &scip_cons, str_conversion(name), 0, NULL, NULL, * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * * if weights is None: */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1802, __pyx_L1_error) /* "pyscipopt/scip.pyx":1801 * cdef int _nvars * * PY_SCIP_CALL(SCIPcreateConsSOS1(self._scip, &scip_cons, str_conversion(name), 0, NULL, NULL, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * */ __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsSOS1(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_6, 0, NULL, NULL, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1804 * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * * if weights is None: # <<<<<<<<<<<<<< * for v in vars: * var = <Variable>v */ __pyx_t_16 = (__pyx_v_weights == Py_None); __pyx_t_17 = (__pyx_t_16 != 0); if (__pyx_t_17) { /* "pyscipopt/scip.pyx":1805 * * if weights is None: * for v in vars: # <<<<<<<<<<<<<< * var = <Variable>v * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, scip_cons, var.scip_var)) */ if (likely(PyList_CheckExact(__pyx_v_vars)) || PyTuple_CheckExact(__pyx_v_vars)) { __pyx_t_1 = __pyx_v_vars; __Pyx_INCREF(__pyx_t_1); __pyx_t_18 = 0; __pyx_t_19 = NULL; } else { __pyx_t_18 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(3, 1805, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_19)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(3, 1805, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(3, 1805, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_19(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1805, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1806 * if weights is None: * for v in vars: * var = <Variable>v # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, scip_cons, var.scip_var)) * else: */ __pyx_t_2 = __pyx_v_v; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_2)); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1807 * for v in vars: * var = <Variable>v * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, scip_cons, var.scip_var)) # <<<<<<<<<<<<<< * else: * nvars = len(vars) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPappendVarSOS1(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1805 * * if weights is None: * for v in vars: # <<<<<<<<<<<<<< * var = <Variable>v * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, scip_cons, var.scip_var)) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1804 * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * * if weights is None: # <<<<<<<<<<<<<< * for v in vars: * var = <Variable>v */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1809 * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, scip_cons, var.scip_var)) * else: * nvars = len(vars) # <<<<<<<<<<<<<< * for i in range(nvars): * var = <Variable>vars[i] */ /*else*/ { __pyx_t_18 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1809, __pyx_L1_error) __pyx_v_nvars = __pyx_t_18; /* "pyscipopt/scip.pyx":1810 * else: * nvars = len(vars) * for i in range(nvars): # <<<<<<<<<<<<<< * var = <Variable>vars[i] * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, scip_cons, var.scip_var, weights[i])) */ __pyx_t_18 = __pyx_v_nvars; __pyx_t_20 = __pyx_t_18; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pyscipopt/scip.pyx":1811 * nvars = len(vars) * for i in range(nvars): * var = <Variable>vars[i] # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, scip_cons, var.scip_var, weights[i])) * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_vars, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_2)); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1812 * for i in range(nvars): * var = <Variable>vars[i] * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, scip_cons, var.scip_var, weights[i])) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_weights, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_22 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1812, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarSOS1(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, __pyx_t_22)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __pyx_L3:; /* "pyscipopt/scip.pyx":1814 * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, scip_cons, var.scip_var, weights[i])) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * return Constraint.create(scip_cons) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1815 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * return Constraint.create(scip_cons) # <<<<<<<<<<<<<< * * def addConsSOS2(self, vars, weights=None, name="SOS2cons", */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1778 * PY_SCIP_CALL(SCIPaddConsLocal(self._scip, cons.scip_cons, NULL)) * * def addConsSOS1(self, vars, weights=None, name="SOS1cons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsSOS1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1817 * return Constraint.create(scip_cons) * * def addConsSOS2(self, vars, weights=None, name="SOS2cons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_213addConsSOS2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_212addConsSOS2[] = "Add an SOS2 constraint.\n\n :param vars: list of variables to be included\n :param weights: list of weights (Default value = None)\n :param name: name of the constraint (Default value = \"SOS2cons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: is the constraint only valid locally? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_213addConsSOS2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vars = 0; PyObject *__pyx_v_weights = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsSOS2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vars,&__pyx_n_s_weights,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)__pyx_n_u_SOS2cons); /* "pyscipopt/scip.pyx":1818 * * def addConsSOS2(self, vars, weights=None, name="SOS2cons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1819 * def addConsSOS2(self, vars, weights=None, name="SOS2cons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add an SOS2 constraint. */ values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1820 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add an SOS2 constraint. * */ values[10] = ((PyObject *)Py_False); values[11] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsSOS2") < 0)) __PYX_ERR(3, 1817, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vars = values[0]; __pyx_v_weights = values[1]; __pyx_v_name = values[2]; __pyx_v_initial = values[3]; __pyx_v_separate = values[4]; __pyx_v_enforce = values[5]; __pyx_v_check = values[6]; __pyx_v_propagate = values[7]; __pyx_v_local = values[8]; __pyx_v_dynamic = values[9]; __pyx_v_removable = values[10]; __pyx_v_stickingatnode = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsSOS2", 0, 1, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1817, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsSOS2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_212addConsSOS2(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_vars, __pyx_v_weights, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1817 * return Constraint.create(scip_cons) * * def addConsSOS2(self, vars, weights=None, name="SOS2cons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_212addConsSOS2(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_weights, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; PyObject *__pyx_v_v = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; Py_ssize_t __pyx_v_nvars; Py_ssize_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_Bool __pyx_t_7; SCIP_Bool __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; PyObject *(*__pyx_t_19)(PyObject *); Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; SCIP_Real __pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsSOS2", 0); /* "pyscipopt/scip.pyx":1840 * cdef int _nvars * * PY_SCIP_CALL(SCIPcreateConsSOS2(self._scip, &scip_cons, str_conversion(name), 0, NULL, NULL, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1840, __pyx_L1_error) /* "pyscipopt/scip.pyx":1841 * * PY_SCIP_CALL(SCIPcreateConsSOS2(self._scip, &scip_cons, str_conversion(name), 0, NULL, NULL, * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * * if weights is None: */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1841, __pyx_L1_error) /* "pyscipopt/scip.pyx":1840 * cdef int _nvars * * PY_SCIP_CALL(SCIPcreateConsSOS2(self._scip, &scip_cons, str_conversion(name), 0, NULL, NULL, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * */ __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsSOS2(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_6, 0, NULL, NULL, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1843 * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * * if weights is None: # <<<<<<<<<<<<<< * for v in vars: * var = <Variable>v */ __pyx_t_16 = (__pyx_v_weights == Py_None); __pyx_t_17 = (__pyx_t_16 != 0); if (__pyx_t_17) { /* "pyscipopt/scip.pyx":1844 * * if weights is None: * for v in vars: # <<<<<<<<<<<<<< * var = <Variable>v * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, scip_cons, var.scip_var)) */ if (likely(PyList_CheckExact(__pyx_v_vars)) || PyTuple_CheckExact(__pyx_v_vars)) { __pyx_t_1 = __pyx_v_vars; __Pyx_INCREF(__pyx_t_1); __pyx_t_18 = 0; __pyx_t_19 = NULL; } else { __pyx_t_18 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(3, 1844, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_19)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(3, 1844, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(3, 1844, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_19(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1844, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1845 * if weights is None: * for v in vars: * var = <Variable>v # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, scip_cons, var.scip_var)) * else: */ __pyx_t_2 = __pyx_v_v; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_2)); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1846 * for v in vars: * var = <Variable>v * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, scip_cons, var.scip_var)) # <<<<<<<<<<<<<< * else: * nvars = len(vars) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPappendVarSOS2(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1844 * * if weights is None: * for v in vars: # <<<<<<<<<<<<<< * var = <Variable>v * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, scip_cons, var.scip_var)) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":1843 * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * * if weights is None: # <<<<<<<<<<<<<< * for v in vars: * var = <Variable>v */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":1848 * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, scip_cons, var.scip_var)) * else: * nvars = len(vars) # <<<<<<<<<<<<<< * for i in range(nvars): * var = <Variable>vars[i] */ /*else*/ { __pyx_t_18 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1848, __pyx_L1_error) __pyx_v_nvars = __pyx_t_18; /* "pyscipopt/scip.pyx":1849 * else: * nvars = len(vars) * for i in range(nvars): # <<<<<<<<<<<<<< * var = <Variable>vars[i] * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, scip_cons, var.scip_var, weights[i])) */ __pyx_t_18 = __pyx_v_nvars; __pyx_t_20 = __pyx_t_18; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pyscipopt/scip.pyx":1850 * nvars = len(vars) * for i in range(nvars): * var = <Variable>vars[i] # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, scip_cons, var.scip_var, weights[i])) * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_vars, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_2)); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1851 * for i in range(nvars): * var = <Variable>vars[i] * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, scip_cons, var.scip_var, weights[i])) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_weights, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_22 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarSOS2(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, __pyx_t_22)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __pyx_L3:; /* "pyscipopt/scip.pyx":1853 * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, scip_cons, var.scip_var, weights[i])) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * return Constraint.create(scip_cons) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1854 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * return Constraint.create(scip_cons) # <<<<<<<<<<<<<< * * def addConsAnd(self, vars, resvar, name="ANDcons", */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":1817 * return Constraint.create(scip_cons) * * def addConsSOS2(self, vars, weights=None, name="SOS2cons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsSOS2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1856 * return Constraint.create(scip_cons) * * def addConsAnd(self, vars, resvar, name="ANDcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_215addConsAnd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_214addConsAnd[] = "Add an AND-constraint.\n :param vars: list of BINARY variables to be included (operators)\n :param resvar: BINARY variable (resultant)\n :param name: name of the constraint (Default value = \"ANDcons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param modifiable: is the constraint modifiable (subject to column generation)? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_215addConsAnd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vars = 0; PyObject *__pyx_v_resvar = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsAnd (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vars,&__pyx_n_s_resvar,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_u_ANDcons); /* "pyscipopt/scip.pyx":1857 * * def addConsAnd(self, vars, resvar, name="ANDcons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, modifiable=False, dynamic=False, * removable=False, stickingatnode=False): */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1858 * def addConsAnd(self, vars, resvar, name="ANDcons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add an AND-constraint. */ values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); values[10] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1859 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add an AND-constraint. * :param vars: list of BINARY variables to be included (operators) */ values[11] = ((PyObject *)Py_False); values[12] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resvar)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsAnd", 0, 2, 13, 1); __PYX_ERR(3, 1856, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[11] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 12: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[12] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsAnd") < 0)) __PYX_ERR(3, 1856, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vars = values[0]; __pyx_v_resvar = values[1]; __pyx_v_name = values[2]; __pyx_v_initial = values[3]; __pyx_v_separate = values[4]; __pyx_v_enforce = values[5]; __pyx_v_check = values[6]; __pyx_v_propagate = values[7]; __pyx_v_local = values[8]; __pyx_v_modifiable = values[9]; __pyx_v_dynamic = values[10]; __pyx_v_removable = values[11]; __pyx_v_stickingatnode = values[12]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsAnd", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1856, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsAnd", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_214addConsAnd(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_vars, __pyx_v_resvar, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_modifiable, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1856 * return Constraint.create(scip_cons) * * def addConsAnd(self, vars, resvar, name="ANDcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_214addConsAnd(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_resvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; Py_ssize_t __pyx_v_nvars; SCIP_VAR **__pyx_v__vars; PyObject *__pyx_v_idx = NULL; PyObject *__pyx_v_var = NULL; SCIP_VAR *__pyx_v__resVar; PyObject *__pyx_v_pyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; SCIP_VAR *__pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; char const *__pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; SCIP_Bool __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsAnd", 0); /* "pyscipopt/scip.pyx":1877 * cdef SCIP_CONS* scip_cons * * nvars = len(vars) # <<<<<<<<<<<<<< * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) */ __pyx_t_1 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1877, __pyx_L1_error) __pyx_v_nvars = __pyx_t_1; /* "pyscipopt/scip.pyx":1879 * nvars = len(vars) * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) # <<<<<<<<<<<<<< * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var */ __pyx_t_1 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1879, __pyx_L1_error) __pyx_v__vars = ((SCIP_VAR **)malloc((__pyx_t_1 * (sizeof(SCIP_VAR *))))); /* "pyscipopt/scip.pyx":1880 * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): # <<<<<<<<<<<<<< * _vars[idx] = (<Variable>var).scip_var * _resVar = (<Variable>resvar).scip_var */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_vars)) || PyTuple_CheckExact(__pyx_v_vars)) { __pyx_t_3 = __pyx_v_vars; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = NULL; } else { __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1880, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 1880, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 1880, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1880, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_2); __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1881 * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var # <<<<<<<<<<<<<< * _resVar = (<Variable>resvar).scip_var * */ __pyx_t_6 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)->scip_var; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1881, __pyx_L1_error) (__pyx_v__vars[__pyx_t_7]) = __pyx_t_6; /* "pyscipopt/scip.pyx":1880 * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): # <<<<<<<<<<<<<< * _vars[idx] = (<Variable>var).scip_var * _resVar = (<Variable>resvar).scip_var */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1882 * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var * _resVar = (<Variable>resvar).scip_var # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPcreateConsAnd(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, */ __pyx_t_6 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_resvar)->scip_var; __pyx_v__resVar = __pyx_t_6; /* "pyscipopt/scip.pyx":1884 * _resVar = (<Variable>resvar).scip_var * * PY_SCIP_CALL(SCIPcreateConsAnd(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_5); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(3, 1884, __pyx_L1_error) /* "pyscipopt/scip.pyx":1885 * * PY_SCIP_CALL(SCIPcreateConsAnd(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_modifiable); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1885, __pyx_L1_error) /* "pyscipopt/scip.pyx":1884 * _resVar = (<Variable>resvar).scip_var * * PY_SCIP_CALL(SCIPcreateConsAnd(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * */ __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsAnd(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_10, __pyx_v__resVar, __pyx_v_nvars, __pyx_v__vars, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1887 * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * pyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1888 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pyCons = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1889 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * * free(_vars) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1891 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * * free(_vars) # <<<<<<<<<<<<<< * * return pyCons */ free(__pyx_v__vars); /* "pyscipopt/scip.pyx":1893 * free(_vars) * * return pyCons # <<<<<<<<<<<<<< * * def addConsOr(self, vars, resvar, name="ORcons", */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyCons); __pyx_r = __pyx_v_pyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1856 * return Constraint.create(scip_cons) * * def addConsAnd(self, vars, resvar, name="ANDcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsAnd", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_pyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1895 * return pyCons * * def addConsOr(self, vars, resvar, name="ORcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_217addConsOr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_216addConsOr[] = "Add an OR-constraint.\n :param vars: list of BINARY variables to be included (operators)\n :param resvar: BINARY variable (resultant)\n :param name: name of the constraint (Default value = \"ORcons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param modifiable: is the constraint modifiable (subject to column generation)? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_217addConsOr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vars = 0; PyObject *__pyx_v_resvar = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsOr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vars,&__pyx_n_s_resvar,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_u_ORcons); /* "pyscipopt/scip.pyx":1896 * * def addConsOr(self, vars, resvar, name="ORcons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, modifiable=False, dynamic=False, * removable=False, stickingatnode=False): */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1897 * def addConsOr(self, vars, resvar, name="ORcons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add an OR-constraint. */ values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); values[10] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1898 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add an OR-constraint. * :param vars: list of BINARY variables to be included (operators) */ values[11] = ((PyObject *)Py_False); values[12] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resvar)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsOr", 0, 2, 13, 1); __PYX_ERR(3, 1895, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[11] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 12: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[12] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsOr") < 0)) __PYX_ERR(3, 1895, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vars = values[0]; __pyx_v_resvar = values[1]; __pyx_v_name = values[2]; __pyx_v_initial = values[3]; __pyx_v_separate = values[4]; __pyx_v_enforce = values[5]; __pyx_v_check = values[6]; __pyx_v_propagate = values[7]; __pyx_v_local = values[8]; __pyx_v_modifiable = values[9]; __pyx_v_dynamic = values[10]; __pyx_v_removable = values[11]; __pyx_v_stickingatnode = values[12]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsOr", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1895, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsOr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_216addConsOr(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_vars, __pyx_v_resvar, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_modifiable, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1895 * return pyCons * * def addConsOr(self, vars, resvar, name="ORcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_216addConsOr(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_resvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; Py_ssize_t __pyx_v_nvars; SCIP_VAR **__pyx_v__vars; PyObject *__pyx_v_idx = NULL; PyObject *__pyx_v_var = NULL; SCIP_VAR *__pyx_v__resVar; PyObject *__pyx_v_pyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; SCIP_VAR *__pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; char const *__pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; SCIP_Bool __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsOr", 0); /* "pyscipopt/scip.pyx":1916 * cdef SCIP_CONS* scip_cons * * nvars = len(vars) # <<<<<<<<<<<<<< * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) */ __pyx_t_1 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1916, __pyx_L1_error) __pyx_v_nvars = __pyx_t_1; /* "pyscipopt/scip.pyx":1918 * nvars = len(vars) * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) # <<<<<<<<<<<<<< * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var */ __pyx_t_1 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1918, __pyx_L1_error) __pyx_v__vars = ((SCIP_VAR **)malloc((__pyx_t_1 * (sizeof(SCIP_VAR *))))); /* "pyscipopt/scip.pyx":1919 * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): # <<<<<<<<<<<<<< * _vars[idx] = (<Variable>var).scip_var * _resVar = (<Variable>resvar).scip_var */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_vars)) || PyTuple_CheckExact(__pyx_v_vars)) { __pyx_t_3 = __pyx_v_vars; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = NULL; } else { __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1919, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 1919, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 1919, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1919, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_2); __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":1920 * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var # <<<<<<<<<<<<<< * _resVar = (<Variable>resvar).scip_var * */ __pyx_t_6 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)->scip_var; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1920, __pyx_L1_error) (__pyx_v__vars[__pyx_t_7]) = __pyx_t_6; /* "pyscipopt/scip.pyx":1919 * * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): # <<<<<<<<<<<<<< * _vars[idx] = (<Variable>var).scip_var * _resVar = (<Variable>resvar).scip_var */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1921 * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var * _resVar = (<Variable>resvar).scip_var # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPcreateConsOr(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, */ __pyx_t_6 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_resvar)->scip_var; __pyx_v__resVar = __pyx_t_6; /* "pyscipopt/scip.pyx":1923 * _resVar = (<Variable>resvar).scip_var * * PY_SCIP_CALL(SCIPcreateConsOr(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_5); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(3, 1923, __pyx_L1_error) /* "pyscipopt/scip.pyx":1924 * * PY_SCIP_CALL(SCIPcreateConsOr(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_modifiable); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1924, __pyx_L1_error) /* "pyscipopt/scip.pyx":1923 * _resVar = (<Variable>resvar).scip_var * * PY_SCIP_CALL(SCIPcreateConsOr(self._scip, &scip_cons, str_conversion(name), _resVar, nvars, _vars, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * */ __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsOr(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_10, __pyx_v__resVar, __pyx_v_nvars, __pyx_v__vars, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1926 * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * pyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1927 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pyCons = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1928 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * * free(_vars) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":1930 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * * free(_vars) # <<<<<<<<<<<<<< * * return pyCons */ free(__pyx_v__vars); /* "pyscipopt/scip.pyx":1932 * free(_vars) * * return pyCons # <<<<<<<<<<<<<< * * def addConsXor(self, vars, rhsvar, name="XORcons", */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyCons); __pyx_r = __pyx_v_pyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1895 * return pyCons * * def addConsOr(self, vars, resvar, name="ORcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsOr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_pyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1934 * return pyCons * * def addConsXor(self, vars, rhsvar, name="XORcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_219addConsXor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_218addConsXor[] = "Add a XOR-constraint.\n :param vars: list of BINARY variables to be included (operators)\n :param rhsvar: BOOLEAN value, explicit True, False or bool(obj) is needed (right-hand side)\n :param name: name of the constraint (Default value = \"XORcons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param modifiable: is the constraint modifiable (subject to column generation)? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_219addConsXor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vars = 0; PyObject *__pyx_v_rhsvar = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsXor (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vars,&__pyx_n_s_rhsvar,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_u_XORcons); /* "pyscipopt/scip.pyx":1935 * * def addConsXor(self, vars, rhsvar, name="XORcons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, modifiable=False, dynamic=False, * removable=False, stickingatnode=False): */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1936 * def addConsXor(self, vars, rhsvar, name="XORcons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add a XOR-constraint. */ values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); values[10] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1937 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add a XOR-constraint. * :param vars: list of BINARY variables to be included (operators) */ values[11] = ((PyObject *)Py_False); values[12] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhsvar)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsXor", 0, 2, 13, 1); __PYX_ERR(3, 1934, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[11] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 12: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[12] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsXor") < 0)) __PYX_ERR(3, 1934, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vars = values[0]; __pyx_v_rhsvar = values[1]; __pyx_v_name = values[2]; __pyx_v_initial = values[3]; __pyx_v_separate = values[4]; __pyx_v_enforce = values[5]; __pyx_v_check = values[6]; __pyx_v_propagate = values[7]; __pyx_v_local = values[8]; __pyx_v_modifiable = values[9]; __pyx_v_dynamic = values[10]; __pyx_v_removable = values[11]; __pyx_v_stickingatnode = values[12]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsXor", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1934, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsXor", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_218addConsXor(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_vars, __pyx_v_rhsvar, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_modifiable, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1934 * return pyCons * * def addConsXor(self, vars, rhsvar, name="XORcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_218addConsXor(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_rhsvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; Py_ssize_t __pyx_v_nvars; SCIP_VAR **__pyx_v__vars; PyObject *__pyx_v_idx = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_pyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; SCIP_VAR *__pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; char const *__pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; SCIP_Bool __pyx_t_20; SCIP_Bool __pyx_t_21; SCIP_Bool __pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsXor", 0); /* "pyscipopt/scip.pyx":1955 * cdef SCIP_CONS* scip_cons * * nvars = len(vars) # <<<<<<<<<<<<<< * * assert type(rhsvar) is type(bool()), "Provide BOOLEAN value as rhsvar, you gave %s." % type(rhsvar) */ __pyx_t_1 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1955, __pyx_L1_error) __pyx_v_nvars = __pyx_t_1; /* "pyscipopt/scip.pyx":1957 * nvars = len(vars) * * assert type(rhsvar) is type(bool()), "Provide BOOLEAN value as rhsvar, you gave %s." % type(rhsvar) # <<<<<<<<<<<<<< * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_rhsvar)) == ((PyObject *)Py_TYPE(Py_False))); if (unlikely(!(__pyx_t_2 != 0))) { __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Provide_BOOLEAN_value_as_rhsvar, ((PyObject *)Py_TYPE(__pyx_v_rhsvar))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 1957, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":1958 * * assert type(rhsvar) is type(bool()), "Provide BOOLEAN value as rhsvar, you gave %s." % type(rhsvar) * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) # <<<<<<<<<<<<<< * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var */ __pyx_t_1 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1958, __pyx_L1_error) __pyx_v__vars = ((SCIP_VAR **)malloc((__pyx_t_1 * (sizeof(SCIP_VAR *))))); /* "pyscipopt/scip.pyx":1959 * assert type(rhsvar) is type(bool()), "Provide BOOLEAN value as rhsvar, you gave %s." % type(rhsvar) * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): # <<<<<<<<<<<<<< * _vars[idx] = (<Variable>var).scip_var * */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_vars)) || PyTuple_CheckExact(__pyx_v_vars)) { __pyx_t_4 = __pyx_v_vars; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_5 = NULL; } else { __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1959, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 1959, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 1959, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 1959, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3); __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1960 * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): * _vars[idx] = (<Variable>var).scip_var # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPcreateConsXor(self._scip, &scip_cons, str_conversion(name), rhsvar, nvars, _vars, */ __pyx_t_7 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)->scip_var; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1960, __pyx_L1_error) (__pyx_v__vars[__pyx_t_8]) = __pyx_t_7; /* "pyscipopt/scip.pyx":1959 * assert type(rhsvar) is type(bool()), "Provide BOOLEAN value as rhsvar, you gave %s." % type(rhsvar) * _vars = <SCIP_VAR**> malloc(len(vars) * sizeof(SCIP_VAR*)) * for idx, var in enumerate(vars): # <<<<<<<<<<<<<< * _vars[idx] = (<Variable>var).scip_var * */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1962 * _vars[idx] = (<Variable>var).scip_var * * PY_SCIP_CALL(SCIPcreateConsXor(self._scip, &scip_cons, str_conversion(name), rhsvar, nvars, _vars, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_6); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(3, 1962, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_rhsvar); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1962, __pyx_L1_error) /* "pyscipopt/scip.pyx":1963 * * PY_SCIP_CALL(SCIPcreateConsXor(self._scip, &scip_cons, str_conversion(name), rhsvar, nvars, _vars, * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_modifiable); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_21 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_22 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1963, __pyx_L1_error) /* "pyscipopt/scip.pyx":1962 * _vars[idx] = (<Variable>var).scip_var * * PY_SCIP_CALL(SCIPcreateConsXor(self._scip, &scip_cons, str_conversion(name), rhsvar, nvars, _vars, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * */ __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsXor(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_11, __pyx_t_12, __pyx_v_nvars, __pyx_v__vars, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1965 * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * pyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1966 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * */ __pyx_t_3 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_pyCons = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1967 * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * * free(_vars) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":1969 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * * free(_vars) # <<<<<<<<<<<<<< * * return pyCons */ free(__pyx_v__vars); /* "pyscipopt/scip.pyx":1971 * free(_vars) * * return pyCons # <<<<<<<<<<<<<< * * def addConsCardinality(self, consvars, cardval, indvars=None, weights=None, name="CardinalityCons", */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyCons); __pyx_r = __pyx_v_pyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1934 * return pyCons * * def addConsXor(self, vars, rhsvar, name="XORcons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, modifiable=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsXor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_pyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":1973 * return pyCons * * def addConsCardinality(self, consvars, cardval, indvars=None, weights=None, name="CardinalityCons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_221addConsCardinality(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_220addConsCardinality[] = "Add a cardinality constraint that allows at most 'cardval' many nonzero variables.\n\n :param consvars: list of variables to be included\n :param cardval: nonnegative integer\n :param indvars: indicator variables indicating which variables may be treated as nonzero in cardinality constraint, or None if new indicator variables should be introduced automatically (Default value = None)\n :param weights: weights determining the variable order, or None if variables should be ordered in the same way they were added to the constraint (Default value = None)\n :param name: name of the constraint (Default value = \"CardinalityCons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_221addConsCardinality(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_consvars = 0; PyObject *__pyx_v_cardval = 0; PyObject *__pyx_v_indvars = 0; PyObject *__pyx_v_weights = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsCardinality (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_consvars,&__pyx_n_s_cardval,&__pyx_n_s_indvars,&__pyx_n_s_weights,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0}; values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)__pyx_n_u_CardinalityCons); /* "pyscipopt/scip.pyx":1974 * * def addConsCardinality(self, consvars, cardval, indvars=None, weights=None, name="CardinalityCons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): */ values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":1975 * def addConsCardinality(self, consvars, cardval, indvars=None, weights=None, name="CardinalityCons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add a cardinality constraint that allows at most 'cardval' many nonzero variables. */ values[9] = ((PyObject *)Py_True); values[10] = ((PyObject *)Py_False); values[11] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":1976 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add a cardinality constraint that allows at most 'cardval' many nonzero variables. * */ values[12] = ((PyObject *)Py_False); values[13] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); CYTHON_FALLTHROUGH; case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_consvars)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cardval)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addConsCardinality", 0, 2, 14, 1); __PYX_ERR(3, 1973, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indvars); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[11] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 12: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[12] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 13: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[13] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsCardinality") < 0)) __PYX_ERR(3, 1973, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); CYTHON_FALLTHROUGH; case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_consvars = values[0]; __pyx_v_cardval = values[1]; __pyx_v_indvars = values[2]; __pyx_v_weights = values[3]; __pyx_v_name = values[4]; __pyx_v_initial = values[5]; __pyx_v_separate = values[6]; __pyx_v_enforce = values[7]; __pyx_v_check = values[8]; __pyx_v_propagate = values[9]; __pyx_v_local = values[10]; __pyx_v_dynamic = values[11]; __pyx_v_removable = values[12]; __pyx_v_stickingatnode = values[13]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsCardinality", 0, 2, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1973, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsCardinality", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_220addConsCardinality(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_consvars, __pyx_v_cardval, __pyx_v_indvars, __pyx_v_weights, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":1973 * return pyCons * * def addConsCardinality(self, consvars, cardval, indvars=None, weights=None, name="CardinalityCons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_220addConsCardinality(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_consvars, PyObject *__pyx_v_cardval, PyObject *__pyx_v_indvars, PyObject *__pyx_v_weights, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; SCIP_VAR *__pyx_v_indvar; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_v = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; PyObject *__pyx_v_pyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; int __pyx_t_7; SCIP_Bool __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; int __pyx_t_17; int __pyx_t_18; Py_ssize_t __pyx_t_19; PyObject *(*__pyx_t_20)(PyObject *); SCIP_VAR *__pyx_t_21; PyObject *__pyx_t_22 = NULL; SCIP_Real __pyx_t_23; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsCardinality", 0); __Pyx_INCREF(__pyx_v_weights); /* "pyscipopt/scip.pyx":1998 * cdef SCIP_VAR* indvar * * PY_SCIP_CALL(SCIPcreateConsCardinality(self._scip, &scip_cons, str_conversion(name), 0, NULL, cardval, NULL, NULL, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1998, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_cardval); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1998, __pyx_L1_error) /* "pyscipopt/scip.pyx":1999 * * PY_SCIP_CALL(SCIPcreateConsCardinality(self._scip, &scip_cons, str_conversion(name), 0, NULL, cardval, NULL, NULL, * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * * # circumvent an annoying bug in SCIP 4.0.0 that does not allow uninitialized weights */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1999, __pyx_L1_error) /* "pyscipopt/scip.pyx":1998 * cdef SCIP_VAR* indvar * * PY_SCIP_CALL(SCIPcreateConsCardinality(self._scip, &scip_cons, str_conversion(name), 0, NULL, cardval, NULL, NULL, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * */ __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsCardinality(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_6, 0, NULL, __pyx_t_7, NULL, NULL, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2002 * * # circumvent an annoying bug in SCIP 4.0.0 that does not allow uninitialized weights * if weights is None: # <<<<<<<<<<<<<< * weights = list(range(1, len(consvars) + 1)) * */ __pyx_t_17 = (__pyx_v_weights == Py_None); __pyx_t_18 = (__pyx_t_17 != 0); if (__pyx_t_18) { /* "pyscipopt/scip.pyx":2003 * # circumvent an annoying bug in SCIP 4.0.0 that does not allow uninitialized weights * if weights is None: * weights = list(range(1, len(consvars) + 1)) # <<<<<<<<<<<<<< * * for i, v in enumerate(consvars): */ __pyx_t_19 = PyObject_Length(__pyx_v_consvars); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2003, __pyx_L1_error) __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_19 + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_weights, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2002 * * # circumvent an annoying bug in SCIP 4.0.0 that does not allow uninitialized weights * if weights is None: # <<<<<<<<<<<<<< * weights = list(range(1, len(consvars) + 1)) * */ } /* "pyscipopt/scip.pyx":2005 * weights = list(range(1, len(consvars) + 1)) * * for i, v in enumerate(consvars): # <<<<<<<<<<<<<< * var = <Variable>v * if indvars: */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_consvars)) || PyTuple_CheckExact(__pyx_v_consvars)) { __pyx_t_1 = __pyx_v_consvars; __Pyx_INCREF(__pyx_t_1); __pyx_t_19 = 0; __pyx_t_20 = NULL; } else { __pyx_t_19 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_consvars); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_20 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_20)) __PYX_ERR(3, 2005, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_20)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_4); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(3, 2005, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_19 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_4); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(3, 2005, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_20(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 2005, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2006 * * for i, v in enumerate(consvars): * var = <Variable>v # <<<<<<<<<<<<<< * if indvars: * indvar = (<Variable>indvars[i]).scip_var */ __pyx_t_4 = __pyx_v_v; __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_4)); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2007 * for i, v in enumerate(consvars): * var = <Variable>v * if indvars: # <<<<<<<<<<<<<< * indvar = (<Variable>indvars[i]).scip_var * else: */ __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_indvars); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(3, 2007, __pyx_L1_error) if (__pyx_t_18) { /* "pyscipopt/scip.pyx":2008 * var = <Variable>v * if indvars: * indvar = (<Variable>indvars[i]).scip_var # <<<<<<<<<<<<<< * else: * indvar = NULL */ __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_indvars, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_21 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_4)->scip_var; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_indvar = __pyx_t_21; /* "pyscipopt/scip.pyx":2007 * for i, v in enumerate(consvars): * var = <Variable>v * if indvars: # <<<<<<<<<<<<<< * indvar = (<Variable>indvars[i]).scip_var * else: */ goto __pyx_L6; } /* "pyscipopt/scip.pyx":2010 * indvar = (<Variable>indvars[i]).scip_var * else: * indvar = NULL # <<<<<<<<<<<<<< * if weights is None: * PY_SCIP_CALL(SCIPappendVarCardinality(self._scip, scip_cons, var.scip_var, indvar)) */ /*else*/ { __pyx_v_indvar = NULL; } __pyx_L6:; /* "pyscipopt/scip.pyx":2011 * else: * indvar = NULL * if weights is None: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPappendVarCardinality(self._scip, scip_cons, var.scip_var, indvar)) * else: */ __pyx_t_18 = (__pyx_v_weights == Py_None); __pyx_t_17 = (__pyx_t_18 != 0); if (__pyx_t_17) { /* "pyscipopt/scip.pyx":2012 * indvar = NULL * if weights is None: * PY_SCIP_CALL(SCIPappendVarCardinality(self._scip, scip_cons, var.scip_var, indvar)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPaddVarCardinality(self._scip, scip_cons, var.scip_var, indvar, <SCIP_Real>weights[i])) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPappendVarCardinality(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, __pyx_v_indvar)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_22 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_22) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_22, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2011 * else: * indvar = NULL * if weights is None: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPappendVarCardinality(self._scip, scip_cons, var.scip_var, indvar)) * else: */ goto __pyx_L7; } /* "pyscipopt/scip.pyx":2014 * PY_SCIP_CALL(SCIPappendVarCardinality(self._scip, scip_cons, var.scip_var, indvar)) * else: * PY_SCIP_CALL(SCIPaddVarCardinality(self._scip, scip_cons, var.scip_var, indvar, <SCIP_Real>weights[i])) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_weights, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_23 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarCardinality(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, __pyx_v_indvar, ((SCIP_Real)__pyx_t_23))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_22 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_22) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_22, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L7:; /* "pyscipopt/scip.pyx":2005 * weights = list(range(1, len(consvars) + 1)) * * for i, v in enumerate(consvars): # <<<<<<<<<<<<<< * var = <Variable>v * if indvars: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2016 * PY_SCIP_CALL(SCIPaddVarCardinality(self._scip, scip_cons, var.scip_var, indvar, <SCIP_Real>weights[i])) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * pyCons = Constraint.create(scip_cons) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2017 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pyCons = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2019 * pyCons = Constraint.create(scip_cons) * * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * * return pyCons */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2021 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * * return pyCons # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyCons); __pyx_r = __pyx_v_pyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":1973 * return pyCons * * def addConsCardinality(self, consvars, cardval, indvars=None, weights=None, name="CardinalityCons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_22); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsCardinality", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XDECREF(__pyx_v_pyCons); __Pyx_XDECREF(__pyx_v_weights); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2024 * * * def addConsIndicator(self, cons, binvar=None, name="IndicatorCons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_223addConsIndicator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_222addConsIndicator[] = "Add an indicator constraint for the linear inequality 'cons'.\n\n The 'binvar' argument models the redundancy of the linear constraint. A solution for which\n 'binvar' is 1 must satisfy the constraint.\n\n :param cons: a linear inequality of the form \"<=\"\n :param binvar: binary indicator variable, or None if it should be created (Default value = None)\n :param name: name of the constraint (Default value = \"IndicatorCons\")\n :param initial: should the LP relaxation of constraint be in the initial LP? (Default value = True)\n :param separate: should the constraint be separated during LP processing? (Default value = True)\n :param enforce: should the constraint be enforced during node processing? (Default value = True)\n :param check: should the constraint be checked for feasibility? (Default value = True)\n :param propagate: should the constraint be propagated during node processing? (Default value = True)\n :param local: is the constraint only valid locally? (Default value = False)\n :param dynamic: is the constraint subject to aging? (Default value = False)\n :param removable: should the relaxation be removed from the LP due to aging or cleanup? (Default value = False)\n :param stickingatnode: should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_223addConsIndicator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cons = 0; PyObject *__pyx_v_binvar = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addConsIndicator (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_binvar,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)__pyx_n_u_IndicatorCons); /* "pyscipopt/scip.pyx":2025 * * def addConsIndicator(self, cons, binvar=None, name="IndicatorCons", * initial=True, separate=True, enforce=True, check=True, # <<<<<<<<<<<<<< * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":2026 * def addConsIndicator(self, cons, binvar=None, name="IndicatorCons", * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, # <<<<<<<<<<<<<< * removable=False, stickingatnode=False): * """Add an indicator constraint for the linear inequality 'cons'. */ values[7] = ((PyObject *)Py_True); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":2027 * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, * removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Add an indicator constraint for the linear inequality 'cons'. * */ values[10] = ((PyObject *)Py_False); values[11] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_binvar); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addConsIndicator") < 0)) __PYX_ERR(3, 2024, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cons = values[0]; __pyx_v_binvar = values[1]; __pyx_v_name = values[2]; __pyx_v_initial = values[3]; __pyx_v_separate = values[4]; __pyx_v_enforce = values[5]; __pyx_v_check = values[6]; __pyx_v_propagate = values[7]; __pyx_v_local = values[8]; __pyx_v_dynamic = values[9]; __pyx_v_removable = values[10]; __pyx_v_stickingatnode = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addConsIndicator", 0, 1, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2024, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addConsIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_222addConsIndicator(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_binvar, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":2024 * * * def addConsIndicator(self, cons, binvar=None, name="IndicatorCons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_222addConsIndicator(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_cons, PyObject *__pyx_v_binvar, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { SCIP_CONS *__pyx_v_scip_cons; SCIP_VAR *__pyx_v__binVar; PyObject *__pyx_v_rhs = NULL; int __pyx_v_negate; PyObject *__pyx_v_terms = NULL; PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_coeff = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; PyObject *__pyx_v_pyCons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; SCIP_VAR *__pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; char const *__pyx_t_10; SCIP_Real __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_Bool __pyx_t_16; SCIP_Bool __pyx_t_17; SCIP_Bool __pyx_t_18; SCIP_Bool __pyx_t_19; SCIP_Bool __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; int __pyx_t_23; int __pyx_t_24; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addConsIndicator", 0); /* "pyscipopt/scip.pyx":2047 * * """ * assert isinstance(cons, ExprCons), "given constraint is not ExprCons but %s" % cons.__class__.__name__ # <<<<<<<<<<<<<< * cdef SCIP_CONS* scip_cons * cdef SCIP_VAR* _binVar */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_cons, __pyx_ptype_9pyscipopt_4scip_ExprCons); if (unlikely(!(__pyx_t_1 != 0))) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_constraint_is_not_ExprCons, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2047, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":2050 * cdef SCIP_CONS* scip_cons * cdef SCIP_VAR* _binVar * if cons._lhs is not None and cons._rhs is not None: # <<<<<<<<<<<<<< * raise ValueError("expected inequality that has either only a left or right hand side") * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_lhs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_rhs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "pyscipopt/scip.pyx":2051 * cdef SCIP_VAR* _binVar * if cons._lhs is not None and cons._rhs is not None: * raise ValueError("expected inequality that has either only a left or right hand side") # <<<<<<<<<<<<<< * * if cons.expr.degree() > 1: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2051, __pyx_L1_error) /* "pyscipopt/scip.pyx":2050 * cdef SCIP_CONS* scip_cons * cdef SCIP_VAR* _binVar * if cons._lhs is not None and cons._rhs is not None: # <<<<<<<<<<<<<< * raise ValueError("expected inequality that has either only a left or right hand side") * */ } /* "pyscipopt/scip.pyx":2053 * raise ValueError("expected inequality that has either only a left or right hand side") * * if cons.expr.degree() > 1: # <<<<<<<<<<<<<< * raise ValueError("expected linear inequality, expression has degree %d" % cons.expr.degree()) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_degree); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 2053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_t_1)) { /* "pyscipopt/scip.pyx":2054 * * if cons.expr.degree() > 1: * raise ValueError("expected linear inequality, expression has degree %d" % cons.expr.degree()) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_degree); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_expected_linear_inequality_expre, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(3, 2054, __pyx_L1_error) /* "pyscipopt/scip.pyx":2053 * raise ValueError("expected inequality that has either only a left or right hand side") * * if cons.expr.degree() > 1: # <<<<<<<<<<<<<< * raise ValueError("expected linear inequality, expression has degree %d" % cons.expr.degree()) * */ } /* "pyscipopt/scip.pyx":2057 * * * if cons._rhs is not None: # <<<<<<<<<<<<<< * rhs = cons._rhs * negate = False */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_rhs_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = (__pyx_t_6 != Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2058 * * if cons._rhs is not None: * rhs = cons._rhs # <<<<<<<<<<<<<< * negate = False * else: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_rhs_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_rhs = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2059 * if cons._rhs is not None: * rhs = cons._rhs * negate = False # <<<<<<<<<<<<<< * else: * rhs = -cons._lhs */ __pyx_v_negate = 0; /* "pyscipopt/scip.pyx":2057 * * * if cons._rhs is not None: # <<<<<<<<<<<<<< * rhs = cons._rhs * negate = False */ goto __pyx_L7; } /* "pyscipopt/scip.pyx":2061 * negate = False * else: * rhs = -cons._lhs # <<<<<<<<<<<<<< * negate = True * */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_lhs_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_rhs = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2062 * else: * rhs = -cons._lhs * negate = True # <<<<<<<<<<<<<< * * _binVar = (<Variable>binvar).scip_var if binvar is not None else NULL */ __pyx_v_negate = 1; } __pyx_L7:; /* "pyscipopt/scip.pyx":2064 * negate = True * * _binVar = (<Variable>binvar).scip_var if binvar is not None else NULL # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPcreateConsIndicator(self._scip, &scip_cons, str_conversion(name), _binVar, 0, NULL, NULL, rhs, */ __pyx_t_4 = (__pyx_v_binvar != Py_None); if ((__pyx_t_4 != 0)) { __pyx_t_7 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_binvar)->scip_var; } else { __pyx_t_7 = NULL; } __pyx_v__binVar = __pyx_t_7; /* "pyscipopt/scip.pyx":2066 * _binVar = (<Variable>binvar).scip_var if binvar is not None else NULL * * PY_SCIP_CALL(SCIPcreateConsIndicator(self._scip, &scip_cons, str_conversion(name), _binVar, 0, NULL, NULL, rhs, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * terms = cons.expr.terms */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(3, 2066, __pyx_L1_error) __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_11 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2066, __pyx_L1_error) /* "pyscipopt/scip.pyx":2067 * * PY_SCIP_CALL(SCIPcreateConsIndicator(self._scip, &scip_cons, str_conversion(name), _binVar, 0, NULL, NULL, rhs, * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * terms = cons.expr.terms * */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_16 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_17 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_18 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_19 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_20 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2067, __pyx_L1_error) /* "pyscipopt/scip.pyx":2066 * _binVar = (<Variable>binvar).scip_var if binvar is not None else NULL * * PY_SCIP_CALL(SCIPcreateConsIndicator(self._scip, &scip_cons, str_conversion(name), _binVar, 0, NULL, NULL, rhs, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * terms = cons.expr.terms */ __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateConsIndicator(__pyx_v_self->_scip, (&__pyx_v_scip_cons), __pyx_t_10, __pyx_v__binVar, 0, NULL, NULL, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2068 * PY_SCIP_CALL(SCIPcreateConsIndicator(self._scip, &scip_cons, str_conversion(name), _binVar, 0, NULL, NULL, rhs, * initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode)) * terms = cons.expr.terms # <<<<<<<<<<<<<< * * for key, coeff in terms.items(): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cons, __pyx_n_s_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_terms); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_terms = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2070 * terms = cons.expr.terms * * for key, coeff in terms.items(): # <<<<<<<<<<<<<< * var = <Variable>key[0] * if negate: */ __pyx_t_21 = 0; if (unlikely(__pyx_v_terms == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(3, 2070, __pyx_L1_error) } __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_terms, 0, __pyx_n_s_items, (&__pyx_t_22), (&__pyx_t_23)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_24 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_22, &__pyx_t_21, &__pyx_t_3, &__pyx_t_8, NULL, __pyx_t_23); if (unlikely(__pyx_t_24 == 0)) break; if (unlikely(__pyx_t_24 == -1)) __PYX_ERR(3, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_coeff, __pyx_t_8); __pyx_t_8 = 0; /* "pyscipopt/scip.pyx":2071 * * for key, coeff in terms.items(): * var = <Variable>key[0] # <<<<<<<<<<<<<< * if negate: * coeff = -coeff */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __pyx_t_8; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2072 * for key, coeff in terms.items(): * var = <Variable>key[0] * if negate: # <<<<<<<<<<<<<< * coeff = -coeff * PY_SCIP_CALL(SCIPaddVarIndicator(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) */ __pyx_t_4 = (__pyx_v_negate != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2073 * var = <Variable>key[0] * if negate: * coeff = -coeff # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddVarIndicator(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) * */ __pyx_t_3 = PyNumber_Negative(__pyx_v_coeff); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_coeff, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2072 * for key, coeff in terms.items(): * var = <Variable>key[0] * if negate: # <<<<<<<<<<<<<< * coeff = -coeff * PY_SCIP_CALL(SCIPaddVarIndicator(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) */ } /* "pyscipopt/scip.pyx":2074 * if negate: * coeff = -coeff * PY_SCIP_CALL(SCIPaddVarIndicator(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_v_coeff); if (unlikely((__pyx_t_11 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2074, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarIndicator(__pyx_v_self->_scip, __pyx_v_scip_cons, __pyx_v_var->scip_var, ((SCIP_Real)__pyx_t_11))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2076 * PY_SCIP_CALL(SCIPaddVarIndicator(self._scip, scip_cons, var.scip_var, <SCIP_Real>coeff)) * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) # <<<<<<<<<<<<<< * pyCons = Constraint.create(scip_cons) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_scip_cons)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2077 * * PY_SCIP_CALL(SCIPaddCons(self._scip, scip_cons)) * pyCons = Constraint.create(scip_cons) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) */ __pyx_t_6 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_scip_cons); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_pyCons = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2079 * pyCons = Constraint.create(scip_cons) * * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) # <<<<<<<<<<<<<< * * return pyCons */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreleaseCons(__pyx_v_self->_scip, (&__pyx_v_scip_cons))); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2081 * PY_SCIP_CALL(SCIPreleaseCons(self._scip, &scip_cons)) * * return pyCons # <<<<<<<<<<<<<< * * def addPyCons(self, Constraint cons): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyCons); __pyx_r = __pyx_v_pyCons; goto __pyx_L0; /* "pyscipopt/scip.pyx":2024 * * * def addConsIndicator(self, cons, binvar=None, name="IndicatorCons", # <<<<<<<<<<<<<< * initial=True, separate=True, enforce=True, check=True, * propagate=True, local=False, dynamic=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.addConsIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rhs); __Pyx_XDECREF(__pyx_v_terms); __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_coeff); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XDECREF(__pyx_v_pyCons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2083 * return pyCons * * def addPyCons(self, Constraint cons): # <<<<<<<<<<<<<< * """Adds a customly created cons. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_225addPyCons(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_224addPyCons[] = "Adds a customly created cons.\n\n :param Constraint cons: constraint to add\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_225addPyCons(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addPyCons (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2083, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_224addPyCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_224addPyCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addPyCons", 0); /* "pyscipopt/scip.pyx":2089 * * """ * PY_SCIP_CALL(SCIPaddCons(self._scip, cons.scip_cons)) # <<<<<<<<<<<<<< * Py_INCREF(cons) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddCons(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2090 * """ * PY_SCIP_CALL(SCIPaddCons(self._scip, cons.scip_cons)) * Py_INCREF(cons) # <<<<<<<<<<<<<< * * def addVarSOS1(self, Constraint cons, Variable var, weight): */ Py_INCREF(((PyObject *)__pyx_v_cons)); /* "pyscipopt/scip.pyx":2083 * return pyCons * * def addPyCons(self, Constraint cons): # <<<<<<<<<<<<<< * """Adds a customly created cons. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.addPyCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2092 * Py_INCREF(cons) * * def addVarSOS1(self, Constraint cons, Variable var, weight): # <<<<<<<<<<<<<< * """Add variable to SOS1 constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_227addVarSOS1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_226addVarSOS1[] = "Add variable to SOS1 constraint.\n\n :param Constraint cons: SOS1 constraint\n :param Variable var: new variable\n :param weight: weight of new variable\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_227addVarSOS1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_weight = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addVarSOS1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_var,&__pyx_n_s_weight,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarSOS1", 1, 3, 3, 1); __PYX_ERR(3, 2092, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarSOS1", 1, 3, 3, 2); __PYX_ERR(3, 2092, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addVarSOS1") < 0)) __PYX_ERR(3, 2092, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_weight = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addVarSOS1", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2092, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addVarSOS1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2092, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2092, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_226addVarSOS1(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_var, __pyx_v_weight); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_226addVarSOS1(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_weight) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addVarSOS1", 0); /* "pyscipopt/scip.pyx":2100 * * """ * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, cons.scip_cons, var.scip_var, weight)) # <<<<<<<<<<<<<< * * def appendVarSOS1(self, Constraint cons, Variable var): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_weight); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2100, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarSOS1(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2092 * Py_INCREF(cons) * * def addVarSOS1(self, Constraint cons, Variable var, weight): # <<<<<<<<<<<<<< * """Add variable to SOS1 constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addVarSOS1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2102 * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, cons.scip_cons, var.scip_var, weight)) * * def appendVarSOS1(self, Constraint cons, Variable var): # <<<<<<<<<<<<<< * """Append variable to SOS1 constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_229appendVarSOS1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_228appendVarSOS1[] = "Append variable to SOS1 constraint.\n\n :param Constraint cons: SOS1 constraint\n :param Variable var: variable to append\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_229appendVarSOS1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendVarSOS1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_var,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("appendVarSOS1", 1, 2, 2, 1); __PYX_ERR(3, 2102, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendVarSOS1") < 0)) __PYX_ERR(3, 2102, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendVarSOS1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2102, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.appendVarSOS1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2102, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2102, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_228appendVarSOS1(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_var); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_228appendVarSOS1(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendVarSOS1", 0); /* "pyscipopt/scip.pyx":2109 * * """ * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, cons.scip_cons, var.scip_var)) # <<<<<<<<<<<<<< * * def addVarSOS2(self, Constraint cons, Variable var, weight): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPappendVarSOS1(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2102 * PY_SCIP_CALL(SCIPaddVarSOS1(self._scip, cons.scip_cons, var.scip_var, weight)) * * def appendVarSOS1(self, Constraint cons, Variable var): # <<<<<<<<<<<<<< * """Append variable to SOS1 constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.appendVarSOS1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2111 * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, cons.scip_cons, var.scip_var)) * * def addVarSOS2(self, Constraint cons, Variable var, weight): # <<<<<<<<<<<<<< * """Add variable to SOS2 constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_231addVarSOS2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_230addVarSOS2[] = "Add variable to SOS2 constraint.\n\n :param Constraint cons: SOS2 constraint\n :param Variable var: new variable\n :param weight: weight of new variable\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_231addVarSOS2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_weight = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addVarSOS2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_var,&__pyx_n_s_weight,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarSOS2", 1, 3, 3, 1); __PYX_ERR(3, 2111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addVarSOS2", 1, 3, 3, 2); __PYX_ERR(3, 2111, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addVarSOS2") < 0)) __PYX_ERR(3, 2111, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_weight = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addVarSOS2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2111, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addVarSOS2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2111, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2111, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_230addVarSOS2(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_var, __pyx_v_weight); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_230addVarSOS2(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_weight) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addVarSOS2", 0); /* "pyscipopt/scip.pyx":2119 * * """ * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, cons.scip_cons, var.scip_var, weight)) # <<<<<<<<<<<<<< * * def appendVarSOS2(self, Constraint cons, Variable var): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_weight); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2119, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddVarSOS2(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2111 * PY_SCIP_CALL(SCIPappendVarSOS1(self._scip, cons.scip_cons, var.scip_var)) * * def addVarSOS2(self, Constraint cons, Variable var, weight): # <<<<<<<<<<<<<< * """Add variable to SOS2 constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addVarSOS2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2121 * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, cons.scip_cons, var.scip_var, weight)) * * def appendVarSOS2(self, Constraint cons, Variable var): # <<<<<<<<<<<<<< * """Append variable to SOS2 constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_233appendVarSOS2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_232appendVarSOS2[] = "Append variable to SOS2 constraint.\n\n :param Constraint cons: SOS2 constraint\n :param Variable var: variable to append\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_233appendVarSOS2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendVarSOS2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_var,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("appendVarSOS2", 1, 2, 2, 1); __PYX_ERR(3, 2121, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendVarSOS2") < 0)) __PYX_ERR(3, 2121, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendVarSOS2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2121, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.appendVarSOS2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2121, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2121, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_232appendVarSOS2(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_var); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_232appendVarSOS2(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendVarSOS2", 0); /* "pyscipopt/scip.pyx":2128 * * """ * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, cons.scip_cons, var.scip_var)) # <<<<<<<<<<<<<< * * def setInitial(self, Constraint cons, newInit): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPappendVarSOS2(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2121 * PY_SCIP_CALL(SCIPaddVarSOS2(self._scip, cons.scip_cons, var.scip_var, weight)) * * def appendVarSOS2(self, Constraint cons, Variable var): # <<<<<<<<<<<<<< * """Append variable to SOS2 constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.appendVarSOS2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2130 * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, cons.scip_cons, var.scip_var)) * * def setInitial(self, Constraint cons, newInit): # <<<<<<<<<<<<<< * """Set "initial" flag of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_235setInitial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_234setInitial[] = "Set \"initial\" flag of a constraint.\n\n Keyword arguments:\n cons -- constraint\n newInit -- new initial value\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_235setInitial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; PyObject *__pyx_v_newInit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInitial (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_newInit,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newInit)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setInitial", 1, 2, 2, 1); __PYX_ERR(3, 2130, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitial") < 0)) __PYX_ERR(3, 2130, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_newInit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInitial", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2130, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setInitial", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2130, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_234setInitial(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_newInit); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_234setInitial(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newInit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInitial", 0); /* "pyscipopt/scip.pyx":2137 * newInit -- new initial value * """ * PY_SCIP_CALL(SCIPsetConsInitial(self._scip, cons.scip_cons, newInit)) # <<<<<<<<<<<<<< * * def setRemovable(self, Constraint cons, newRem): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_newInit); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2137, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetConsInitial(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2130 * PY_SCIP_CALL(SCIPappendVarSOS2(self._scip, cons.scip_cons, var.scip_var)) * * def setInitial(self, Constraint cons, newInit): # <<<<<<<<<<<<<< * """Set "initial" flag of a constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setInitial", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2139 * PY_SCIP_CALL(SCIPsetConsInitial(self._scip, cons.scip_cons, newInit)) * * def setRemovable(self, Constraint cons, newRem): # <<<<<<<<<<<<<< * """Set "removable" flag of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_237setRemovable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_236setRemovable[] = "Set \"removable\" flag of a constraint.\n\n Keyword arguments:\n cons -- constraint\n newRem -- new removable value\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_237setRemovable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; PyObject *__pyx_v_newRem = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRemovable (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_newRem,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newRem)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setRemovable", 1, 2, 2, 1); __PYX_ERR(3, 2139, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRemovable") < 0)) __PYX_ERR(3, 2139, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_newRem = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRemovable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2139, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setRemovable", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2139, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_236setRemovable(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_newRem); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_236setRemovable(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newRem) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRemovable", 0); /* "pyscipopt/scip.pyx":2146 * newRem -- new removable value * """ * PY_SCIP_CALL(SCIPsetConsRemovable(self._scip, cons.scip_cons, newRem)) # <<<<<<<<<<<<<< * * def setEnforced(self, Constraint cons, newEnf): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_newRem); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2146, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetConsRemovable(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2139 * PY_SCIP_CALL(SCIPsetConsInitial(self._scip, cons.scip_cons, newInit)) * * def setRemovable(self, Constraint cons, newRem): # <<<<<<<<<<<<<< * """Set "removable" flag of a constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setRemovable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2148 * PY_SCIP_CALL(SCIPsetConsRemovable(self._scip, cons.scip_cons, newRem)) * * def setEnforced(self, Constraint cons, newEnf): # <<<<<<<<<<<<<< * """Set "enforced" flag of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_239setEnforced(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_238setEnforced[] = "Set \"enforced\" flag of a constraint.\n\n Keyword arguments:\n cons -- constraint\n newEnf -- new enforced value\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_239setEnforced(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; PyObject *__pyx_v_newEnf = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setEnforced (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_newEnf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newEnf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setEnforced", 1, 2, 2, 1); __PYX_ERR(3, 2148, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEnforced") < 0)) __PYX_ERR(3, 2148, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_newEnf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setEnforced", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setEnforced", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2148, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_238setEnforced(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_newEnf); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_238setEnforced(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newEnf) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setEnforced", 0); /* "pyscipopt/scip.pyx":2155 * newEnf -- new enforced value * """ * PY_SCIP_CALL(SCIPsetConsEnforced(self._scip, cons.scip_cons, newEnf)) # <<<<<<<<<<<<<< * * def setCheck(self, Constraint cons, newCheck): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_newEnf); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2155, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetConsEnforced(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2148 * PY_SCIP_CALL(SCIPsetConsRemovable(self._scip, cons.scip_cons, newRem)) * * def setEnforced(self, Constraint cons, newEnf): # <<<<<<<<<<<<<< * """Set "enforced" flag of a constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setEnforced", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2157 * PY_SCIP_CALL(SCIPsetConsEnforced(self._scip, cons.scip_cons, newEnf)) * * def setCheck(self, Constraint cons, newCheck): # <<<<<<<<<<<<<< * """Set "check" flag of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_241setCheck(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_240setCheck[] = "Set \"check\" flag of a constraint.\n\n Keyword arguments:\n cons -- constraint\n newCheck -- new check value\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_241setCheck(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; PyObject *__pyx_v_newCheck = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCheck (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_newCheck,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newCheck)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setCheck", 1, 2, 2, 1); __PYX_ERR(3, 2157, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCheck") < 0)) __PYX_ERR(3, 2157, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_newCheck = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCheck", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2157, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setCheck", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2157, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_240setCheck(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_newCheck); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_240setCheck(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_newCheck) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCheck", 0); /* "pyscipopt/scip.pyx":2164 * newCheck -- new check value * """ * PY_SCIP_CALL(SCIPsetConsChecked(self._scip, cons.scip_cons, newCheck)) # <<<<<<<<<<<<<< * * def chgRhs(self, Constraint cons, rhs): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_newCheck); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2164, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetConsChecked(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2157 * PY_SCIP_CALL(SCIPsetConsEnforced(self._scip, cons.scip_cons, newEnf)) * * def setCheck(self, Constraint cons, newCheck): # <<<<<<<<<<<<<< * """Set "check" flag of a constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setCheck", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2166 * PY_SCIP_CALL(SCIPsetConsChecked(self._scip, cons.scip_cons, newCheck)) * * def chgRhs(self, Constraint cons, rhs): # <<<<<<<<<<<<<< * """Change right hand side value of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_243chgRhs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_242chgRhs[] = "Change right hand side value of a constraint.\n\n :param Constraint cons: linear or quadratic constraint\n :param rhs: new ride hand side (set to None for +infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_243chgRhs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; PyObject *__pyx_v_rhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgRhs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_rhs,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgRhs", 1, 2, 2, 1); __PYX_ERR(3, 2166, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgRhs") < 0)) __PYX_ERR(3, 2166, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_rhs = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgRhs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2166, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgRhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2166, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_242chgRhs(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_rhs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_242chgRhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_rhs) { PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgRhs", 0); __Pyx_INCREF(__pyx_v_rhs); /* "pyscipopt/scip.pyx":2174 * """ * * if rhs is None: # <<<<<<<<<<<<<< * rhs = SCIPinfinity(self._scip) * */ __pyx_t_1 = (__pyx_v_rhs == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2175 * * if rhs is None: * rhs = SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') */ __pyx_t_3 = PyFloat_FromDouble(SCIPinfinity(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2174 * """ * * if rhs is None: # <<<<<<<<<<<<<< * rhs = SCIPinfinity(self._scip) * */ } /* "pyscipopt/scip.pyx":2177 * rhs = SCIPinfinity(self._scip) * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if constype == 'linear': * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) */ __pyx_t_3 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_constype = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2178 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) * elif constype == 'quadratic': */ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2178, __pyx_L1_error) if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2179 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) # <<<<<<<<<<<<<< * elif constype == 'quadratic': * PY_SCIP_CALL(SCIPchgRhsQuadratic(self._scip, cons.scip_cons, rhs)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2179, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgRhsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2178 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) * elif constype == 'quadratic': */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2180 * if constype == 'linear': * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgRhsQuadratic(self._scip, cons.scip_cons, rhs)) * else: */ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2180, __pyx_L1_error) if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":2181 * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) * elif constype == 'quadratic': * PY_SCIP_CALL(SCIPchgRhsQuadratic(self._scip, cons.scip_cons, rhs)) # <<<<<<<<<<<<<< * else: * raise Warning("method cannot be called for constraints of type " + constype) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_rhs); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2181, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgRhsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2180 * if constype == 'linear': * PY_SCIP_CALL(SCIPchgRhsLinear(self._scip, cons.scip_cons, rhs)) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgRhsQuadratic(self._scip, cons.scip_cons, rhs)) * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2183 * PY_SCIP_CALL(SCIPchgRhsQuadratic(self._scip, cons.scip_cons, rhs)) * else: * raise Warning("method cannot be called for constraints of type " + constype) # <<<<<<<<<<<<<< * * def chgLhs(self, Constraint cons, lhs): */ /*else*/ { __pyx_t_3 = PyNumber_Add(__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_v_constype); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 2183, __pyx_L1_error) } __pyx_L4:; /* "pyscipopt/scip.pyx":2166 * PY_SCIP_CALL(SCIPsetConsChecked(self._scip, cons.scip_cons, newCheck)) * * def chgRhs(self, Constraint cons, rhs): # <<<<<<<<<<<<<< * """Change right hand side value of a constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgRhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XDECREF(__pyx_v_rhs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2185 * raise Warning("method cannot be called for constraints of type " + constype) * * def chgLhs(self, Constraint cons, lhs): # <<<<<<<<<<<<<< * """Change left hand side value of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_245chgLhs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_244chgLhs[] = "Change left hand side value of a constraint.\n\n :param Constraint cons: linear or quadratic constraint\n :param lhs: new left hand side (set to None for -infinity)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_245chgLhs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; PyObject *__pyx_v_lhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgLhs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_lhs,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgLhs", 1, 2, 2, 1); __PYX_ERR(3, 2185, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgLhs") < 0)) __PYX_ERR(3, 2185, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_lhs = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgLhs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2185, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgLhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2185, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_244chgLhs(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_lhs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_244chgLhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, PyObject *__pyx_v_lhs) { PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgLhs", 0); __Pyx_INCREF(__pyx_v_lhs); /* "pyscipopt/scip.pyx":2193 * """ * * if lhs is None: # <<<<<<<<<<<<<< * lhs = -SCIPinfinity(self._scip) * */ __pyx_t_1 = (__pyx_v_lhs == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2194 * * if lhs is None: * lhs = -SCIPinfinity(self._scip) # <<<<<<<<<<<<<< * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') */ __pyx_t_3 = PyFloat_FromDouble((-SCIPinfinity(__pyx_v_self->_scip))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2193 * """ * * if lhs is None: # <<<<<<<<<<<<<< * lhs = -SCIPinfinity(self._scip) * */ } /* "pyscipopt/scip.pyx":2196 * lhs = -SCIPinfinity(self._scip) * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if constype == 'linear': * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) */ __pyx_t_3 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_constype = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2197 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) * elif constype == 'quadratic': */ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2197, __pyx_L1_error) if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2198 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) # <<<<<<<<<<<<<< * elif constype == 'quadratic': * PY_SCIP_CALL(SCIPchgLhsQuadratic(self._scip, cons.scip_cons, lhs)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lhs); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2198, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgLhsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2197 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) * elif constype == 'quadratic': */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2199 * if constype == 'linear': * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgLhsQuadratic(self._scip, cons.scip_cons, lhs)) * else: */ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2199, __pyx_L1_error) if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":2200 * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) * elif constype == 'quadratic': * PY_SCIP_CALL(SCIPchgLhsQuadratic(self._scip, cons.scip_cons, lhs)) # <<<<<<<<<<<<<< * else: * raise Warning("method cannot be called for constraints of type " + constype) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_lhs); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2200, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgLhsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2199 * if constype == 'linear': * PY_SCIP_CALL(SCIPchgLhsLinear(self._scip, cons.scip_cons, lhs)) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPchgLhsQuadratic(self._scip, cons.scip_cons, lhs)) * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2202 * PY_SCIP_CALL(SCIPchgLhsQuadratic(self._scip, cons.scip_cons, lhs)) * else: * raise Warning("method cannot be called for constraints of type " + constype) # <<<<<<<<<<<<<< * * def getRhs(self, Constraint cons): */ /*else*/ { __pyx_t_3 = PyNumber_Add(__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_v_constype); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 2202, __pyx_L1_error) } __pyx_L4:; /* "pyscipopt/scip.pyx":2185 * raise Warning("method cannot be called for constraints of type " + constype) * * def chgLhs(self, Constraint cons, lhs): # <<<<<<<<<<<<<< * """Change left hand side value of a constraint. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.chgLhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XDECREF(__pyx_v_lhs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2204 * raise Warning("method cannot be called for constraints of type " + constype) * * def getRhs(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve right hand side value of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_247getRhs(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_246getRhs[] = "Retrieve right hand side value of a constraint.\n\n :param Constraint cons: linear or quadratic constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_247getRhs(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRhs (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2204, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_246getRhs(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_246getRhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRhs", 0); /* "pyscipopt/scip.pyx":2210 * * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if constype == 'linear': * return SCIPgetRhsLinear(self._scip, cons.scip_cons) */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2211 * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * return SCIPgetRhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 2211, __pyx_L1_error) if (__pyx_t_3) { /* "pyscipopt/scip.pyx":2212 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': * return SCIPgetRhsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * elif constype == 'quadratic': * return SCIPgetRhsQuadratic(self._scip, cons.scip_cons) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetRhsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2211 * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * return SCIPgetRhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': */ } /* "pyscipopt/scip.pyx":2213 * if constype == 'linear': * return SCIPgetRhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * return SCIPgetRhsQuadratic(self._scip, cons.scip_cons) * else: */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 2213, __pyx_L1_error) if (likely(__pyx_t_3)) { /* "pyscipopt/scip.pyx":2214 * return SCIPgetRhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': * return SCIPgetRhsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * else: * raise Warning("method cannot be called for constraints of type " + constype) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetRhsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2213 * if constype == 'linear': * return SCIPgetRhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * return SCIPgetRhsQuadratic(self._scip, cons.scip_cons) * else: */ } /* "pyscipopt/scip.pyx":2216 * return SCIPgetRhsQuadratic(self._scip, cons.scip_cons) * else: * raise Warning("method cannot be called for constraints of type " + constype) # <<<<<<<<<<<<<< * * def getLhs(self, Constraint cons): */ /*else*/ { __pyx_t_1 = PyNumber_Add(__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_v_constype); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2216, __pyx_L1_error) } /* "pyscipopt/scip.pyx":2204 * raise Warning("method cannot be called for constraints of type " + constype) * * def getRhs(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve right hand side value of a constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getRhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2218 * raise Warning("method cannot be called for constraints of type " + constype) * * def getLhs(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve left hand side value of a constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_249getLhs(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_248getLhs[] = "Retrieve left hand side value of a constraint.\n\n :param Constraint cons: linear or quadratic constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_249getLhs(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLhs (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2218, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_248getLhs(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_248getLhs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLhs", 0); /* "pyscipopt/scip.pyx":2224 * * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if constype == 'linear': * return SCIPgetLhsLinear(self._scip, cons.scip_cons) */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2225 * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * return SCIPgetLhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 2225, __pyx_L1_error) if (__pyx_t_3) { /* "pyscipopt/scip.pyx":2226 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': * return SCIPgetLhsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * elif constype == 'quadratic': * return SCIPgetLhsQuadratic(self._scip, cons.scip_cons) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetLhsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2225 * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * return SCIPgetLhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': */ } /* "pyscipopt/scip.pyx":2227 * if constype == 'linear': * return SCIPgetLhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * return SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * else: */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 2227, __pyx_L1_error) if (likely(__pyx_t_3)) { /* "pyscipopt/scip.pyx":2228 * return SCIPgetLhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': * return SCIPgetLhsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * else: * raise Warning("method cannot be called for constraints of type " + constype) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetLhsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2227 * if constype == 'linear': * return SCIPgetLhsLinear(self._scip, cons.scip_cons) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * return SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * else: */ } /* "pyscipopt/scip.pyx":2230 * return SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * else: * raise Warning("method cannot be called for constraints of type " + constype) # <<<<<<<<<<<<<< * * def getActivity(self, Constraint cons, Solution sol = None): */ /*else*/ { __pyx_t_1 = PyNumber_Add(__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_v_constype); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2230, __pyx_L1_error) } /* "pyscipopt/scip.pyx":2218 * raise Warning("method cannot be called for constraints of type " + constype) * * def getLhs(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve left hand side value of a constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getLhs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2232 * raise Warning("method cannot be called for constraints of type " + constype) * * def getActivity(self, Constraint cons, Solution sol = None): # <<<<<<<<<<<<<< * """Retrieve activity of given constraint. * Can only be called after solving is completed. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_251getActivity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_250getActivity[] = "Retrieve activity of given constraint.\n Can only be called after solving is completed.\n\n :param Constraint cons: linear or quadratic constraint\n :param Solution sol: solution to compute activity of, None to use current node's solution (Default value = None)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_251getActivity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getActivity (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_sol,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sol); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getActivity") < 0)) __PYX_ERR(3, 2232, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getActivity", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2232, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getActivity", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2232, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "sol", 0))) __PYX_ERR(3, 2232, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_250getActivity(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_sol); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_250getActivity(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol) { SCIP_Real __pyx_v_activity; SCIP_SOL *__pyx_v_scip_sol; PyObject *__pyx_v_constype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; SCIP_SOL *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getActivity", 0); /* "pyscipopt/scip.pyx":2243 * cdef SCIP_SOL* scip_sol * * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getStage); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_SOLVING); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":2244 * * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") # <<<<<<<<<<<<<< * * if isinstance(sol, Solution): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 2244, __pyx_L1_error) /* "pyscipopt/scip.pyx":2243 * cdef SCIP_SOL* scip_sol * * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * */ } /* "pyscipopt/scip.pyx":2246 * raise Warning("method cannot be called before problem is solved") * * if isinstance(sol, Solution): # <<<<<<<<<<<<<< * scip_sol = sol.sol * else: */ __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2247 * * if isinstance(sol, Solution): * scip_sol = sol.sol # <<<<<<<<<<<<<< * else: * scip_sol = NULL */ __pyx_t_6 = __pyx_v_sol->sol; __pyx_v_scip_sol = __pyx_t_6; /* "pyscipopt/scip.pyx":2246 * raise Warning("method cannot be called before problem is solved") * * if isinstance(sol, Solution): # <<<<<<<<<<<<<< * scip_sol = sol.sol * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2249 * scip_sol = sol.sol * else: * scip_sol = NULL # <<<<<<<<<<<<<< * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') */ /*else*/ { __pyx_v_scip_sol = NULL; } __pyx_L4:; /* "pyscipopt/scip.pyx":2251 * scip_sol = NULL * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if constype == 'linear': * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) */ __pyx_t_3 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2252 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2252, __pyx_L1_error) if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2253 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) # <<<<<<<<<<<<<< * elif constype == 'quadratic': * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) */ __pyx_v_activity = SCIPgetActivityLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_scip_sol); /* "pyscipopt/scip.pyx":2252 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":2254 * if constype == 'linear': * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) * else: */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2254, __pyx_L1_error) if (likely(__pyx_t_4)) { /* "pyscipopt/scip.pyx":2255 * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) # <<<<<<<<<<<<<< * else: * raise Warning("method cannot be called for constraints of type " + constype) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetActivityQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_scip_sol, (&__pyx_v_activity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2254 * if constype == 'linear': * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) * else: */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":2257 * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) * else: * raise Warning("method cannot be called for constraints of type " + constype) # <<<<<<<<<<<<<< * * return activity */ /*else*/ { __pyx_t_3 = PyNumber_Add(__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_v_constype); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2257, __pyx_L1_error) } __pyx_L5:; /* "pyscipopt/scip.pyx":2259 * raise Warning("method cannot be called for constraints of type " + constype) * * return activity # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_activity); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2232 * raise Warning("method cannot be called for constraints of type " + constype) * * def getActivity(self, Constraint cons, Solution sol = None): # <<<<<<<<<<<<<< * """Retrieve activity of given constraint. * Can only be called after solving is completed. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.getActivity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2262 * * * def getSlack(self, Constraint cons, Solution sol = None, side = None): # <<<<<<<<<<<<<< * """Retrieve slack of given constraint. * Can only be called after solving is completed. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_253getSlack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_252getSlack[] = "Retrieve slack of given constraint.\n Can only be called after solving is completed.\n\n\n :param Constraint cons: linear or quadratic constraint\n :param Solution sol: solution to compute slack of, None to use current node's solution (Default value = None)\n :param side: whether to use 'lhs' or 'rhs' for ranged constraints, None to return minimum (Default value = None)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_253getSlack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons = 0; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = 0; PyObject *__pyx_v_side = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSlack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cons,&__pyx_n_s_sol,&__pyx_n_s_side,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cons)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sol); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_side); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getSlack") < 0)) __PYX_ERR(3, 2262, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)values[0]); __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[1]); __pyx_v_side = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getSlack", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2262, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getSlack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2262, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "sol", 0))) __PYX_ERR(3, 2262, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_252getSlack(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_cons, __pyx_v_sol, __pyx_v_side); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_252getSlack(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol, PyObject *__pyx_v_side) { SCIP_Real __pyx_v_activity; SCIP_SOL *__pyx_v_scip_sol; PyObject *__pyx_v_constype = NULL; PyObject *__pyx_v_lhs = NULL; PyObject *__pyx_v_rhs = NULL; PyObject *__pyx_v_lhsslack = NULL; PyObject *__pyx_v_rhsslack = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; SCIP_SOL *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSlack", 0); /* "pyscipopt/scip.pyx":2276 * * * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getStage); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_SOLVING); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":2277 * * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") # <<<<<<<<<<<<<< * * if isinstance(sol, Solution): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 2277, __pyx_L1_error) /* "pyscipopt/scip.pyx":2276 * * * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * */ } /* "pyscipopt/scip.pyx":2279 * raise Warning("method cannot be called before problem is solved") * * if isinstance(sol, Solution): # <<<<<<<<<<<<<< * scip_sol = sol.sol * else: */ __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2280 * * if isinstance(sol, Solution): * scip_sol = sol.sol # <<<<<<<<<<<<<< * else: * scip_sol = NULL */ __pyx_t_6 = __pyx_v_sol->sol; __pyx_v_scip_sol = __pyx_t_6; /* "pyscipopt/scip.pyx":2279 * raise Warning("method cannot be called before problem is solved") * * if isinstance(sol, Solution): # <<<<<<<<<<<<<< * scip_sol = sol.sol * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2282 * scip_sol = sol.sol * else: * scip_sol = NULL # <<<<<<<<<<<<<< * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') */ /*else*/ { __pyx_v_scip_sol = NULL; } __pyx_L4:; /* "pyscipopt/scip.pyx":2284 * scip_sol = NULL * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if constype == 'linear': * lhs = SCIPgetLhsLinear(self._scip, cons.scip_cons) */ __pyx_t_3 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2285 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * lhs = SCIPgetLhsLinear(self._scip, cons.scip_cons) * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2285, __pyx_L1_error) if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2286 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': * lhs = SCIPgetLhsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) */ __pyx_t_3 = PyFloat_FromDouble(SCIPgetLhsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_lhs = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2287 * if constype == 'linear': * lhs = SCIPgetLhsLinear(self._scip, cons.scip_cons) * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': */ __pyx_t_3 = PyFloat_FromDouble(SCIPgetRhsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rhs = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2288 * lhs = SCIPgetLhsLinear(self._scip, cons.scip_cons) * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) # <<<<<<<<<<<<<< * elif constype == 'quadratic': * lhs = SCIPgetLhsQuadratic(self._scip, cons.scip_cons) */ __pyx_v_activity = SCIPgetActivityLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_scip_sol); /* "pyscipopt/scip.pyx":2285 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if constype == 'linear': # <<<<<<<<<<<<<< * lhs = SCIPgetLhsLinear(self._scip, cons.scip_cons) * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":2289 * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * lhs = SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * rhs = SCIPgetRhsQuadratic(self._scip, cons.scip_cons) */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_quadratic, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2289, __pyx_L1_error) if (likely(__pyx_t_4)) { /* "pyscipopt/scip.pyx":2290 * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': * lhs = SCIPgetLhsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * rhs = SCIPgetRhsQuadratic(self._scip, cons.scip_cons) * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) */ __pyx_t_3 = PyFloat_FromDouble(SCIPgetLhsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_lhs = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2291 * elif constype == 'quadratic': * lhs = SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * rhs = SCIPgetRhsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) * else: */ __pyx_t_3 = PyFloat_FromDouble(SCIPgetRhsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rhs = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2292 * lhs = SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * rhs = SCIPgetRhsQuadratic(self._scip, cons.scip_cons) * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) # <<<<<<<<<<<<<< * else: * raise Warning("method cannot be called for constraints of type " + constype) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetActivityQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, __pyx_v_scip_sol, (&__pyx_v_activity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2289 * rhs = SCIPgetRhsLinear(self._scip, cons.scip_cons) * activity = SCIPgetActivityLinear(self._scip, cons.scip_cons, scip_sol) * elif constype == 'quadratic': # <<<<<<<<<<<<<< * lhs = SCIPgetLhsQuadratic(self._scip, cons.scip_cons) * rhs = SCIPgetRhsQuadratic(self._scip, cons.scip_cons) */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":2294 * PY_SCIP_CALL(SCIPgetActivityQuadratic(self._scip, cons.scip_cons, scip_sol, &activity)) * else: * raise Warning("method cannot be called for constraints of type " + constype) # <<<<<<<<<<<<<< * * lhsslack = activity - lhs */ /*else*/ { __pyx_t_3 = PyNumber_Add(__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_v_constype); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2294, __pyx_L1_error) } __pyx_L5:; /* "pyscipopt/scip.pyx":2296 * raise Warning("method cannot be called for constraints of type " + constype) * * lhsslack = activity - lhs # <<<<<<<<<<<<<< * rhsslack = rhs - activity * */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_activity); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_lhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_lhsslack = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2297 * * lhsslack = activity - lhs * rhsslack = rhs - activity # <<<<<<<<<<<<<< * * if side == 'lhs': */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_activity); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Subtract(__pyx_v_rhs, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_rhsslack = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2299 * rhsslack = rhs - activity * * if side == 'lhs': # <<<<<<<<<<<<<< * return lhsslack * elif side == 'rhs': */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_side, __pyx_n_u_lhs, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2299, __pyx_L1_error) if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2300 * * if side == 'lhs': * return lhsslack # <<<<<<<<<<<<<< * elif side == 'rhs': * return rhsslack */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_lhsslack); __pyx_r = __pyx_v_lhsslack; goto __pyx_L0; /* "pyscipopt/scip.pyx":2299 * rhsslack = rhs - activity * * if side == 'lhs': # <<<<<<<<<<<<<< * return lhsslack * elif side == 'rhs': */ } /* "pyscipopt/scip.pyx":2301 * if side == 'lhs': * return lhsslack * elif side == 'rhs': # <<<<<<<<<<<<<< * return rhsslack * else: */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_side, __pyx_n_u_rhs, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2301, __pyx_L1_error) if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2302 * return lhsslack * elif side == 'rhs': * return rhsslack # <<<<<<<<<<<<<< * else: * return min(lhsslack, rhsslack) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rhsslack); __pyx_r = __pyx_v_rhsslack; goto __pyx_L0; /* "pyscipopt/scip.pyx":2301 * if side == 'lhs': * return lhsslack * elif side == 'rhs': # <<<<<<<<<<<<<< * return rhsslack * else: */ } /* "pyscipopt/scip.pyx":2304 * return rhsslack * else: * return min(lhsslack, rhsslack) # <<<<<<<<<<<<<< * * def getTransformedCons(self, Constraint cons): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rhsslack); __pyx_t_2 = __pyx_v_rhsslack; __Pyx_INCREF(__pyx_v_lhsslack); __pyx_t_3 = __pyx_v_lhsslack; __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2304, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_1); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } /* "pyscipopt/scip.pyx":2262 * * * def getSlack(self, Constraint cons, Solution sol = None, side = None): # <<<<<<<<<<<<<< * """Retrieve slack of given constraint. * Can only be called after solving is completed. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.getSlack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XDECREF(__pyx_v_lhs); __Pyx_XDECREF(__pyx_v_rhs); __Pyx_XDECREF(__pyx_v_lhsslack); __Pyx_XDECREF(__pyx_v_rhsslack); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2306 * return min(lhsslack, rhsslack) * * def getTransformedCons(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve transformed constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_255getTransformedCons(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_254getTransformedCons[] = "Retrieve transformed constraint.\n\n :param Constraint cons: constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_255getTransformedCons(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTransformedCons (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2306, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_254getTransformedCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_254getTransformedCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { SCIP_CONS *__pyx_v_transcons; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTransformedCons", 0); /* "pyscipopt/scip.pyx":2313 * """ * cdef SCIP_CONS* transcons * PY_SCIP_CALL(SCIPgetTransformedCons(self._scip, cons.scip_cons, &transcons)) # <<<<<<<<<<<<<< * return Constraint.create(transcons) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetTransformedCons(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, (&__pyx_v_transcons))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2314 * cdef SCIP_CONS* transcons * PY_SCIP_CALL(SCIPgetTransformedCons(self._scip, cons.scip_cons, &transcons)) * return Constraint.create(transcons) # <<<<<<<<<<<<<< * * def getTermsQuadratic(self, Constraint cons): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_10Constraint_create(__pyx_v_transcons); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2306 * return min(lhsslack, rhsslack) * * def getTransformedCons(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve transformed constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getTransformedCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2316 * return Constraint.create(transcons) * * def getTermsQuadratic(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve bilinear, quadratic, and linear terms of a quadratic constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_257getTermsQuadratic(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_256getTermsQuadratic[] = "Retrieve bilinear, quadratic, and linear terms of a quadratic constraint.\n\n :param Constraint cons: constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_257getTermsQuadratic(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTermsQuadratic (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2316, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_256getTermsQuadratic(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_256getTermsQuadratic(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { SCIP_QUADVARTERM *__pyx_v__quadterms; SCIP_BILINTERM *__pyx_v__bilinterms; SCIP_VAR **__pyx_v__linvars; SCIP_Real *__pyx_v__lincoefs; int __pyx_v__nbilinterms; int __pyx_v__nquadterms; int __pyx_v__nlinvars; PyObject *__pyx_v_bilinterms = NULL; PyObject *__pyx_v_quadterms = NULL; PyObject *__pyx_v_linterms = NULL; int __pyx_v_i; PyObject *__pyx_v_var1 = NULL; PyObject *__pyx_v_var2 = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTermsQuadratic", 0); /* "pyscipopt/scip.pyx":2330 * cdef int _nlinvars * * assert cons.isQuadratic(), "constraint is not quadratic" # <<<<<<<<<<<<<< * * bilinterms = [] */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cons), __pyx_n_s_isQuadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_constraint_is_not_quadratic); __PYX_ERR(3, 2330, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":2332 * assert cons.isQuadratic(), "constraint is not quadratic" * * bilinterms = [] # <<<<<<<<<<<<<< * quadterms = [] * linterms = [] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bilinterms = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2333 * * bilinterms = [] * quadterms = [] # <<<<<<<<<<<<<< * linterms = [] * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_quadterms = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2334 * bilinterms = [] * quadterms = [] * linterms = [] # <<<<<<<<<<<<<< * * # bilinear terms */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_linterms = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2337 * * # bilinear terms * _bilinterms = SCIPgetBilinTermsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * _nbilinterms = SCIPgetNBilinTermsQuadratic(self._scip, cons.scip_cons) * */ __pyx_v__bilinterms = SCIPgetBilinTermsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2338 * # bilinear terms * _bilinterms = SCIPgetBilinTermsQuadratic(self._scip, cons.scip_cons) * _nbilinterms = SCIPgetNBilinTermsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * * for i in range(_nbilinterms): */ __pyx_v__nbilinterms = SCIPgetNBilinTermsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2340 * _nbilinterms = SCIPgetNBilinTermsQuadratic(self._scip, cons.scip_cons) * * for i in range(_nbilinterms): # <<<<<<<<<<<<<< * var1 = Variable.create(_bilinterms[i].var1) * var2 = Variable.create(_bilinterms[i].var2) */ __pyx_t_5 = __pyx_v__nbilinterms; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pyscipopt/scip.pyx":2341 * * for i in range(_nbilinterms): * var1 = Variable.create(_bilinterms[i].var1) # <<<<<<<<<<<<<< * var2 = Variable.create(_bilinterms[i].var2) * bilinterms.append((var1,var2,_bilinterms[i].coef)) */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v__bilinterms[__pyx_v_i]).var1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_var1, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2342 * for i in range(_nbilinterms): * var1 = Variable.create(_bilinterms[i].var1) * var2 = Variable.create(_bilinterms[i].var2) # <<<<<<<<<<<<<< * bilinterms.append((var1,var2,_bilinterms[i].coef)) * */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v__bilinterms[__pyx_v_i]).var2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_var2, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2343 * var1 = Variable.create(_bilinterms[i].var1) * var2 = Variable.create(_bilinterms[i].var2) * bilinterms.append((var1,var2,_bilinterms[i].coef)) # <<<<<<<<<<<<<< * * # quadratic terms */ __pyx_t_1 = PyFloat_FromDouble((__pyx_v__bilinterms[__pyx_v_i]).coef); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_var1); __Pyx_GIVEREF(__pyx_v_var1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_var1); __Pyx_INCREF(__pyx_v_var2); __Pyx_GIVEREF(__pyx_v_var2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_var2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_bilinterms, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pyscipopt/scip.pyx":2346 * * # quadratic terms * _quadterms = SCIPgetQuadVarTermsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * _nquadterms = SCIPgetNQuadVarTermsQuadratic(self._scip, cons.scip_cons) * */ __pyx_v__quadterms = SCIPgetQuadVarTermsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2347 * # quadratic terms * _quadterms = SCIPgetQuadVarTermsQuadratic(self._scip, cons.scip_cons) * _nquadterms = SCIPgetNQuadVarTermsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * * for i in range(_nquadterms): */ __pyx_v__nquadterms = SCIPgetNQuadVarTermsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2349 * _nquadterms = SCIPgetNQuadVarTermsQuadratic(self._scip, cons.scip_cons) * * for i in range(_nquadterms): # <<<<<<<<<<<<<< * var = Variable.create(_quadterms[i].var) * quadterms.append((var,_quadterms[i].sqrcoef,_quadterms[i].lincoef)) */ __pyx_t_5 = __pyx_v__nquadterms; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pyscipopt/scip.pyx":2350 * * for i in range(_nquadterms): * var = Variable.create(_quadterms[i].var) # <<<<<<<<<<<<<< * quadterms.append((var,_quadterms[i].sqrcoef,_quadterms[i].lincoef)) * */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v__quadterms[__pyx_v_i]).var); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2351 * for i in range(_nquadterms): * var = Variable.create(_quadterms[i].var) * quadterms.append((var,_quadterms[i].sqrcoef,_quadterms[i].lincoef)) # <<<<<<<<<<<<<< * * # linear terms */ __pyx_t_2 = PyFloat_FromDouble((__pyx_v__quadterms[__pyx_v_i]).sqrcoef); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyFloat_FromDouble((__pyx_v__quadterms[__pyx_v_i]).lincoef); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_var); __Pyx_GIVEREF(__pyx_v_var); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_var); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_quadterms, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pyscipopt/scip.pyx":2354 * * # linear terms * _linvars = SCIPgetLinearVarsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * _lincoefs = SCIPgetCoefsLinearVarsQuadratic(self._scip, cons.scip_cons) * _nlinvars = SCIPgetNLinearVarsQuadratic(self._scip, cons.scip_cons) */ __pyx_v__linvars = SCIPgetLinearVarsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2355 * # linear terms * _linvars = SCIPgetLinearVarsQuadratic(self._scip, cons.scip_cons) * _lincoefs = SCIPgetCoefsLinearVarsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * _nlinvars = SCIPgetNLinearVarsQuadratic(self._scip, cons.scip_cons) * */ __pyx_v__lincoefs = SCIPgetCoefsLinearVarsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2356 * _linvars = SCIPgetLinearVarsQuadratic(self._scip, cons.scip_cons) * _lincoefs = SCIPgetCoefsLinearVarsQuadratic(self._scip, cons.scip_cons) * _nlinvars = SCIPgetNLinearVarsQuadratic(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * * for i in range(_nlinvars): */ __pyx_v__nlinvars = SCIPgetNLinearVarsQuadratic(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2358 * _nlinvars = SCIPgetNLinearVarsQuadratic(self._scip, cons.scip_cons) * * for i in range(_nlinvars): # <<<<<<<<<<<<<< * var = Variable.create(_linvars[i]) * linterms.append((var,_lincoefs[i])) */ __pyx_t_5 = __pyx_v__nlinvars; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pyscipopt/scip.pyx":2359 * * for i in range(_nlinvars): * var = Variable.create(_linvars[i]) # <<<<<<<<<<<<<< * linterms.append((var,_lincoefs[i])) * */ __pyx_t_3 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v__linvars[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2360 * for i in range(_nlinvars): * var = Variable.create(_linvars[i]) * linterms.append((var,_lincoefs[i])) # <<<<<<<<<<<<<< * * return (bilinterms, quadterms, linterms) */ __pyx_t_3 = PyFloat_FromDouble((__pyx_v__lincoefs[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_var); __Pyx_GIVEREF(__pyx_v_var); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_var); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_linterms, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pyscipopt/scip.pyx":2362 * linterms.append((var,_lincoefs[i])) * * return (bilinterms, quadterms, linterms) # <<<<<<<<<<<<<< * * def setRelaxSolVal(self, Variable var, val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_bilinterms); __Pyx_GIVEREF(__pyx_v_bilinterms); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bilinterms); __Pyx_INCREF(__pyx_v_quadterms); __Pyx_GIVEREF(__pyx_v_quadterms); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_quadterms); __Pyx_INCREF(__pyx_v_linterms); __Pyx_GIVEREF(__pyx_v_linterms); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_linterms); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2316 * return Constraint.create(transcons) * * def getTermsQuadratic(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve bilinear, quadratic, and linear terms of a quadratic constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.getTermsQuadratic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bilinterms); __Pyx_XDECREF(__pyx_v_quadterms); __Pyx_XDECREF(__pyx_v_linterms); __Pyx_XDECREF(__pyx_v_var1); __Pyx_XDECREF(__pyx_v_var2); __Pyx_XDECREF(__pyx_v_var); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2364 * return (bilinterms, quadterms, linterms) * * def setRelaxSolVal(self, Variable var, val): # <<<<<<<<<<<<<< * """sets the value of the given variable in the global relaxation solution""" * PY_SCIP_CALL(SCIPsetRelaxSolVal(self._scip, var.scip_var, val)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_259setRelaxSolVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_258setRelaxSolVal[] = "sets the value of the given variable in the global relaxation solution"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_259setRelaxSolVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_val = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRelaxSolVal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setRelaxSolVal", 1, 2, 2, 1); __PYX_ERR(3, 2364, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRelaxSolVal") < 0)) __PYX_ERR(3, 2364, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_val = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRelaxSolVal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2364, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setRelaxSolVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2364, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_258setRelaxSolVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_val); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_258setRelaxSolVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRelaxSolVal", 0); /* "pyscipopt/scip.pyx":2366 * def setRelaxSolVal(self, Variable var, val): * """sets the value of the given variable in the global relaxation solution""" * PY_SCIP_CALL(SCIPsetRelaxSolVal(self._scip, var.scip_var, val)) # <<<<<<<<<<<<<< * * def getConss(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2366, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetRelaxSolVal(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2364 * return (bilinterms, quadterms, linterms) * * def setRelaxSolVal(self, Variable var, val): # <<<<<<<<<<<<<< * """sets the value of the given variable in the global relaxation solution""" * PY_SCIP_CALL(SCIPsetRelaxSolVal(self._scip, var.scip_var, val)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setRelaxSolVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2368 * PY_SCIP_CALL(SCIPsetRelaxSolVal(self._scip, var.scip_var, val)) * * def getConss(self): # <<<<<<<<<<<<<< * """Retrieve all constraints.""" * cdef SCIP_CONS** _conss */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_261getConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_260getConss[] = "Retrieve all constraints."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_261getConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConss (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_260getConss(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_260getConss(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_CONS **__pyx_v__conss; int __pyx_v__nconss; CYTHON_UNUSED PyObject *__pyx_v_conss = NULL; int __pyx_9genexpr19__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConss", 0); /* "pyscipopt/scip.pyx":2372 * cdef SCIP_CONS** _conss * cdef int _nconss * conss = [] # <<<<<<<<<<<<<< * * _conss = SCIPgetConss(self._scip) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_conss = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2374 * conss = [] * * _conss = SCIPgetConss(self._scip) # <<<<<<<<<<<<<< * _nconss = SCIPgetNConss(self._scip) * return [Constraint.create(_conss[i]) for i in range(_nconss)] */ __pyx_v__conss = SCIPgetConss(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":2375 * * _conss = SCIPgetConss(self._scip) * _nconss = SCIPgetNConss(self._scip) # <<<<<<<<<<<<<< * return [Constraint.create(_conss[i]) for i in range(_nconss)] * */ __pyx_v__nconss = SCIPgetNConss(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":2376 * _conss = SCIPgetConss(self._scip) * _nconss = SCIPgetNConss(self._scip) * return [Constraint.create(_conss[i]) for i in range(_nconss)] # <<<<<<<<<<<<<< * * def getNConss(self): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v__nconss; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_9genexpr19__pyx_v_i = __pyx_t_4; __pyx_t_5 = __pyx_f_9pyscipopt_4scip_10Constraint_create((__pyx_v__conss[__pyx_9genexpr19__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(3, 2376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2368 * PY_SCIP_CALL(SCIPsetRelaxSolVal(self._scip, var.scip_var, val)) * * def getConss(self): # <<<<<<<<<<<<<< * """Retrieve all constraints.""" * cdef SCIP_CONS** _conss */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.getConss", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_conss); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2378 * return [Constraint.create(_conss[i]) for i in range(_nconss)] * * def getNConss(self): # <<<<<<<<<<<<<< * """Retrieve number of all constraints""" * return SCIPgetNConss(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_263getNConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_262getNConss[] = "Retrieve number of all constraints"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_263getNConss(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNConss (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_262getNConss(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_262getNConss(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNConss", 0); /* "pyscipopt/scip.pyx":2380 * def getNConss(self): * """Retrieve number of all constraints""" * return SCIPgetNConss(self._scip) # <<<<<<<<<<<<<< * * def delCons(self, Constraint cons): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNConss(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2378 * return [Constraint.create(_conss[i]) for i in range(_nconss)] * * def getNConss(self): # <<<<<<<<<<<<<< * """Retrieve number of all constraints""" * return SCIPgetNConss(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNConss", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2382 * return SCIPgetNConss(self._scip) * * def delCons(self, Constraint cons): # <<<<<<<<<<<<<< * """Delete constraint from the model * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_265delCons(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_264delCons[] = "Delete constraint from the model\n\n :param Constraint cons: constraint to be deleted\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_265delCons(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delCons (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2382, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_264delCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_264delCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delCons", 0); /* "pyscipopt/scip.pyx":2388 * * """ * PY_SCIP_CALL(SCIPdelCons(self._scip, cons.scip_cons)) # <<<<<<<<<<<<<< * * def delConsLocal(self, Constraint cons): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPdelCons(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2382 * return SCIPgetNConss(self._scip) * * def delCons(self, Constraint cons): # <<<<<<<<<<<<<< * """Delete constraint from the model * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.delCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2390 * PY_SCIP_CALL(SCIPdelCons(self._scip, cons.scip_cons)) * * def delConsLocal(self, Constraint cons): # <<<<<<<<<<<<<< * """Delete constraint from the current node and it's children * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_267delConsLocal(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_266delConsLocal[] = "Delete constraint from the current node and it's children\n\n :param Constraint cons: constraint to be deleted\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_267delConsLocal(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delConsLocal (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2390, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_266delConsLocal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_266delConsLocal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delConsLocal", 0); /* "pyscipopt/scip.pyx":2396 * * """ * PY_SCIP_CALL(SCIPdelConsLocal(self._scip, cons.scip_cons)) # <<<<<<<<<<<<<< * * def getValsLinear(self, Constraint cons): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPdelConsLocal(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2390 * PY_SCIP_CALL(SCIPdelCons(self._scip, cons.scip_cons)) * * def delConsLocal(self, Constraint cons): # <<<<<<<<<<<<<< * """Delete constraint from the current node and it's children * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.delConsLocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2398 * PY_SCIP_CALL(SCIPdelConsLocal(self._scip, cons.scip_cons)) * * def getValsLinear(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the coefficients of a linear constraint * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_269getValsLinear(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_268getValsLinear[] = "Retrieve the coefficients of a linear constraint\n\n :param Constraint cons: linear constraint to get the coefficients of\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_269getValsLinear(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getValsLinear (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2398, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_268getValsLinear(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_268getValsLinear(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { SCIP_Real *__pyx_v__vals; SCIP_VAR **__pyx_v__vars; PyObject *__pyx_v_constype = NULL; PyObject *__pyx_v_valsdict = NULL; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getValsLinear", 0); /* "pyscipopt/scip.pyx":2407 * cdef SCIP_VAR** _vars * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if not constype == 'linear': * raise Warning("coefficients not available for constraints of type ", constype) */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2408 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': # <<<<<<<<<<<<<< * raise Warning("coefficients not available for constraints of type ", constype) * */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 2408, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_4)) { /* "pyscipopt/scip.pyx":2409 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': * raise Warning("coefficients not available for constraints of type ", constype) # <<<<<<<<<<<<<< * * _vals = SCIPgetValsLinear(self._scip, cons.scip_cons) */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_coefficients_not_available_for_c); __Pyx_GIVEREF(__pyx_kp_u_coefficients_not_available_for_c); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_coefficients_not_available_for_c); __Pyx_INCREF(__pyx_v_constype); __Pyx_GIVEREF(__pyx_v_constype); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_constype); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2409, __pyx_L1_error) /* "pyscipopt/scip.pyx":2408 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': # <<<<<<<<<<<<<< * raise Warning("coefficients not available for constraints of type ", constype) * */ } /* "pyscipopt/scip.pyx":2411 * raise Warning("coefficients not available for constraints of type ", constype) * * _vals = SCIPgetValsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * _vars = SCIPgetVarsLinear(self._scip, cons.scip_cons) * */ __pyx_v__vals = SCIPgetValsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2412 * * _vals = SCIPgetValsLinear(self._scip, cons.scip_cons) * _vars = SCIPgetVarsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * * valsdict = {} */ __pyx_v__vars = SCIPgetVarsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2414 * _vars = SCIPgetVarsLinear(self._scip, cons.scip_cons) * * valsdict = {} # <<<<<<<<<<<<<< * for i in range(SCIPgetNVarsLinear(self._scip, cons.scip_cons)): * valsdict[bytes(SCIPvarGetName(_vars[i])).decode('utf-8')] = _vals[i] */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_valsdict = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2415 * * valsdict = {} * for i in range(SCIPgetNVarsLinear(self._scip, cons.scip_cons)): # <<<<<<<<<<<<<< * valsdict[bytes(SCIPvarGetName(_vars[i])).decode('utf-8')] = _vals[i] * return valsdict */ __pyx_t_5 = SCIPgetNVarsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pyscipopt/scip.pyx":2416 * valsdict = {} * for i in range(SCIPgetNVarsLinear(self._scip, cons.scip_cons)): * valsdict[bytes(SCIPvarGetName(_vars[i])).decode('utf-8')] = _vals[i] # <<<<<<<<<<<<<< * return valsdict * */ __pyx_t_2 = PyFloat_FromDouble((__pyx_v__vals[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPvarGetName((__pyx_v__vars[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_8, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(PyDict_SetItem(__pyx_v_valsdict, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(3, 2416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pyscipopt/scip.pyx":2417 * for i in range(SCIPgetNVarsLinear(self._scip, cons.scip_cons)): * valsdict[bytes(SCIPvarGetName(_vars[i])).decode('utf-8')] = _vals[i] * return valsdict # <<<<<<<<<<<<<< * * def getDualMultiplier(self, Constraint cons): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_valsdict); __pyx_r = __pyx_v_valsdict; goto __pyx_L0; /* "pyscipopt/scip.pyx":2398 * PY_SCIP_CALL(SCIPdelConsLocal(self._scip, cons.scip_cons)) * * def getValsLinear(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the coefficients of a linear constraint * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.getValsLinear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XDECREF(__pyx_v_valsdict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2419 * return valsdict * * def getDualMultiplier(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the dual multiplier to a linear constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_271getDualMultiplier(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_270getDualMultiplier[] = "Retrieve the dual multiplier to a linear constraint.\n\n :param Constraint cons: linear constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_271getDualMultiplier(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDualMultiplier (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2419, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_270getDualMultiplier(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_270getDualMultiplier(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { PyObject *__pyx_v_constype = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_transcons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDualMultiplier", 0); /* "pyscipopt/scip.pyx":2425 * * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if not constype == 'linear': * raise Warning("dual solution values not available for constraints of type ", constype) */ __pyx_t_1 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_constype = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2426 * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': # <<<<<<<<<<<<<< * raise Warning("dual solution values not available for constraints of type ", constype) * if cons.isOriginal(): */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 2426, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_4)) { /* "pyscipopt/scip.pyx":2427 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': * raise Warning("dual solution values not available for constraints of type ", constype) # <<<<<<<<<<<<<< * if cons.isOriginal(): * transcons = <Constraint>self.getTransformedCons(cons) */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_dual_solution_values_not_availab); __Pyx_GIVEREF(__pyx_kp_u_dual_solution_values_not_availab); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_dual_solution_values_not_availab); __Pyx_INCREF(__pyx_v_constype); __Pyx_GIVEREF(__pyx_v_constype); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_constype); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 2427, __pyx_L1_error) /* "pyscipopt/scip.pyx":2426 * """ * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': # <<<<<<<<<<<<<< * raise Warning("dual solution values not available for constraints of type ", constype) * if cons.isOriginal(): */ } /* "pyscipopt/scip.pyx":2428 * if not constype == 'linear': * raise Warning("dual solution values not available for constraints of type ", constype) * if cons.isOriginal(): # <<<<<<<<<<<<<< * transcons = <Constraint>self.getTransformedCons(cons) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cons), __pyx_n_s_isOriginal); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2429 * raise Warning("dual solution values not available for constraints of type ", constype) * if cons.isOriginal(): * transcons = <Constraint>self.getTransformedCons(cons) # <<<<<<<<<<<<<< * else: * transcons = cons */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransformedCons); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, ((PyObject *)__pyx_v_cons)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_cons)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_transcons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2428 * if not constype == 'linear': * raise Warning("dual solution values not available for constraints of type ", constype) * if cons.isOriginal(): # <<<<<<<<<<<<<< * transcons = <Constraint>self.getTransformedCons(cons) * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2431 * transcons = <Constraint>self.getTransformedCons(cons) * else: * transcons = cons # <<<<<<<<<<<<<< * return SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * */ /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_cons)); __pyx_v_transcons = __pyx_v_cons; } __pyx_L4:; /* "pyscipopt/scip.pyx":2432 * else: * transcons = cons * return SCIPgetDualsolLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * * def getDualsolLinear(self, Constraint cons): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetDualsolLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2419 * return valsdict * * def getDualMultiplier(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the dual multiplier to a linear constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.getDualMultiplier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_constype); __Pyx_XDECREF((PyObject *)__pyx_v_transcons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2434 * return SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * * def getDualsolLinear(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the dual solution to a linear constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_273getDualsolLinear(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_272getDualsolLinear[] = "Retrieve the dual solution to a linear constraint.\n\n :param Constraint cons: linear constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_273getDualsolLinear(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDualsolLinear (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2434, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_272getDualsolLinear(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_272getDualsolLinear(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { SCIP_Real __pyx_v_dualsolval; SCIP_Bool __pyx_v_boundconstraint; int __pyx_v__nvars; SCIP_VAR **__pyx_v__vars; SCIP_Real *__pyx_v__vals; PyObject *__pyx_v_dual = NULL; PyObject *__pyx_v_constype = NULL; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_transcons = NULL; PyObject *__pyx_v_activity = NULL; PyObject *__pyx_v_rhs = NULL; PyObject *__pyx_v_lhs = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDualsolLinear", 0); /* "pyscipopt/scip.pyx":2447 * cdef SCIP_Bool _success * * if self.version() > 6.0: # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPgetDualSolVal(self._scip, cons.scip_cons, &dualsolval, &boundconstraint) ) * return dualsolval */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_float_6_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2448 * * if self.version() > 6.0: * PY_SCIP_CALL( SCIPgetDualSolVal(self._scip, cons.scip_cons, &dualsolval, &boundconstraint) ) # <<<<<<<<<<<<<< * return dualsolval * else: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetDualSolVal(__pyx_v_self->_scip, __pyx_v_cons->scip_cons, (&__pyx_v_dualsolval), (&__pyx_v_boundconstraint))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2449 * if self.version() > 6.0: * PY_SCIP_CALL( SCIPgetDualSolVal(self._scip, cons.scip_cons, &dualsolval, &boundconstraint) ) * return dualsolval # <<<<<<<<<<<<<< * else: * dual = 0.0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_dualsolval); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2447 * cdef SCIP_Bool _success * * if self.version() > 6.0: # <<<<<<<<<<<<<< * PY_SCIP_CALL( SCIPgetDualSolVal(self._scip, cons.scip_cons, &dualsolval, &boundconstraint) ) * return dualsolval */ } /* "pyscipopt/scip.pyx":2451 * return dualsolval * else: * dual = 0.0 # <<<<<<<<<<<<<< * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') */ /*else*/ { __Pyx_INCREF(__pyx_float_0_0); __pyx_v_dual = __pyx_float_0_0; /* "pyscipopt/scip.pyx":2453 * dual = 0.0 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') # <<<<<<<<<<<<<< * if not constype == 'linear': * raise Warning("dual solution values not available for constraints of type ", constype) */ __pyx_t_2 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIPconsGetHdlr(__pyx_v_cons->scip_cons))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_constype = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2454 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': # <<<<<<<<<<<<<< * raise Warning("dual solution values not available for constraints of type ", constype) * */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_constype, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2454, __pyx_L1_error) __pyx_t_6 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_6)) { /* "pyscipopt/scip.pyx":2455 * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': * raise Warning("dual solution values not available for constraints of type ", constype) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_dual_solution_values_not_availab); __Pyx_GIVEREF(__pyx_kp_u_dual_solution_values_not_availab); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_dual_solution_values_not_availab); __Pyx_INCREF(__pyx_v_constype); __Pyx_GIVEREF(__pyx_v_constype); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_constype); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 2455, __pyx_L1_error) /* "pyscipopt/scip.pyx":2454 * * constype = bytes(SCIPconshdlrGetName(SCIPconsGetHdlr(cons.scip_cons))).decode('UTF-8') * if not constype == 'linear': # <<<<<<<<<<<<<< * raise Warning("dual solution values not available for constraints of type ", constype) * */ } /* "pyscipopt/scip.pyx":2457 * raise Warning("dual solution values not available for constraints of type ", constype) * * try: # <<<<<<<<<<<<<< * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) * if cons.isOriginal(): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pyscipopt/scip.pyx":2458 * * try: * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * if cons.isOriginal(): * transcons = <Constraint>self.getTransformedCons(cons) */ __pyx_v__nvars = SCIPgetNVarsLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons); /* "pyscipopt/scip.pyx":2459 * try: * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) * if cons.isOriginal(): # <<<<<<<<<<<<<< * transcons = <Constraint>self.getTransformedCons(cons) * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cons), __pyx_n_s_isOriginal); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2459, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2459, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 2459, __pyx_L5_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pyscipopt/scip.pyx":2460 * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) * if cons.isOriginal(): * transcons = <Constraint>self.getTransformedCons(cons) # <<<<<<<<<<<<<< * else: * transcons = cons */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransformedCons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2460, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_cons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_cons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2460, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_transcons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2459 * try: * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) * if cons.isOriginal(): # <<<<<<<<<<<<<< * transcons = <Constraint>self.getTransformedCons(cons) * else: */ goto __pyx_L11; } /* "pyscipopt/scip.pyx":2462 * transcons = <Constraint>self.getTransformedCons(cons) * else: * transcons = cons # <<<<<<<<<<<<<< * dual = SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * if dual == 0.0 and _nvars == 1: */ /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_cons)); __pyx_v_transcons = __pyx_v_cons; } __pyx_L11:; /* "pyscipopt/scip.pyx":2463 * else: * transcons = cons * dual = SCIPgetDualsolLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * if dual == 0.0 and _nvars == 1: * _vars = SCIPgetVarsLinear(self._scip, transcons.scip_cons) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetDualsolLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2463, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_dual, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2464 * transcons = cons * dual = SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * if dual == 0.0 and _nvars == 1: # <<<<<<<<<<<<<< * _vars = SCIPgetVarsLinear(self._scip, transcons.scip_cons) * _vals = SCIPgetValsLinear(self._scip, transcons.scip_cons) */ __pyx_t_2 = __Pyx_PyFloat_EqObjC(__pyx_v_dual, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2464, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2464, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { } else { __pyx_t_6 = __pyx_t_4; goto __pyx_L13_bool_binop_done; } __pyx_t_4 = ((__pyx_v__nvars == 1) != 0); __pyx_t_6 = __pyx_t_4; __pyx_L13_bool_binop_done:; if (__pyx_t_6) { /* "pyscipopt/scip.pyx":2465 * dual = SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * if dual == 0.0 and _nvars == 1: * _vars = SCIPgetVarsLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * _vals = SCIPgetValsLinear(self._scip, transcons.scip_cons) * activity = SCIPvarGetLPSol(_vars[0]) * _vals[0] */ __pyx_v__vars = SCIPgetVarsLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons); /* "pyscipopt/scip.pyx":2466 * if dual == 0.0 and _nvars == 1: * _vars = SCIPgetVarsLinear(self._scip, transcons.scip_cons) * _vals = SCIPgetValsLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * activity = SCIPvarGetLPSol(_vars[0]) * _vals[0] * rhs = SCIPgetRhsLinear(self._scip, transcons.scip_cons) */ __pyx_v__vals = SCIPgetValsLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons); /* "pyscipopt/scip.pyx":2467 * _vars = SCIPgetVarsLinear(self._scip, transcons.scip_cons) * _vals = SCIPgetValsLinear(self._scip, transcons.scip_cons) * activity = SCIPvarGetLPSol(_vars[0]) * _vals[0] # <<<<<<<<<<<<<< * rhs = SCIPgetRhsLinear(self._scip, transcons.scip_cons) * lhs = SCIPgetLhsLinear(self._scip, transcons.scip_cons) */ __pyx_t_2 = PyFloat_FromDouble((SCIPvarGetLPSol((__pyx_v__vars[0])) * (__pyx_v__vals[0]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2467, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_activity = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2468 * _vals = SCIPgetValsLinear(self._scip, transcons.scip_cons) * activity = SCIPvarGetLPSol(_vars[0]) * _vals[0] * rhs = SCIPgetRhsLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * lhs = SCIPgetLhsLinear(self._scip, transcons.scip_cons) * if (activity == rhs) or (activity == lhs): */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetRhsLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2468, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_rhs = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2469 * activity = SCIPvarGetLPSol(_vars[0]) * _vals[0] * rhs = SCIPgetRhsLinear(self._scip, transcons.scip_cons) * lhs = SCIPgetLhsLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * if (activity == rhs) or (activity == lhs): * dual = SCIPgetVarRedcost(self._scip, _vars[0]) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetLhsLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2469, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_lhs = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2470 * rhs = SCIPgetRhsLinear(self._scip, transcons.scip_cons) * lhs = SCIPgetLhsLinear(self._scip, transcons.scip_cons) * if (activity == rhs) or (activity == lhs): # <<<<<<<<<<<<<< * dual = SCIPgetVarRedcost(self._scip, _vars[0]) * */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_activity, __pyx_v_rhs, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2470, __pyx_L5_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2470, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_4) { } else { __pyx_t_6 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_v_activity, __pyx_v_lhs, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2470, __pyx_L5_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2470, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_6) { /* "pyscipopt/scip.pyx":2471 * lhs = SCIPgetLhsLinear(self._scip, transcons.scip_cons) * if (activity == rhs) or (activity == lhs): * dual = SCIPgetVarRedcost(self._scip, _vars[0]) # <<<<<<<<<<<<<< * * if self.getObjectiveSense() == "maximize" and not dual == 0.0: */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetVarRedcost(__pyx_v_self->_scip, (__pyx_v__vars[0]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2471, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_dual, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2470 * rhs = SCIPgetRhsLinear(self._scip, transcons.scip_cons) * lhs = SCIPgetLhsLinear(self._scip, transcons.scip_cons) * if (activity == rhs) or (activity == lhs): # <<<<<<<<<<<<<< * dual = SCIPgetVarRedcost(self._scip, _vars[0]) * */ } /* "pyscipopt/scip.pyx":2464 * transcons = cons * dual = SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * if dual == 0.0 and _nvars == 1: # <<<<<<<<<<<<<< * _vars = SCIPgetVarsLinear(self._scip, transcons.scip_cons) * _vals = SCIPgetValsLinear(self._scip, transcons.scip_cons) */ } /* "pyscipopt/scip.pyx":2473 * dual = SCIPgetVarRedcost(self._scip, _vars[0]) * * if self.getObjectiveSense() == "maximize" and not dual == 0.0: # <<<<<<<<<<<<<< * dual = -dual * except: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getObjectiveSense); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2473, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2473, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_maximize, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2473, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { } else { __pyx_t_6 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } __pyx_t_2 = __Pyx_PyFloat_EqObjC(__pyx_v_dual, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2473, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2473, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = ((!__pyx_t_4) != 0); __pyx_t_6 = __pyx_t_10; __pyx_L19_bool_binop_done:; if (__pyx_t_6) { /* "pyscipopt/scip.pyx":2474 * * if self.getObjectiveSense() == "maximize" and not dual == 0.0: * dual = -dual # <<<<<<<<<<<<<< * except: * raise Warning("no dual solution available for constraint " + cons.name) */ __pyx_t_2 = PyNumber_Negative(__pyx_v_dual); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2474, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_dual, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2473 * dual = SCIPgetVarRedcost(self._scip, _vars[0]) * * if self.getObjectiveSense() == "maximize" and not dual == 0.0: # <<<<<<<<<<<<<< * dual = -dual * except: */ } /* "pyscipopt/scip.pyx":2457 * raise Warning("dual solution values not available for constraints of type ", constype) * * try: # <<<<<<<<<<<<<< * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) * if cons.isOriginal(): */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":2475 * if self.getObjectiveSense() == "maximize" and not dual == 0.0: * dual = -dual * except: # <<<<<<<<<<<<<< * raise Warning("no dual solution available for constraint " + cons.name) * return dual */ /*except:*/ { __Pyx_AddTraceback("pyscipopt.scip.Model.getDualsolLinear", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(3, 2475, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); /* "pyscipopt/scip.pyx":2476 * dual = -dual * except: * raise Warning("no dual solution available for constraint " + cons.name) # <<<<<<<<<<<<<< * return dual * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cons), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2476, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = PyNumber_Add(__pyx_kp_u_no_dual_solution_available_for_c, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 2476, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2476, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(3, 2476, __pyx_L7_except_error) } __pyx_L7_except_error:; /* "pyscipopt/scip.pyx":2457 * raise Warning("dual solution values not available for constraints of type ", constype) * * try: # <<<<<<<<<<<<<< * _nvars = SCIPgetNVarsLinear(self._scip, cons.scip_cons) * if cons.isOriginal(): */ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L10_try_end:; } /* "pyscipopt/scip.pyx":2477 * except: * raise Warning("no dual solution available for constraint " + cons.name) * return dual # <<<<<<<<<<<<<< * * def getDualfarkasLinear(self, Constraint cons): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dual); __pyx_r = __pyx_v_dual; goto __pyx_L0; } /* "pyscipopt/scip.pyx":2434 * return SCIPgetDualsolLinear(self._scip, transcons.scip_cons) * * def getDualsolLinear(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the dual solution to a linear constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pyscipopt.scip.Model.getDualsolLinear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dual); __Pyx_XDECREF(__pyx_v_constype); __Pyx_XDECREF((PyObject *)__pyx_v_transcons); __Pyx_XDECREF(__pyx_v_activity); __Pyx_XDECREF(__pyx_v_rhs); __Pyx_XDECREF(__pyx_v_lhs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2479 * return dual * * def getDualfarkasLinear(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the dual farkas value to a linear constraint. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_275getDualfarkasLinear(PyObject *__pyx_v_self, PyObject *__pyx_v_cons); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_274getDualfarkasLinear[] = "Retrieve the dual farkas value to a linear constraint.\n\n :param Constraint cons: linear constraint\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_275getDualfarkasLinear(PyObject *__pyx_v_self, PyObject *__pyx_v_cons) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDualfarkasLinear (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cons), __pyx_ptype_9pyscipopt_4scip_Constraint, 1, "cons", 0))) __PYX_ERR(3, 2479, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_274getDualfarkasLinear(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_v_cons)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_274getDualfarkasLinear(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_cons) { struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_transcons = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDualfarkasLinear", 0); /* "pyscipopt/scip.pyx":2486 * """ * # TODO this should ideally be handled on the SCIP side * if cons.isOriginal(): # <<<<<<<<<<<<<< * transcons = <Constraint>self.getTransformedCons(cons) * return SCIPgetDualfarkasLinear(self._scip, transcons.scip_cons) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cons), __pyx_n_s_isOriginal); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 2486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pyscipopt/scip.pyx":2487 * # TODO this should ideally be handled on the SCIP side * if cons.isOriginal(): * transcons = <Constraint>self.getTransformedCons(cons) # <<<<<<<<<<<<<< * return SCIPgetDualfarkasLinear(self._scip, transcons.scip_cons) * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransformedCons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_cons)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_cons)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_transcons = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":2488 * if cons.isOriginal(): * transcons = <Constraint>self.getTransformedCons(cons) * return SCIPgetDualfarkasLinear(self._scip, transcons.scip_cons) # <<<<<<<<<<<<<< * else: * return SCIPgetDualfarkasLinear(self._scip, cons.scip_cons) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(SCIPgetDualfarkasLinear(__pyx_v_self->_scip, __pyx_v_transcons->scip_cons)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2486 * """ * # TODO this should ideally be handled on the SCIP side * if cons.isOriginal(): # <<<<<<<<<<<<<< * transcons = <Constraint>self.getTransformedCons(cons) * return SCIPgetDualfarkasLinear(self._scip, transcons.scip_cons) */ } /* "pyscipopt/scip.pyx":2490 * return SCIPgetDualfarkasLinear(self._scip, transcons.scip_cons) * else: * return SCIPgetDualfarkasLinear(self._scip, cons.scip_cons) # <<<<<<<<<<<<<< * * def getVarRedcost(self, Variable var): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(SCIPgetDualfarkasLinear(__pyx_v_self->_scip, __pyx_v_cons->scip_cons)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pyscipopt/scip.pyx":2479 * return dual * * def getDualfarkasLinear(self, Constraint cons): # <<<<<<<<<<<<<< * """Retrieve the dual farkas value to a linear constraint. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.getDualfarkasLinear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_transcons); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2492 * return SCIPgetDualfarkasLinear(self._scip, cons.scip_cons) * * def getVarRedcost(self, Variable var): # <<<<<<<<<<<<<< * """Retrieve the reduced cost of a variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_277getVarRedcost(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_276getVarRedcost[] = "Retrieve the reduced cost of a variable.\n\n :param Variable var: variable to get the reduced cost of\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_277getVarRedcost(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVarRedcost (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2492, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_276getVarRedcost(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_276getVarRedcost(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_v_redcost = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVarRedcost", 0); /* "pyscipopt/scip.pyx":2498 * * """ * redcost = None # <<<<<<<<<<<<<< * try: * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) */ __Pyx_INCREF(Py_None); __pyx_v_redcost = Py_None; /* "pyscipopt/scip.pyx":2499 * """ * redcost = None * try: # <<<<<<<<<<<<<< * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) * if self.getObjectiveSense() == "maximize": */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "pyscipopt/scip.pyx":2500 * redcost = None * try: * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) # <<<<<<<<<<<<<< * if self.getObjectiveSense() == "maximize": * redcost = -redcost */ __pyx_t_4 = PyFloat_FromDouble(SCIPgetVarRedcost(__pyx_v_self->_scip, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2500, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_redcost, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2501 * try: * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) * if self.getObjectiveSense() == "maximize": # <<<<<<<<<<<<<< * redcost = -redcost * except: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getObjectiveSense); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2501, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2501, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_maximize, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2501, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":2502 * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) * if self.getObjectiveSense() == "maximize": * redcost = -redcost # <<<<<<<<<<<<<< * except: * raise Warning("no reduced cost available for variable " + var.name) */ __pyx_t_4 = PyNumber_Negative(__pyx_v_redcost); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2502, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_redcost, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2501 * try: * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) * if self.getObjectiveSense() == "maximize": # <<<<<<<<<<<<<< * redcost = -redcost * except: */ } /* "pyscipopt/scip.pyx":2499 * """ * redcost = None * try: # <<<<<<<<<<<<<< * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) * if self.getObjectiveSense() == "maximize": */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2503 * if self.getObjectiveSense() == "maximize": * redcost = -redcost * except: # <<<<<<<<<<<<<< * raise Warning("no reduced cost available for variable " + var.name) * return redcost */ /*except:*/ { __Pyx_AddTraceback("pyscipopt.scip.Model.getVarRedcost", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(3, 2503, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); /* "pyscipopt/scip.pyx":2504 * redcost = -redcost * except: * raise Warning("no reduced cost available for variable " + var.name) # <<<<<<<<<<<<<< * return redcost * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_var), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyNumber_Add(__pyx_kp_u_no_reduced_cost_available_for_va, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(3, 2504, __pyx_L5_except_error) } __pyx_L5_except_error:; /* "pyscipopt/scip.pyx":2499 * """ * redcost = None * try: # <<<<<<<<<<<<<< * redcost = SCIPgetVarRedcost(self._scip, var.scip_var) * if self.getObjectiveSense() == "maximize": */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "pyscipopt/scip.pyx":2505 * except: * raise Warning("no reduced cost available for variable " + var.name) * return redcost # <<<<<<<<<<<<<< * * def optimize(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_redcost); __pyx_r = __pyx_v_redcost; goto __pyx_L0; /* "pyscipopt/scip.pyx":2492 * return SCIPgetDualfarkasLinear(self._scip, cons.scip_cons) * * def getVarRedcost(self, Variable var): # <<<<<<<<<<<<<< * """Retrieve the reduced cost of a variable. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.getVarRedcost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_redcost); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2507 * return redcost * * def optimize(self): # <<<<<<<<<<<<<< * """Optimize the problem.""" * PY_SCIP_CALL(SCIPsolve(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_279optimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_278optimize[] = "Optimize the problem."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_279optimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("optimize (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_278optimize(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_278optimize(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("optimize", 0); /* "pyscipopt/scip.pyx":2509 * def optimize(self): * """Optimize the problem.""" * PY_SCIP_CALL(SCIPsolve(self._scip)) # <<<<<<<<<<<<<< * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsolve(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2510 * """Optimize the problem.""" * PY_SCIP_CALL(SCIPsolve(self._scip)) * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) # <<<<<<<<<<<<<< * * def presolve(self): */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(SCIPgetBestSol(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Solution))))) __PYX_ERR(3, 2510, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_bestSol); __Pyx_DECREF(((PyObject *)__pyx_v_self->_bestSol)); __pyx_v_self->_bestSol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2507 * return redcost * * def optimize(self): # <<<<<<<<<<<<<< * """Optimize the problem.""" * PY_SCIP_CALL(SCIPsolve(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.optimize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2512 * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) * * def presolve(self): # <<<<<<<<<<<<<< * """Presolve the problem.""" * PY_SCIP_CALL(SCIPpresolve(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_281presolve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_280presolve[] = "Presolve the problem."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_281presolve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("presolve (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_280presolve(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_280presolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("presolve", 0); /* "pyscipopt/scip.pyx":2514 * def presolve(self): * """Presolve the problem.""" * PY_SCIP_CALL(SCIPpresolve(self._scip)) # <<<<<<<<<<<<<< * * # Benders' decomposition methods */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPpresolve(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2512 * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) * * def presolve(self): # <<<<<<<<<<<<<< * """Presolve the problem.""" * PY_SCIP_CALL(SCIPpresolve(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.presolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2517 * * # Benders' decomposition methods * def initBendersDefault(self, subproblems): # <<<<<<<<<<<<<< * """initialises the default Benders' decomposition with a dictionary of subproblems * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_283initBendersDefault(PyObject *__pyx_v_self, PyObject *__pyx_v_subproblems); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_282initBendersDefault[] = "initialises the default Benders' decomposition with a dictionary of subproblems\n\n Keyword arguments:\n subproblems -- a single Model instance or dictionary of Model instances\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_283initBendersDefault(PyObject *__pyx_v_self, PyObject *__pyx_v_subproblems) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("initBendersDefault (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_282initBendersDefault(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_subproblems)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_282initBendersDefault(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_subproblems) { SCIP **__pyx_v_subprobs; CYTHON_UNUSED SCIP_BENDERS *__pyx_v_benders; int __pyx_v_isdict; PyObject *__pyx_v_nsubproblems = NULL; PyObject *__pyx_v_idx = NULL; PyObject *__pyx_v_subprob = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; SCIP *__pyx_t_11; Py_ssize_t __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("initBendersDefault", 0); /* "pyscipopt/scip.pyx":2527 * * # checking whether subproblems is a dictionary * if isinstance(subproblems, dict): # <<<<<<<<<<<<<< * isdict = True * nsubproblems = len(subproblems) */ __pyx_t_1 = PyDict_Check(__pyx_v_subproblems); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2528 * # checking whether subproblems is a dictionary * if isinstance(subproblems, dict): * isdict = True # <<<<<<<<<<<<<< * nsubproblems = len(subproblems) * else: */ __pyx_v_isdict = 1; /* "pyscipopt/scip.pyx":2529 * if isinstance(subproblems, dict): * isdict = True * nsubproblems = len(subproblems) # <<<<<<<<<<<<<< * else: * isdict = False */ __pyx_t_3 = PyObject_Length(__pyx_v_subproblems); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2529, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_nsubproblems = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2527 * * # checking whether subproblems is a dictionary * if isinstance(subproblems, dict): # <<<<<<<<<<<<<< * isdict = True * nsubproblems = len(subproblems) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":2531 * nsubproblems = len(subproblems) * else: * isdict = False # <<<<<<<<<<<<<< * nsubproblems = 1 * */ /*else*/ { __pyx_v_isdict = 0; /* "pyscipopt/scip.pyx":2532 * else: * isdict = False * nsubproblems = 1 # <<<<<<<<<<<<<< * * # create array of SCIP instances for the subproblems */ __Pyx_INCREF(__pyx_int_1); __pyx_v_nsubproblems = __pyx_int_1; } __pyx_L3:; /* "pyscipopt/scip.pyx":2535 * * # create array of SCIP instances for the subproblems * subprobs = <SCIP**> malloc(nsubproblems * sizeof(SCIP*)) # <<<<<<<<<<<<<< * * # if subproblems is a dictionary, then the dictionary is turned into a c array */ __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(SCIP *))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Multiply(__pyx_v_nsubproblems, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2535, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_subprobs = ((SCIP **)malloc(__pyx_t_6)); /* "pyscipopt/scip.pyx":2538 * * # if subproblems is a dictionary, then the dictionary is turned into a c array * if isdict: # <<<<<<<<<<<<<< * for idx, subprob in enumerate(subproblems.values()): * subprobs[idx] = (<Model>subprob)._scip */ __pyx_t_2 = (__pyx_v_isdict != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2539 * # if subproblems is a dictionary, then the dictionary is turned into a c array * if isdict: * for idx, subprob in enumerate(subproblems.values()): # <<<<<<<<<<<<<< * subprobs[idx] = (<Model>subprob)._scip * else: */ __Pyx_INCREF(__pyx_int_0); __pyx_t_5 = __pyx_int_0; __pyx_t_3 = 0; if (unlikely(__pyx_v_subproblems == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(3, 2539, __pyx_L1_error) } __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_subproblems, 0, __pyx_n_s_values, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_9; __pyx_t_9 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_7, &__pyx_t_3, NULL, &__pyx_t_9, NULL, __pyx_t_8); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(3, 2539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_subprob, __pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_9; __pyx_t_9 = 0; /* "pyscipopt/scip.pyx":2540 * if isdict: * for idx, subprob in enumerate(subproblems.values()): * subprobs[idx] = (<Model>subprob)._scip # <<<<<<<<<<<<<< * else: * subprobs[0] = (<Model>subproblems)._scip */ __pyx_t_11 = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_subprob)->_scip; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2540, __pyx_L1_error) (__pyx_v_subprobs[__pyx_t_12]) = __pyx_t_11; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":2538 * * # if subproblems is a dictionary, then the dictionary is turned into a c array * if isdict: # <<<<<<<<<<<<<< * for idx, subprob in enumerate(subproblems.values()): * subprobs[idx] = (<Model>subprob)._scip */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2542 * subprobs[idx] = (<Model>subprob)._scip * else: * subprobs[0] = (<Model>subproblems)._scip # <<<<<<<<<<<<<< * * # creating the default Benders' decomposition */ /*else*/ { __pyx_t_11 = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_subproblems)->_scip; (__pyx_v_subprobs[0]) = __pyx_t_11; } __pyx_L4:; /* "pyscipopt/scip.pyx":2545 * * # creating the default Benders' decomposition * PY_SCIP_CALL(SCIPcreateBendersDefault(self._scip, subprobs, nsubproblems)) # <<<<<<<<<<<<<< * benders = SCIPfindBenders(self._scip, "default") * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_nsubproblems); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2545, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateBendersDefault(__pyx_v_self->_scip, __pyx_v_subprobs, __pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_13, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":2546 * # creating the default Benders' decomposition * PY_SCIP_CALL(SCIPcreateBendersDefault(self._scip, subprobs, nsubproblems)) * benders = SCIPfindBenders(self._scip, "default") # <<<<<<<<<<<<<< * * # activating the Benders' decomposition constraint handlers */ __pyx_v_benders = SCIPfindBenders(__pyx_v_self->_scip, ((char const *)"default")); /* "pyscipopt/scip.pyx":2549 * * # activating the Benders' decomposition constraint handlers * self.setBoolParam("constraints/benderslp/active", True) # <<<<<<<<<<<<<< * self.setBoolParam("constraints/benders/active", True) * #self.setIntParam("limits/maxorigsol", 0) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBoolParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2550 * # activating the Benders' decomposition constraint handlers * self.setBoolParam("constraints/benderslp/active", True) * self.setBoolParam("constraints/benders/active", True) # <<<<<<<<<<<<<< * #self.setIntParam("limits/maxorigsol", 0) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBoolParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":2517 * * # Benders' decomposition methods * def initBendersDefault(self, subproblems): # <<<<<<<<<<<<<< * """initialises the default Benders' decomposition with a dictionary of subproblems * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pyscipopt.scip.Model.initBendersDefault", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nsubproblems); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_subprob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2553 * #self.setIntParam("limits/maxorigsol", 0) * * def computeBestSolSubproblems(self): # <<<<<<<<<<<<<< * """Solves the subproblems with the best solution to the master problem. * Afterwards, the best solution from each subproblem can be queried to get */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_285computeBestSolSubproblems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_284computeBestSolSubproblems[] = "Solves the subproblems with the best solution to the master problem.\n Afterwards, the best solution from each subproblem can be queried to get\n the solution to the original problem.\n\n If the user wants to resolve the subproblems, they must free them by\n calling freeBendersSubproblems()\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_285computeBestSolSubproblems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("computeBestSolSubproblems (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_284computeBestSolSubproblems(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_284computeBestSolSubproblems(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_BENDERS **__pyx_v__benders; SCIP_Bool __pyx_v__infeasible; int __pyx_v_nbenders; int __pyx_v_nsubproblems; int __pyx_v_solvecip; int __pyx_v_i; int __pyx_v_j; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeBestSolSubproblems", 0); /* "pyscipopt/scip.pyx":2566 * cdef int nsubproblems * * solvecip = True # <<<<<<<<<<<<<< * * nbenders = SCIPgetNActiveBenders(self._scip) */ __pyx_v_solvecip = 1; /* "pyscipopt/scip.pyx":2568 * solvecip = True * * nbenders = SCIPgetNActiveBenders(self._scip) # <<<<<<<<<<<<<< * _benders = SCIPgetBenders(self._scip) * */ __pyx_v_nbenders = SCIPgetNActiveBenders(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":2569 * * nbenders = SCIPgetNActiveBenders(self._scip) * _benders = SCIPgetBenders(self._scip) # <<<<<<<<<<<<<< * * # solving all subproblems from all Benders' decompositions */ __pyx_v__benders = SCIPgetBenders(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":2572 * * # solving all subproblems from all Benders' decompositions * for i in range(nbenders): # <<<<<<<<<<<<<< * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) * for j in range(nsubproblems): */ __pyx_t_1 = __pyx_v_nbenders; __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pyscipopt/scip.pyx":2573 * # solving all subproblems from all Benders' decompositions * for i in range(nbenders): * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) # <<<<<<<<<<<<<< * for j in range(nsubproblems): * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, */ __pyx_v_nsubproblems = SCIPbendersGetNSubproblems((__pyx_v__benders[__pyx_v_i])); /* "pyscipopt/scip.pyx":2574 * for i in range(nbenders): * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) * for j in range(nsubproblems): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, * _benders[i], self._bestSol.sol, j)) */ __pyx_t_4 = __pyx_v_nsubproblems; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pyscipopt/scip.pyx":2575 * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) * for j in range(nsubproblems): * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, # <<<<<<<<<<<<<< * _benders[i], self._bestSol.sol, j)) * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "pyscipopt/scip.pyx":2576 * for j in range(nsubproblems): * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, * _benders[i], self._bestSol.sol, j)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, * _benders[i], self._bestSol.sol, j, &_infeasible, */ __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetupBendersSubproblem(__pyx_v_self->_scip, (__pyx_v__benders[__pyx_v_i]), __pyx_v_self->_bestSol->sol, __pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pyscipopt/scip.pyx":2577 * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, * _benders[i], self._bestSol.sol, j)) * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, # <<<<<<<<<<<<<< * _benders[i], self._bestSol.sol, j, &_infeasible, * SCIP_BENDERSENFOTYPE_CHECK, solvecip, NULL)) */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "pyscipopt/scip.pyx":2579 * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, * _benders[i], self._bestSol.sol, j, &_infeasible, * SCIP_BENDERSENFOTYPE_CHECK, solvecip, NULL)) # <<<<<<<<<<<<<< * * def freeBendersSubproblems(self): */ __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsolveBendersSubproblem(__pyx_v_self->_scip, (__pyx_v__benders[__pyx_v_i]), __pyx_v_self->_bestSol->sol, __pyx_v_j, (&__pyx_v__infeasible), SCIP_BENDERSENFOTYPE_CHECK, __pyx_v_solvecip, NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* "pyscipopt/scip.pyx":2553 * #self.setIntParam("limits/maxorigsol", 0) * * def computeBestSolSubproblems(self): # <<<<<<<<<<<<<< * """Solves the subproblems with the best solution to the master problem. * Afterwards, the best solution from each subproblem can be queried to get */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.Model.computeBestSolSubproblems", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2581 * SCIP_BENDERSENFOTYPE_CHECK, solvecip, NULL)) * * def freeBendersSubproblems(self): # <<<<<<<<<<<<<< * """Calls the free subproblem function for the Benders' decomposition. * This will free all subproblems for all decompositions. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_287freeBendersSubproblems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_286freeBendersSubproblems[] = "Calls the free subproblem function for the Benders' decomposition.\n This will free all subproblems for all decompositions.\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_287freeBendersSubproblems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freeBendersSubproblems (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_286freeBendersSubproblems(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_286freeBendersSubproblems(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_BENDERS **__pyx_v__benders; int __pyx_v_nbenders; int __pyx_v_nsubproblems; int __pyx_v_i; int __pyx_v_j; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freeBendersSubproblems", 0); /* "pyscipopt/scip.pyx":2589 * cdef int nsubproblems * * nbenders = SCIPgetNActiveBenders(self._scip) # <<<<<<<<<<<<<< * _benders = SCIPgetBenders(self._scip) * */ __pyx_v_nbenders = SCIPgetNActiveBenders(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":2590 * * nbenders = SCIPgetNActiveBenders(self._scip) * _benders = SCIPgetBenders(self._scip) # <<<<<<<<<<<<<< * * # solving all subproblems from all Benders' decompositions */ __pyx_v__benders = SCIPgetBenders(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":2593 * * # solving all subproblems from all Benders' decompositions * for i in range(nbenders): # <<<<<<<<<<<<<< * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) * for j in range(nsubproblems): */ __pyx_t_1 = __pyx_v_nbenders; __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pyscipopt/scip.pyx":2594 * # solving all subproblems from all Benders' decompositions * for i in range(nbenders): * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) # <<<<<<<<<<<<<< * for j in range(nsubproblems): * PY_SCIP_CALL(SCIPfreeBendersSubproblem(self._scip, _benders[i], */ __pyx_v_nsubproblems = SCIPbendersGetNSubproblems((__pyx_v__benders[__pyx_v_i])); /* "pyscipopt/scip.pyx":2595 * for i in range(nbenders): * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) * for j in range(nsubproblems): # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPfreeBendersSubproblem(self._scip, _benders[i], * j)) */ __pyx_t_4 = __pyx_v_nsubproblems; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pyscipopt/scip.pyx":2596 * nsubproblems = SCIPbendersGetNSubproblems(_benders[i]) * for j in range(nsubproblems): * PY_SCIP_CALL(SCIPfreeBendersSubproblem(self._scip, _benders[i], # <<<<<<<<<<<<<< * j)) * */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "pyscipopt/scip.pyx":2597 * for j in range(nsubproblems): * PY_SCIP_CALL(SCIPfreeBendersSubproblem(self._scip, _benders[i], * j)) # <<<<<<<<<<<<<< * * def updateBendersLowerbounds(self, lowerbounds, Benders benders=None): */ __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfreeBendersSubproblem(__pyx_v_self->_scip, (__pyx_v__benders[__pyx_v_i]), __pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* "pyscipopt/scip.pyx":2581 * SCIP_BENDERSENFOTYPE_CHECK, solvecip, NULL)) * * def freeBendersSubproblems(self): # <<<<<<<<<<<<<< * """Calls the free subproblem function for the Benders' decomposition. * This will free all subproblems for all decompositions. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.Model.freeBendersSubproblems", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2599 * j)) * * def updateBendersLowerbounds(self, lowerbounds, Benders benders=None): # <<<<<<<<<<<<<< * """"updates the subproblem lower bounds for benders using * the lowerbounds dict. If benders is None, then the default */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_289updateBendersLowerbounds(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_288updateBendersLowerbounds[] = "\"updates the subproblem lower bounds for benders using\n the lowerbounds dict. If benders is None, then the default\n Benders' decomposition is updated\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_289updateBendersLowerbounds(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lowerbounds = 0; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("updateBendersLowerbounds (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lowerbounds,&__pyx_n_s_benders,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lowerbounds)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benders); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateBendersLowerbounds") < 0)) __PYX_ERR(3, 2599, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_lowerbounds = values[0]; __pyx_v_benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("updateBendersLowerbounds", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2599, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.updateBendersLowerbounds", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benders), __pyx_ptype_9pyscipopt_4scip_Benders, 1, "benders", 0))) __PYX_ERR(3, 2599, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_288updateBendersLowerbounds(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_lowerbounds, __pyx_v_benders); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_288updateBendersLowerbounds(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_lowerbounds, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders) { SCIP_BENDERS *__pyx_v__benders; PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; SCIP_Real __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("updateBendersLowerbounds", 0); /* "pyscipopt/scip.pyx":2606 * cdef SCIP_BENDERS* _benders * * assert type(lowerbounds) is dict # <<<<<<<<<<<<<< * * if benders is None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_lowerbounds)) == ((PyObject *)(&PyDict_Type))); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 2606, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":2608 * assert type(lowerbounds) is dict * * if benders is None: # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, "default") * else: */ __pyx_t_1 = (((PyObject *)__pyx_v_benders) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2609 * * if benders is None: * _benders = SCIPfindBenders(self._scip, "default") # <<<<<<<<<<<<<< * else: * n = str_conversion(benders.name) */ __pyx_v__benders = SCIPfindBenders(__pyx_v_self->_scip, ((char const *)"default")); /* "pyscipopt/scip.pyx":2608 * assert type(lowerbounds) is dict * * if benders is None: # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, "default") * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":2611 * _benders = SCIPfindBenders(self._scip, "default") * else: * n = str_conversion(benders.name) # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, n) * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_benders->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_benders->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2612 * else: * n = str_conversion(benders.name) * _benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * * for d in lowerbounds.keys(): */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 2612, __pyx_L1_error) __pyx_v__benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_6); } __pyx_L3:; /* "pyscipopt/scip.pyx":2614 * _benders = SCIPfindBenders(self._scip, n) * * for d in lowerbounds.keys(): # <<<<<<<<<<<<<< * SCIPbendersUpdateSubproblemLowerbound(_benders, d, lowerbounds[d]) * */ __pyx_t_7 = 0; if (unlikely(__pyx_v_lowerbounds == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(3, 2614, __pyx_L1_error) } __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_lowerbounds, 0, __pyx_n_s_keys, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, NULL, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(3, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2615 * * for d in lowerbounds.keys(): * SCIPbendersUpdateSubproblemLowerbound(_benders, d, lowerbounds[d]) # <<<<<<<<<<<<<< * * def activateBenders(self, str name, int nsubproblems): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_d); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2615, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_lowerbounds, __pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2615, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; SCIPbendersUpdateSubproblemLowerbound(__pyx_v__benders, __pyx_t_10, __pyx_t_11); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2599 * j)) * * def updateBendersLowerbounds(self, lowerbounds, Benders benders=None): # <<<<<<<<<<<<<< * """"updates the subproblem lower bounds for benders using * the lowerbounds dict. If benders is None, then the default */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.updateBendersLowerbounds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2617 * SCIPbendersUpdateSubproblemLowerbound(_benders, d, lowerbounds[d]) * * def activateBenders(self, str name, int nsubproblems): # <<<<<<<<<<<<<< * """Activates the Benders' decomposition plugin with the input name * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_291activateBenders(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_290activateBenders[] = "Activates the Benders' decomposition plugin with the input name\n\n Keyword arguments:\n name -- the name of the Benders' decomposition plugin\n nsubproblems -- the number of subproblems in the Benders' decomposition\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_291activateBenders(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; int __pyx_v_nsubproblems; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("activateBenders (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_nsubproblems,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nsubproblems)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("activateBenders", 1, 2, 2, 1); __PYX_ERR(3, 2617, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "activateBenders") < 0)) __PYX_ERR(3, 2617, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = ((PyObject*)values[0]); __pyx_v_nsubproblems = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nsubproblems == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2617, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("activateBenders", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2617, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.activateBenders", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(3, 2617, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_290activateBenders(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_nsubproblems); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_290activateBenders(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, int __pyx_v_nsubproblems) { PyObject *__pyx_v_n = NULL; SCIP_BENDERS *__pyx_v_benders; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("activateBenders", 0); /* "pyscipopt/scip.pyx":2624 * nsubproblems -- the number of subproblems in the Benders' decomposition * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * cdef SCIP_BENDERS* benders * benders = SCIPfindBenders(self._scip, n) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2626 * n = str_conversion(name) * cdef SCIP_BENDERS* benders * benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPactivateBenders(self._scip, benders, nsubproblems)) * */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2626, __pyx_L1_error) __pyx_v_benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_4); /* "pyscipopt/scip.pyx":2627 * cdef SCIP_BENDERS* benders * benders = SCIPfindBenders(self._scip, n) * PY_SCIP_CALL(SCIPactivateBenders(self._scip, benders, nsubproblems)) # <<<<<<<<<<<<<< * * def addBendersSubproblem(self, str name, subproblem): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPactivateBenders(__pyx_v_self->_scip, __pyx_v_benders, __pyx_v_nsubproblems)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2617 * SCIPbendersUpdateSubproblemLowerbound(_benders, d, lowerbounds[d]) * * def activateBenders(self, str name, int nsubproblems): # <<<<<<<<<<<<<< * """Activates the Benders' decomposition plugin with the input name * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.activateBenders", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2629 * PY_SCIP_CALL(SCIPactivateBenders(self._scip, benders, nsubproblems)) * * def addBendersSubproblem(self, str name, subproblem): # <<<<<<<<<<<<<< * """adds a subproblem to the Benders' decomposition given by the input * name. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_293addBendersSubproblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_292addBendersSubproblem[] = "adds a subproblem to the Benders' decomposition given by the input\n name.\n\n Keyword arguments:\n name -- the Benders' decomposition that the subproblem is added to\n subproblem -- the subproblem to add to the decomposition\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_293addBendersSubproblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_subproblem = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addBendersSubproblem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_subproblem,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subproblem)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("addBendersSubproblem", 1, 2, 2, 1); __PYX_ERR(3, 2629, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addBendersSubproblem") < 0)) __PYX_ERR(3, 2629, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = ((PyObject*)values[0]); __pyx_v_subproblem = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addBendersSubproblem", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2629, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addBendersSubproblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(3, 2629, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_292addBendersSubproblem(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_subproblem); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_292addBendersSubproblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_subproblem) { SCIP_BENDERS *__pyx_v_benders; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addBendersSubproblem", 0); /* "pyscipopt/scip.pyx":2638 * """ * cdef SCIP_BENDERS* benders * n = str_conversion(name) # <<<<<<<<<<<<<< * benders = SCIPfindBenders(self._scip, n) * PY_SCIP_CALL(SCIPaddBendersSubproblem(self._scip, benders, (<Model>subproblem)._scip)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2639 * cdef SCIP_BENDERS* benders * n = str_conversion(name) * benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddBendersSubproblem(self._scip, benders, (<Model>subproblem)._scip)) * */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2639, __pyx_L1_error) __pyx_v_benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_4); /* "pyscipopt/scip.pyx":2640 * n = str_conversion(name) * benders = SCIPfindBenders(self._scip, n) * PY_SCIP_CALL(SCIPaddBendersSubproblem(self._scip, benders, (<Model>subproblem)._scip)) # <<<<<<<<<<<<<< * * def setupBendersSubproblem(self, probnumber, Benders benders = None, Solution solution = None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddBendersSubproblem(__pyx_v_self->_scip, __pyx_v_benders, ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_subproblem)->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2629 * PY_SCIP_CALL(SCIPactivateBenders(self._scip, benders, nsubproblems)) * * def addBendersSubproblem(self, str name, subproblem): # <<<<<<<<<<<<<< * """adds a subproblem to the Benders' decomposition given by the input * name. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addBendersSubproblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2642 * PY_SCIP_CALL(SCIPaddBendersSubproblem(self._scip, benders, (<Model>subproblem)._scip)) * * def setupBendersSubproblem(self, probnumber, Benders benders = None, Solution solution = None): # <<<<<<<<<<<<<< * """ sets up the Benders' subproblem given the master problem solution * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_295setupBendersSubproblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_294setupBendersSubproblem[] = " sets up the Benders' subproblem given the master problem solution\n\n Keyword arguments:\n probnumber -- the index of the problem that is to be set up\n benders -- the Benders' decomposition to which the subproblem belongs to\n solution -- the master problem solution that is used for the set up, if None, then the LP solution is used\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_295setupBendersSubproblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_probnumber = 0; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders = 0; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setupBendersSubproblem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_probnumber,&__pyx_n_s_benders,&__pyx_n_s_solution,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); values[2] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benders); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setupBendersSubproblem") < 0)) __PYX_ERR(3, 2642, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_probnumber = values[0]; __pyx_v_benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)values[1]); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setupBendersSubproblem", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2642, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setupBendersSubproblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benders), __pyx_ptype_9pyscipopt_4scip_Benders, 1, "benders", 0))) __PYX_ERR(3, 2642, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 2642, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_294setupBendersSubproblem(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_probnumber, __pyx_v_benders, __pyx_v_solution); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_294setupBendersSubproblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_probnumber, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution) { SCIP_BENDERS *__pyx_v_scip_benders; SCIP_SOL *__pyx_v_scip_sol; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; SCIP_SOL *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; char const *__pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setupBendersSubproblem", 0); /* "pyscipopt/scip.pyx":2653 * cdef SCIP_SOL* scip_sol * * if isinstance(solution, Solution): # <<<<<<<<<<<<<< * scip_sol = solution.sol * else: */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2654 * * if isinstance(solution, Solution): * scip_sol = solution.sol # <<<<<<<<<<<<<< * else: * scip_sol = NULL */ __pyx_t_3 = __pyx_v_solution->sol; __pyx_v_scip_sol = __pyx_t_3; /* "pyscipopt/scip.pyx":2653 * cdef SCIP_SOL* scip_sol * * if isinstance(solution, Solution): # <<<<<<<<<<<<<< * scip_sol = solution.sol * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":2656 * scip_sol = solution.sol * else: * scip_sol = NULL # <<<<<<<<<<<<<< * * if benders is None: */ /*else*/ { __pyx_v_scip_sol = NULL; } __pyx_L3:; /* "pyscipopt/scip.pyx":2658 * scip_sol = NULL * * if benders is None: # <<<<<<<<<<<<<< * scip_benders = SCIPfindBenders(self._scip, "default") * else: */ __pyx_t_2 = (((PyObject *)__pyx_v_benders) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":2659 * * if benders is None: * scip_benders = SCIPfindBenders(self._scip, "default") # <<<<<<<<<<<<<< * else: * n = str_conversion(benders.name) */ __pyx_v_scip_benders = SCIPfindBenders(__pyx_v_self->_scip, ((char const *)"default")); /* "pyscipopt/scip.pyx":2658 * scip_sol = NULL * * if benders is None: # <<<<<<<<<<<<<< * scip_benders = SCIPfindBenders(self._scip, "default") * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2661 * scip_benders = SCIPfindBenders(self._scip, "default") * else: * n = str_conversion(benders.name) # <<<<<<<<<<<<<< * scip_benders = SCIPfindBenders(self._scip, n) * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_benders->name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_benders->name); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2662 * else: * n = str_conversion(benders.name) * scip_benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, scip_benders, scip_sol, probnumber)) */ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(3, 2662, __pyx_L1_error) __pyx_v_scip_benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_7); } __pyx_L4:; /* "pyscipopt/scip.pyx":2664 * scip_benders = SCIPfindBenders(self._scip, n) * * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, scip_benders, scip_sol, probnumber)) # <<<<<<<<<<<<<< * * def solveBendersSubproblem(self, probnumber, enfotype, solvecip, Benders benders = None, Solution solution = None): */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_probnumber); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2664, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetupBendersSubproblem(__pyx_v_self->_scip, __pyx_v_scip_benders, __pyx_v_scip_sol, __pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2642 * PY_SCIP_CALL(SCIPaddBendersSubproblem(self._scip, benders, (<Model>subproblem)._scip)) * * def setupBendersSubproblem(self, probnumber, Benders benders = None, Solution solution = None): # <<<<<<<<<<<<<< * """ sets up the Benders' subproblem given the master problem solution * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.setupBendersSubproblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2666 * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, scip_benders, scip_sol, probnumber)) * * def solveBendersSubproblem(self, probnumber, enfotype, solvecip, Benders benders = None, Solution solution = None): # <<<<<<<<<<<<<< * """ solves the Benders' decomposition subproblem. The convex relaxation will be solved unless * the parameter solvecip is set to True. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_297solveBendersSubproblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_296solveBendersSubproblem[] = " solves the Benders' decomposition subproblem. The convex relaxation will be solved unless\n the parameter solvecip is set to True.\n\n Keyword arguments:\n probnumber -- the index of the problem that is to be set up\n enfotype -- the enforcement type used for solving the subproblem, see SCIP_BENDERSENFOTYPE\n solvecip -- should the CIP of the subproblem be solved, if False, then only the convex relaxation is solved\n benders -- the Benders' decomposition to which the subproblem belongs to\n solution -- the master problem solution that is used for the set up, if None, then the LP solution is used\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_297solveBendersSubproblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_probnumber = 0; PyObject *__pyx_v_enfotype = 0; PyObject *__pyx_v_solvecip = 0; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders = 0; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solveBendersSubproblem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_probnumber,&__pyx_n_s_enfotype,&__pyx_n_s_solvecip,&__pyx_n_s_benders,&__pyx_n_s_solution,0}; PyObject* values[5] = {0,0,0,0,0}; values[3] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); values[4] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enfotype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("solveBendersSubproblem", 0, 3, 5, 1); __PYX_ERR(3, 2666, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solvecip)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("solveBendersSubproblem", 0, 3, 5, 2); __PYX_ERR(3, 2666, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benders); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solveBendersSubproblem") < 0)) __PYX_ERR(3, 2666, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_probnumber = values[0]; __pyx_v_enfotype = values[1]; __pyx_v_solvecip = values[2]; __pyx_v_benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)values[3]); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("solveBendersSubproblem", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2666, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.solveBendersSubproblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benders), __pyx_ptype_9pyscipopt_4scip_Benders, 1, "benders", 0))) __PYX_ERR(3, 2666, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 2666, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_296solveBendersSubproblem(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_probnumber, __pyx_v_enfotype, __pyx_v_solvecip, __pyx_v_benders, __pyx_v_solution); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_296solveBendersSubproblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_probnumber, PyObject *__pyx_v_enfotype, PyObject *__pyx_v_solvecip, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution) { SCIP_BENDERS *__pyx_v_scip_benders; SCIP_SOL *__pyx_v_scip_sol; SCIP_Real __pyx_v_objective; SCIP_Bool __pyx_v_infeasible; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; SCIP_SOL *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; char const *__pyx_t_7; int __pyx_t_8; SCIP_BENDERSENFOTYPE __pyx_t_9; SCIP_Bool __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solveBendersSubproblem", 0); /* "pyscipopt/scip.pyx":2683 * cdef SCIP_Bool infeasible * * if isinstance(solution, Solution): # <<<<<<<<<<<<<< * scip_sol = solution.sol * else: */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2684 * * if isinstance(solution, Solution): * scip_sol = solution.sol # <<<<<<<<<<<<<< * else: * scip_sol = NULL */ __pyx_t_3 = __pyx_v_solution->sol; __pyx_v_scip_sol = __pyx_t_3; /* "pyscipopt/scip.pyx":2683 * cdef SCIP_Bool infeasible * * if isinstance(solution, Solution): # <<<<<<<<<<<<<< * scip_sol = solution.sol * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":2686 * scip_sol = solution.sol * else: * scip_sol = NULL # <<<<<<<<<<<<<< * * if benders is None: */ /*else*/ { __pyx_v_scip_sol = NULL; } __pyx_L3:; /* "pyscipopt/scip.pyx":2688 * scip_sol = NULL * * if benders is None: # <<<<<<<<<<<<<< * scip_benders = SCIPfindBenders(self._scip, "default") * else: */ __pyx_t_2 = (((PyObject *)__pyx_v_benders) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":2689 * * if benders is None: * scip_benders = SCIPfindBenders(self._scip, "default") # <<<<<<<<<<<<<< * else: * n = str_conversion(benders.name) */ __pyx_v_scip_benders = SCIPfindBenders(__pyx_v_self->_scip, ((char const *)"default")); /* "pyscipopt/scip.pyx":2688 * scip_sol = NULL * * if benders is None: # <<<<<<<<<<<<<< * scip_benders = SCIPfindBenders(self._scip, "default") * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2691 * scip_benders = SCIPfindBenders(self._scip, "default") * else: * n = str_conversion(benders.name) # <<<<<<<<<<<<<< * scip_benders = SCIPfindBenders(self._scip, n) * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_benders->name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_benders->name); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2692 * else: * n = str_conversion(benders.name) * scip_benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, scip_benders, scip_sol, */ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(3, 2692, __pyx_L1_error) __pyx_v_scip_benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_7); } __pyx_L4:; /* "pyscipopt/scip.pyx":2694 * scip_benders = SCIPfindBenders(self._scip, n) * * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, scip_benders, scip_sol, # <<<<<<<<<<<<<< * probnumber, &infeasible, enfotype, solvecip, &objective)) * */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "pyscipopt/scip.pyx":2695 * * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, scip_benders, scip_sol, * probnumber, &infeasible, enfotype, solvecip, &objective)) # <<<<<<<<<<<<<< * * return infeasible, objective */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_probnumber); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2695, __pyx_L1_error) __pyx_t_9 = ((SCIP_BENDERSENFOTYPE)__Pyx_PyInt_As_SCIP_BENDERSENFOTYPE(__pyx_v_enfotype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2695, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_solvecip); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2695, __pyx_L1_error) /* "pyscipopt/scip.pyx":2694 * scip_benders = SCIPfindBenders(self._scip, n) * * PY_SCIP_CALL(SCIPsolveBendersSubproblem(self._scip, scip_benders, scip_sol, # <<<<<<<<<<<<<< * probnumber, &infeasible, enfotype, solvecip, &objective)) * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsolveBendersSubproblem(__pyx_v_self->_scip, __pyx_v_scip_benders, __pyx_v_scip_sol, __pyx_t_8, (&__pyx_v_infeasible), __pyx_t_9, __pyx_t_10, (&__pyx_v_objective))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":2697 * probnumber, &infeasible, enfotype, solvecip, &objective)) * * return infeasible, objective # <<<<<<<<<<<<<< * * def getBendersVar(self, Variable var, Benders benders = None, probnumber = -1): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_infeasible); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_objective); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2666 * PY_SCIP_CALL(SCIPsetupBendersSubproblem(self._scip, scip_benders, scip_sol, probnumber)) * * def solveBendersSubproblem(self, probnumber, enfotype, solvecip, Benders benders = None, Solution solution = None): # <<<<<<<<<<<<<< * """ solves the Benders' decomposition subproblem. The convex relaxation will be solved unless * the parameter solvecip is set to True. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pyscipopt.scip.Model.solveBendersSubproblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2699 * return infeasible, objective * * def getBendersVar(self, Variable var, Benders benders = None, probnumber = -1): # <<<<<<<<<<<<<< * """Returns the variable for the subproblem or master problem * depending on the input probnumber */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_299getBendersVar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_298getBendersVar[] = "Returns the variable for the subproblem or master problem\n depending on the input probnumber\n\n Keyword arguments:\n var -- the source variable for which the target variable is requested\n benders -- the Benders' decomposition to which the subproblem variables belong to\n probnumber -- the problem number for which the target variable belongs, -1 for master problem\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_299getBendersVar(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders = 0; PyObject *__pyx_v_probnumber = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBendersVar (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_benders,&__pyx_n_s_probnumber,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); values[2] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benders); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_probnumber); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getBendersVar") < 0)) __PYX_ERR(3, 2699, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)values[1]); __pyx_v_probnumber = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getBendersVar", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2699, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getBendersVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 2699, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benders), __pyx_ptype_9pyscipopt_4scip_Benders, 1, "benders", 0))) __PYX_ERR(3, 2699, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_298getBendersVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_benders, __pyx_v_probnumber); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_298getBendersVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, PyObject *__pyx_v_probnumber) { SCIP_BENDERS *__pyx_v__benders; SCIP_VAR *__pyx_v__mappedvar; PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_mappedvar = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBendersVar", 0); /* "pyscipopt/scip.pyx":2711 * cdef SCIP_VAR* _mappedvar * * if benders is None: # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, "default") * else: */ __pyx_t_1 = (((PyObject *)__pyx_v_benders) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2712 * * if benders is None: * _benders = SCIPfindBenders(self._scip, "default") # <<<<<<<<<<<<<< * else: * n = str_conversion(benders.name) */ __pyx_v__benders = SCIPfindBenders(__pyx_v_self->_scip, ((char const *)"default")); /* "pyscipopt/scip.pyx":2711 * cdef SCIP_VAR* _mappedvar * * if benders is None: # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, "default") * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":2714 * _benders = SCIPfindBenders(self._scip, "default") * else: * n = str_conversion(benders.name) # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, n) * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_benders->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_benders->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2715 * else: * n = str_conversion(benders.name) * _benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * * if probnumber == -1: */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 2715, __pyx_L1_error) __pyx_v__benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_6); } __pyx_L3:; /* "pyscipopt/scip.pyx":2717 * _benders = SCIPfindBenders(self._scip, n) * * if probnumber == -1: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPgetBendersMasterVar(self._scip, _benders, var.scip_var, &_mappedvar)) * else: */ __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_probnumber, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2717, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2718 * * if probnumber == -1: * PY_SCIP_CALL(SCIPgetBendersMasterVar(self._scip, _benders, var.scip_var, &_mappedvar)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPgetBendersSubproblemVar(self._scip, _benders, var.scip_var, &_mappedvar, probnumber)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetBendersMasterVar(__pyx_v_self->_scip, __pyx_v__benders, __pyx_v_var->scip_var, (&__pyx_v__mappedvar))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2717 * _benders = SCIPfindBenders(self._scip, n) * * if probnumber == -1: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPgetBendersMasterVar(self._scip, _benders, var.scip_var, &_mappedvar)) * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":2720 * PY_SCIP_CALL(SCIPgetBendersMasterVar(self._scip, _benders, var.scip_var, &_mappedvar)) * else: * PY_SCIP_CALL(SCIPgetBendersSubproblemVar(self._scip, _benders, var.scip_var, &_mappedvar, probnumber)) # <<<<<<<<<<<<<< * * if _mappedvar == NULL: */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_probnumber); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2720, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetBendersSubproblemVar(__pyx_v_self->_scip, __pyx_v__benders, __pyx_v_var->scip_var, (&__pyx_v__mappedvar), __pyx_t_8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; /* "pyscipopt/scip.pyx":2722 * PY_SCIP_CALL(SCIPgetBendersSubproblemVar(self._scip, _benders, var.scip_var, &_mappedvar, probnumber)) * * if _mappedvar == NULL: # <<<<<<<<<<<<<< * mappedvar = None * else: */ __pyx_t_2 = ((__pyx_v__mappedvar == NULL) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":2723 * * if _mappedvar == NULL: * mappedvar = None # <<<<<<<<<<<<<< * else: * mappedvar = Variable.create(_mappedvar) */ __Pyx_INCREF(Py_None); __pyx_v_mappedvar = Py_None; /* "pyscipopt/scip.pyx":2722 * PY_SCIP_CALL(SCIPgetBendersSubproblemVar(self._scip, _benders, var.scip_var, &_mappedvar, probnumber)) * * if _mappedvar == NULL: # <<<<<<<<<<<<<< * mappedvar = None * else: */ goto __pyx_L5; } /* "pyscipopt/scip.pyx":2725 * mappedvar = None * else: * mappedvar = Variable.create(_mappedvar) # <<<<<<<<<<<<<< * * return mappedvar */ /*else*/ { __pyx_t_3 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v__mappedvar); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mappedvar = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L5:; /* "pyscipopt/scip.pyx":2727 * mappedvar = Variable.create(_mappedvar) * * return mappedvar # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mappedvar); __pyx_r = __pyx_v_mappedvar; goto __pyx_L0; /* "pyscipopt/scip.pyx":2699 * return infeasible, objective * * def getBendersVar(self, Variable var, Benders benders = None, probnumber = -1): # <<<<<<<<<<<<<< * """Returns the variable for the subproblem or master problem * depending on the input probnumber */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.getBendersVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_mappedvar); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2730 * * * def includeEventhdlr(self, Eventhdlr eventhdlr, name, desc): # <<<<<<<<<<<<<< * """Include an event handler. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_301includeEventhdlr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_300includeEventhdlr[] = "Include an event handler.\n\n Keyword arguments:\n eventhdlr -- event handler\n name -- name of event handler\n desc -- description of event handler\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_301includeEventhdlr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeEventhdlr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eventhdlr,&__pyx_n_s_name,&__pyx_n_s_desc,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeEventhdlr", 1, 3, 3, 1); __PYX_ERR(3, 2730, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeEventhdlr", 1, 3, 3, 2); __PYX_ERR(3, 2730, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeEventhdlr") < 0)) __PYX_ERR(3, 2730, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeEventhdlr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2730, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeEventhdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 2730, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_300includeEventhdlr(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_eventhdlr, __pyx_v_name, __pyx_v_desc); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_300includeEventhdlr(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr, PyObject *__pyx_v_name, PyObject *__pyx_v_desc) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeEventhdlr", 0); /* "pyscipopt/scip.pyx":2738 * desc -- description of event handler * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeEventhdlr(self._scip, n, d, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2739 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeEventhdlr(self._scip, n, d, * PyEventCopy, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2740 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeEventhdlr(self._scip, n, d, # <<<<<<<<<<<<<< * PyEventCopy, * PyEventFree, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2740, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2740, __pyx_L1_error) /* "pyscipopt/scip.pyx":2749 * PyEventDelete, * PyEventExec, * <SCIP_EVENTHDLRDATA*>eventhdlr)) # <<<<<<<<<<<<<< * eventhdlr.model = <Model>weakref.proxy(self) * eventhdlr.name = name */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeEventhdlr(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_f_9pyscipopt_4scip_PyEventCopy, __pyx_f_9pyscipopt_4scip_PyEventFree, __pyx_f_9pyscipopt_4scip_PyEventInit, __pyx_f_9pyscipopt_4scip_PyEventExit, __pyx_f_9pyscipopt_4scip_PyEventInitsol, __pyx_f_9pyscipopt_4scip_PyEventExitsol, __pyx_f_9pyscipopt_4scip_PyEventDelete, __pyx_f_9pyscipopt_4scip_PyEventExec, ((SCIP_EVENTHDLRDATA *)__pyx_v_eventhdlr))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2750 * PyEventExec, * <SCIP_EVENTHDLRDATA*>eventhdlr)) * eventhdlr.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * eventhdlr.name = name * Py_INCREF(eventhdlr) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_eventhdlr->model); __Pyx_DECREF(((PyObject *)__pyx_v_eventhdlr->model)); __pyx_v_eventhdlr->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2751 * <SCIP_EVENTHDLRDATA*>eventhdlr)) * eventhdlr.model = <Model>weakref.proxy(self) * eventhdlr.name = name # <<<<<<<<<<<<<< * Py_INCREF(eventhdlr) * */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 2751, __pyx_L1_error) __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_eventhdlr->name); __Pyx_DECREF(__pyx_v_eventhdlr->name); __pyx_v_eventhdlr->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2752 * eventhdlr.model = <Model>weakref.proxy(self) * eventhdlr.name = name * Py_INCREF(eventhdlr) # <<<<<<<<<<<<<< * * def includePricer(self, Pricer pricer, name, desc, priority=1, delay=True): */ Py_INCREF(((PyObject *)__pyx_v_eventhdlr)); /* "pyscipopt/scip.pyx":2730 * * * def includeEventhdlr(self, Eventhdlr eventhdlr, name, desc): # <<<<<<<<<<<<<< * """Include an event handler. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.includeEventhdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2754 * Py_INCREF(eventhdlr) * * def includePricer(self, Pricer pricer, name, desc, priority=1, delay=True): # <<<<<<<<<<<<<< * """Include a pricer. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_303includePricer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_302includePricer[] = "Include a pricer.\n\n :param Pricer pricer: pricer\n :param name: name of pricer\n :param desc: description of pricer\n :param priority: priority of pricer (Default value = 1)\n :param delay: should the pricer be delayed until no other pricers or already existing problem variables with negative reduced costs are found? (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_303includePricer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_pricer = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_delay = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includePricer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pricer,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_delay,0}; PyObject* values[5] = {0,0,0,0,0}; values[3] = ((PyObject *)__pyx_int_1); values[4] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pricer)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includePricer", 0, 3, 5, 1); __PYX_ERR(3, 2754, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includePricer", 0, 3, 5, 2); __PYX_ERR(3, 2754, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delay); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includePricer") < 0)) __PYX_ERR(3, 2754, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_pricer = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_priority = values[3]; __pyx_v_delay = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includePricer", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2754, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includePricer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pricer), __pyx_ptype_9pyscipopt_4scip_Pricer, 1, "pricer", 0))) __PYX_ERR(3, 2754, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_302includePricer(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_pricer, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_delay); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_302includePricer(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v_pricer, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_delay) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; SCIP_PRICER *__pyx_v_scip_pricer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; SCIP_Bool __pyx_t_7; PyObject *__pyx_t_8 = NULL; char const *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includePricer", 0); /* "pyscipopt/scip.pyx":2764 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePricer(self._scip, n, d, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2765 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludePricer(self._scip, n, d, * priority, delay, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2766 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePricer(self._scip, n, d, # <<<<<<<<<<<<<< * priority, delay, * PyPricerCopy, PyPricerFree, PyPricerInit, PyPricerExit, PyPricerInitsol, PyPricerExitsol, PyPricerRedcost, PyPricerFarkas, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2766, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2766, __pyx_L1_error) /* "pyscipopt/scip.pyx":2767 * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePricer(self._scip, n, d, * priority, delay, # <<<<<<<<<<<<<< * PyPricerCopy, PyPricerFree, PyPricerInit, PyPricerExit, PyPricerInitsol, PyPricerExitsol, PyPricerRedcost, PyPricerFarkas, * <SCIP_PRICERDATA*>pricer)) */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2767, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_delay); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2767, __pyx_L1_error) /* "pyscipopt/scip.pyx":2766 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePricer(self._scip, n, d, # <<<<<<<<<<<<<< * priority, delay, * PyPricerCopy, PyPricerFree, PyPricerInit, PyPricerExit, PyPricerInitsol, PyPricerExitsol, PyPricerRedcost, PyPricerFarkas, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludePricer(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_f_9pyscipopt_4scip_PyPricerCopy, __pyx_f_9pyscipopt_4scip_PyPricerFree, __pyx_f_9pyscipopt_4scip_PyPricerInit, __pyx_f_9pyscipopt_4scip_PyPricerExit, __pyx_f_9pyscipopt_4scip_PyPricerInitsol, __pyx_f_9pyscipopt_4scip_PyPricerExitsol, __pyx_f_9pyscipopt_4scip_PyPricerRedcost, __pyx_f_9pyscipopt_4scip_PyPricerFarkas, ((SCIP_PRICERDATA *)__pyx_v_pricer))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2771 * <SCIP_PRICERDATA*>pricer)) * cdef SCIP_PRICER* scip_pricer * scip_pricer = SCIPfindPricer(self._scip, n) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPactivatePricer(self._scip, scip_pricer)) * pricer.model = <Model>weakref.proxy(self) */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 2771, __pyx_L1_error) __pyx_v_scip_pricer = SCIPfindPricer(__pyx_v_self->_scip, __pyx_t_9); /* "pyscipopt/scip.pyx":2772 * cdef SCIP_PRICER* scip_pricer * scip_pricer = SCIPfindPricer(self._scip, n) * PY_SCIP_CALL(SCIPactivatePricer(self._scip, scip_pricer)) # <<<<<<<<<<<<<< * pricer.model = <Model>weakref.proxy(self) * Py_INCREF(pricer) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPactivatePricer(__pyx_v_self->_scip, __pyx_v_scip_pricer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2773 * scip_pricer = SCIPfindPricer(self._scip, n) * PY_SCIP_CALL(SCIPactivatePricer(self._scip, scip_pricer)) * pricer.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * Py_INCREF(pricer) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_pricer->model); __Pyx_DECREF(((PyObject *)__pyx_v_pricer->model)); __pyx_v_pricer->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2774 * PY_SCIP_CALL(SCIPactivatePricer(self._scip, scip_pricer)) * pricer.model = <Model>weakref.proxy(self) * Py_INCREF(pricer) # <<<<<<<<<<<<<< * * def includeConshdlr(self, Conshdlr conshdlr, name, desc, sepapriority=0, */ Py_INCREF(((PyObject *)__pyx_v_pricer)); /* "pyscipopt/scip.pyx":2754 * Py_INCREF(eventhdlr) * * def includePricer(self, Pricer pricer, name, desc, priority=1, delay=True): # <<<<<<<<<<<<<< * """Include a pricer. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.includePricer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2776 * Py_INCREF(pricer) * * def includeConshdlr(self, Conshdlr conshdlr, name, desc, sepapriority=0, # <<<<<<<<<<<<<< * enfopriority=0, chckpriority=0, sepafreq=-1, propfreq=-1, * eagerfreq=100, maxprerounds=-1, delaysepa=False, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_305includeConshdlr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_304includeConshdlr[] = "Include a constraint handler\n\n :param Conshdlr conshdlr: constraint handler\n :param name: name of constraint handler\n :param desc: description of constraint handler\n :param sepapriority: priority for separation (Default value = 0)\n :param enfopriority: priority for constraint enforcing (Default value = 0)\n :param chckpriority: priority for checking feasibility (Default value = 0)\n :param sepafreq: frequency for separating cuts; 0 = only at root node (Default value = -1)\n :param propfreq: frequency for propagating domains; 0 = only preprocessing propagation (Default value = -1)\n :param eagerfreq: frequency for using all instead of only the useful constraints in separation, propagation and enforcement; -1 = no eager evaluations, 0 = first only (Default value = 100)\n :param maxprerounds: maximal number of presolving rounds the constraint handler participates in (Default value = -1)\n :param delaysepa: should separation method be delayed, if other separators found cuts? (Default value = False)\n :param delayprop: should propagation method be delayed, if other propagators found reductions? (Default value = False)\n :param needscons: should the constraint handler be skipped, if no constraints are available? (Default value = True)\n :param proptiming: positions in the node solving loop where propagation method of constraint handlers should be executed (Default value = SCIP_PROPTIMING.BEFORELP)\n :param presoltiming: timing mask of the constraint handler's presolving method (Default value = SCIP_PRESOLTIMING.MEDIUM)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_305includeConshdlr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_conshdlr = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_sepapriority = 0; PyObject *__pyx_v_enfopriority = 0; PyObject *__pyx_v_chckpriority = 0; PyObject *__pyx_v_sepafreq = 0; PyObject *__pyx_v_propfreq = 0; PyObject *__pyx_v_eagerfreq = 0; PyObject *__pyx_v_maxprerounds = 0; PyObject *__pyx_v_delaysepa = 0; PyObject *__pyx_v_delayprop = 0; PyObject *__pyx_v_needscons = 0; PyObject *__pyx_v_proptiming = 0; PyObject *__pyx_v_presoltiming = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeConshdlr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conshdlr,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_sepapriority,&__pyx_n_s_enfopriority,&__pyx_n_s_chckpriority,&__pyx_n_s_sepafreq,&__pyx_n_s_propfreq,&__pyx_n_s_eagerfreq,&__pyx_n_s_maxprerounds,&__pyx_n_s_delaysepa,&__pyx_n_s_delayprop,&__pyx_n_s_needscons,&__pyx_n_s_proptiming,&__pyx_n_s_presoltiming,0}; PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; values[3] = ((PyObject *)__pyx_int_0); values[4] = ((PyObject *)__pyx_int_0); values[5] = ((PyObject *)__pyx_int_0); values[6] = ((PyObject *)__pyx_int_neg_1); values[7] = ((PyObject *)__pyx_int_neg_1); values[8] = ((PyObject *)__pyx_int_100); values[9] = ((PyObject *)__pyx_int_neg_1); /* "pyscipopt/scip.pyx":2778 * def includeConshdlr(self, Conshdlr conshdlr, name, desc, sepapriority=0, * enfopriority=0, chckpriority=0, sepafreq=-1, propfreq=-1, * eagerfreq=100, maxprerounds=-1, delaysepa=False, # <<<<<<<<<<<<<< * delayprop=False, needscons=True, * proptiming=PY_SCIP_PROPTIMING.BEFORELP, */ values[10] = ((PyObject *)Py_False); /* "pyscipopt/scip.pyx":2779 * enfopriority=0, chckpriority=0, sepafreq=-1, propfreq=-1, * eagerfreq=100, maxprerounds=-1, delaysepa=False, * delayprop=False, needscons=True, # <<<<<<<<<<<<<< * proptiming=PY_SCIP_PROPTIMING.BEFORELP, * presoltiming=PY_SCIP_PRESOLTIMING.MEDIUM): */ values[11] = ((PyObject *)Py_False); values[12] = ((PyObject *)Py_True); values[13] = __pyx_k__90; values[14] = __pyx_k__91; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); CYTHON_FALLTHROUGH; case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); CYTHON_FALLTHROUGH; case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conshdlr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeConshdlr", 0, 3, 15, 1); __PYX_ERR(3, 2776, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeConshdlr", 0, 3, 15, 2); __PYX_ERR(3, 2776, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sepapriority); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enfopriority); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chckpriority); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sepafreq); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propfreq); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eagerfreq); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxprerounds); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delaysepa); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delayprop); if (value) { values[11] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 12: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needscons); if (value) { values[12] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 13: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proptiming); if (value) { values[13] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 14: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presoltiming); if (value) { values[14] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeConshdlr") < 0)) __PYX_ERR(3, 2776, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); CYTHON_FALLTHROUGH; case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); CYTHON_FALLTHROUGH; case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); CYTHON_FALLTHROUGH; case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_conshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_sepapriority = values[3]; __pyx_v_enfopriority = values[4]; __pyx_v_chckpriority = values[5]; __pyx_v_sepafreq = values[6]; __pyx_v_propfreq = values[7]; __pyx_v_eagerfreq = values[8]; __pyx_v_maxprerounds = values[9]; __pyx_v_delaysepa = values[10]; __pyx_v_delayprop = values[11]; __pyx_v_needscons = values[12]; __pyx_v_proptiming = values[13]; __pyx_v_presoltiming = values[14]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeConshdlr", 0, 3, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2776, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeConshdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conshdlr), __pyx_ptype_9pyscipopt_4scip_Conshdlr, 1, "conshdlr", 0))) __PYX_ERR(3, 2776, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_304includeConshdlr(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_conshdlr, __pyx_v_name, __pyx_v_desc, __pyx_v_sepapriority, __pyx_v_enfopriority, __pyx_v_chckpriority, __pyx_v_sepafreq, __pyx_v_propfreq, __pyx_v_eagerfreq, __pyx_v_maxprerounds, __pyx_v_delaysepa, __pyx_v_delayprop, __pyx_v_needscons, __pyx_v_proptiming, __pyx_v_presoltiming); /* "pyscipopt/scip.pyx":2776 * Py_INCREF(pricer) * * def includeConshdlr(self, Conshdlr conshdlr, name, desc, sepapriority=0, # <<<<<<<<<<<<<< * enfopriority=0, chckpriority=0, sepafreq=-1, propfreq=-1, * eagerfreq=100, maxprerounds=-1, delaysepa=False, */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_304includeConshdlr(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_conshdlr, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_sepapriority, PyObject *__pyx_v_enfopriority, PyObject *__pyx_v_chckpriority, PyObject *__pyx_v_sepafreq, PyObject *__pyx_v_propfreq, PyObject *__pyx_v_eagerfreq, PyObject *__pyx_v_maxprerounds, PyObject *__pyx_v_delaysepa, PyObject *__pyx_v_delayprop, PyObject *__pyx_v_needscons, PyObject *__pyx_v_proptiming, PyObject *__pyx_v_presoltiming) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; SCIP_PROPTIMING __pyx_t_16; SCIP_PRESOLTIMING __pyx_t_17; PyObject *__pyx_t_18 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeConshdlr", 0); /* "pyscipopt/scip.pyx":2801 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeConshdlr(self._scip, n, d, sepapriority, enfopriority, chckpriority, sepafreq, propfreq, eagerfreq, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2802 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeConshdlr(self._scip, n, d, sepapriority, enfopriority, chckpriority, sepafreq, propfreq, eagerfreq, * maxprerounds, delaysepa, delayprop, needscons, proptiming, presoltiming, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2803 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeConshdlr(self._scip, n, d, sepapriority, enfopriority, chckpriority, sepafreq, propfreq, eagerfreq, # <<<<<<<<<<<<<< * maxprerounds, delaysepa, delayprop, needscons, proptiming, presoltiming, * PyConshdlrCopy, PyConsFree, PyConsInit, PyConsExit, PyConsInitpre, PyConsExitpre, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_sepapriority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_enfopriority); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_chckpriority); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_sepafreq); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_propfreq); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_eagerfreq); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2803, __pyx_L1_error) /* "pyscipopt/scip.pyx":2804 * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeConshdlr(self._scip, n, d, sepapriority, enfopriority, chckpriority, sepafreq, propfreq, eagerfreq, * maxprerounds, delaysepa, delayprop, needscons, proptiming, presoltiming, # <<<<<<<<<<<<<< * PyConshdlrCopy, PyConsFree, PyConsInit, PyConsExit, PyConsInitpre, PyConsExitpre, * PyConsInitsol, PyConsExitsol, PyConsDelete, PyConsTrans, PyConsInitlp, PyConsSepalp, PyConsSepasol, */ __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_maxprerounds); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2804, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_delaysepa); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2804, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_delayprop); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2804, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_needscons); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2804, __pyx_L1_error) __pyx_t_16 = ((SCIP_PROPTIMING)__Pyx_PyInt_As_SCIP_PROPTIMING(__pyx_v_proptiming)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2804, __pyx_L1_error) __pyx_t_17 = ((SCIP_PRESOLTIMING)__Pyx_PyInt_As_SCIP_PRESOLTIMING(__pyx_v_presoltiming)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2804, __pyx_L1_error) /* "pyscipopt/scip.pyx":2803 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeConshdlr(self._scip, n, d, sepapriority, enfopriority, chckpriority, sepafreq, propfreq, eagerfreq, # <<<<<<<<<<<<<< * maxprerounds, delaysepa, delayprop, needscons, proptiming, presoltiming, * PyConshdlrCopy, PyConsFree, PyConsInit, PyConsExit, PyConsInitpre, PyConsExitpre, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeConshdlr(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_f_9pyscipopt_4scip_PyConshdlrCopy, __pyx_f_9pyscipopt_4scip_PyConsFree, __pyx_f_9pyscipopt_4scip_PyConsInit, __pyx_f_9pyscipopt_4scip_PyConsExit, __pyx_f_9pyscipopt_4scip_PyConsInitpre, __pyx_f_9pyscipopt_4scip_PyConsExitpre, __pyx_f_9pyscipopt_4scip_PyConsInitsol, __pyx_f_9pyscipopt_4scip_PyConsExitsol, __pyx_f_9pyscipopt_4scip_PyConsDelete, __pyx_f_9pyscipopt_4scip_PyConsTrans, __pyx_f_9pyscipopt_4scip_PyConsInitlp, __pyx_f_9pyscipopt_4scip_PyConsSepalp, __pyx_f_9pyscipopt_4scip_PyConsSepasol, __pyx_f_9pyscipopt_4scip_PyConsEnfolp, __pyx_f_9pyscipopt_4scip_PyConsEnforelax, __pyx_f_9pyscipopt_4scip_PyConsEnfops, __pyx_f_9pyscipopt_4scip_PyConsCheck, __pyx_f_9pyscipopt_4scip_PyConsProp, __pyx_f_9pyscipopt_4scip_PyConsPresol, __pyx_f_9pyscipopt_4scip_PyConsResprop, __pyx_f_9pyscipopt_4scip_PyConsLock, __pyx_f_9pyscipopt_4scip_PyConsActive, __pyx_f_9pyscipopt_4scip_PyConsDeactive, __pyx_f_9pyscipopt_4scip_PyConsEnable, __pyx_f_9pyscipopt_4scip_PyConsDisable, __pyx_f_9pyscipopt_4scip_PyConsDelvars, __pyx_f_9pyscipopt_4scip_PyConsPrint, __pyx_f_9pyscipopt_4scip_PyConsCopy, __pyx_f_9pyscipopt_4scip_PyConsParse, __pyx_f_9pyscipopt_4scip_PyConsGetvars, __pyx_f_9pyscipopt_4scip_PyConsGetnvars, __pyx_f_9pyscipopt_4scip_PyConsGetdivebdchgs, ((SCIP_CONSHDLRDATA *)__pyx_v_conshdlr))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_18, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2811 * PyConsParse, PyConsGetvars, PyConsGetnvars, PyConsGetdivebdchgs, * <SCIP_CONSHDLRDATA*>conshdlr)) * conshdlr.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * conshdlr.name = name * Py_INCREF(conshdlr) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_conshdlr->model); __Pyx_DECREF(((PyObject *)__pyx_v_conshdlr->model)); __pyx_v_conshdlr->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2812 * <SCIP_CONSHDLRDATA*>conshdlr)) * conshdlr.model = <Model>weakref.proxy(self) * conshdlr.name = name # <<<<<<<<<<<<<< * Py_INCREF(conshdlr) * */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 2812, __pyx_L1_error) __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_conshdlr->name); __Pyx_DECREF(__pyx_v_conshdlr->name); __pyx_v_conshdlr->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2813 * conshdlr.model = <Model>weakref.proxy(self) * conshdlr.name = name * Py_INCREF(conshdlr) # <<<<<<<<<<<<<< * * def createCons(self, Conshdlr conshdlr, name, initial=True, separate=True, enforce=True, check=True, propagate=True, */ Py_INCREF(((PyObject *)__pyx_v_conshdlr)); /* "pyscipopt/scip.pyx":2776 * Py_INCREF(pricer) * * def includeConshdlr(self, Conshdlr conshdlr, name, desc, sepapriority=0, # <<<<<<<<<<<<<< * enfopriority=0, chckpriority=0, sepafreq=-1, propfreq=-1, * eagerfreq=100, maxprerounds=-1, delaysepa=False, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("pyscipopt.scip.Model.includeConshdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2815 * Py_INCREF(conshdlr) * * def createCons(self, Conshdlr conshdlr, name, initial=True, separate=True, enforce=True, check=True, propagate=True, # <<<<<<<<<<<<<< * local=False, modifiable=False, dynamic=False, removable=False, stickingatnode=False): * """Create a constraint of a custom constraint handler */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_307createCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_306createCons[] = "Create a constraint of a custom constraint handler\n\n :param Conshdlr conshdlr: constraint handler\n :param name: name of constraint\n :param initial: (Default value = True)\n :param separate: (Default value = True)\n :param enforce: (Default value = True)\n :param check: (Default value = True)\n :param propagate: (Default value = True)\n :param local: (Default value = False)\n :param modifiable: (Default value = False)\n :param dynamic: (Default value = False)\n :param removable: (Default value = False)\n :param stickingatnode: (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_307createCons(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_conshdlr = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_initial = 0; PyObject *__pyx_v_separate = 0; PyObject *__pyx_v_enforce = 0; PyObject *__pyx_v_check = 0; PyObject *__pyx_v_propagate = 0; PyObject *__pyx_v_local = 0; PyObject *__pyx_v_modifiable = 0; PyObject *__pyx_v_dynamic = 0; PyObject *__pyx_v_removable = 0; PyObject *__pyx_v_stickingatnode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createCons (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conshdlr,&__pyx_n_s_name,&__pyx_n_s_initial,&__pyx_n_s_separate,&__pyx_n_s_enforce,&__pyx_n_s_check,&__pyx_n_s_propagate,&__pyx_n_s_local,&__pyx_n_s_modifiable,&__pyx_n_s_dynamic,&__pyx_n_s_removable,&__pyx_n_s_stickingatnode,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":2816 * * def createCons(self, Conshdlr conshdlr, name, initial=True, separate=True, enforce=True, check=True, propagate=True, * local=False, modifiable=False, dynamic=False, removable=False, stickingatnode=False): # <<<<<<<<<<<<<< * """Create a constraint of a custom constraint handler * */ values[7] = ((PyObject *)Py_False); values[8] = ((PyObject *)Py_False); values[9] = ((PyObject *)Py_False); values[10] = ((PyObject *)Py_False); values[11] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conshdlr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("createCons", 0, 2, 12, 1); __PYX_ERR(3, 2815, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_separate); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforce); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_check); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propagate); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modifiable); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic); if (value) { values[9] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_removable); if (value) { values[10] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stickingatnode); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createCons") < 0)) __PYX_ERR(3, 2815, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); CYTHON_FALLTHROUGH; case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); CYTHON_FALLTHROUGH; case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_conshdlr = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)values[0]); __pyx_v_name = values[1]; __pyx_v_initial = values[2]; __pyx_v_separate = values[3]; __pyx_v_enforce = values[4]; __pyx_v_check = values[5]; __pyx_v_propagate = values[6]; __pyx_v_local = values[7]; __pyx_v_modifiable = values[8]; __pyx_v_dynamic = values[9]; __pyx_v_removable = values[10]; __pyx_v_stickingatnode = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("createCons", 0, 2, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2815, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.createCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conshdlr), __pyx_ptype_9pyscipopt_4scip_Conshdlr, 1, "conshdlr", 0))) __PYX_ERR(3, 2815, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_306createCons(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_conshdlr, __pyx_v_name, __pyx_v_initial, __pyx_v_separate, __pyx_v_enforce, __pyx_v_check, __pyx_v_propagate, __pyx_v_local, __pyx_v_modifiable, __pyx_v_dynamic, __pyx_v_removable, __pyx_v_stickingatnode); /* "pyscipopt/scip.pyx":2815 * Py_INCREF(conshdlr) * * def createCons(self, Conshdlr conshdlr, name, initial=True, separate=True, enforce=True, check=True, propagate=True, # <<<<<<<<<<<<<< * local=False, modifiable=False, dynamic=False, removable=False, stickingatnode=False): * """Create a constraint of a custom constraint handler */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_306createCons(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v_conshdlr, PyObject *__pyx_v_name, PyObject *__pyx_v_initial, PyObject *__pyx_v_separate, PyObject *__pyx_v_enforce, PyObject *__pyx_v_check, PyObject *__pyx_v_propagate, PyObject *__pyx_v_local, PyObject *__pyx_v_modifiable, PyObject *__pyx_v_dynamic, PyObject *__pyx_v_removable, PyObject *__pyx_v_stickingatnode) { PyObject *__pyx_v_n = NULL; SCIP_CONSHDLR *__pyx_v_scip_conshdlr; struct __pyx_obj_9pyscipopt_4scip_Constraint *__pyx_v_constraint = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; SCIP_Bool __pyx_t_6; SCIP_Bool __pyx_t_7; SCIP_Bool __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; SCIP_Bool __pyx_t_11; SCIP_Bool __pyx_t_12; SCIP_Bool __pyx_t_13; SCIP_Bool __pyx_t_14; SCIP_Bool __pyx_t_15; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createCons", 0); /* "pyscipopt/scip.pyx":2834 * """ * * n = str_conversion(name) # <<<<<<<<<<<<<< * cdef SCIP_CONSHDLR* scip_conshdlr * scip_conshdlr = SCIPfindConshdlr(self._scip, str_conversion(conshdlr.name)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2836 * n = str_conversion(name) * cdef SCIP_CONSHDLR* scip_conshdlr * scip_conshdlr = SCIPfindConshdlr(self._scip, str_conversion(conshdlr.name)) # <<<<<<<<<<<<<< * constraint = Constraint() * PY_SCIP_CALL(SCIPcreateCons(self._scip, &(constraint.scip_cons), n, scip_conshdlr, <SCIP_CONSDATA*>constraint, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_conshdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_conshdlr->name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2836, __pyx_L1_error) __pyx_v_scip_conshdlr = SCIPfindConshdlr(__pyx_v_self->_scip, __pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2837 * cdef SCIP_CONSHDLR* scip_conshdlr * scip_conshdlr = SCIPfindConshdlr(self._scip, str_conversion(conshdlr.name)) * constraint = Constraint() # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateCons(self._scip, &(constraint.scip_cons), n, scip_conshdlr, <SCIP_CONSDATA*>constraint, * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Constraint)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraint = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2838 * scip_conshdlr = SCIPfindConshdlr(self._scip, str_conversion(conshdlr.name)) * constraint = Constraint() * PY_SCIP_CALL(SCIPcreateCons(self._scip, &(constraint.scip_cons), n, scip_conshdlr, <SCIP_CONSDATA*>constraint, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * return constraint */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2838, __pyx_L1_error) /* "pyscipopt/scip.pyx":2839 * constraint = Constraint() * PY_SCIP_CALL(SCIPcreateCons(self._scip, &(constraint.scip_cons), n, scip_conshdlr, <SCIP_CONSDATA*>constraint, * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) # <<<<<<<<<<<<<< * return constraint * */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_initial); if (unlikely((__pyx_t_6 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_separate); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_enforce); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_propagate); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely((__pyx_t_11 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_modifiable); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_dynamic); if (unlikely((__pyx_t_13 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_removable); if (unlikely((__pyx_t_14 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_stickingatnode); if (unlikely((__pyx_t_15 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2839, __pyx_L1_error) /* "pyscipopt/scip.pyx":2838 * scip_conshdlr = SCIPfindConshdlr(self._scip, str_conversion(conshdlr.name)) * constraint = Constraint() * PY_SCIP_CALL(SCIPcreateCons(self._scip, &(constraint.scip_cons), n, scip_conshdlr, <SCIP_CONSDATA*>constraint, # <<<<<<<<<<<<<< * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * return constraint */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateCons(__pyx_v_self->_scip, (&__pyx_v_constraint->scip_cons), __pyx_t_5, __pyx_v_scip_conshdlr, ((SCIP_CONSDATA *)__pyx_v_constraint), __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_16)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_16, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2840 * PY_SCIP_CALL(SCIPcreateCons(self._scip, &(constraint.scip_cons), n, scip_conshdlr, <SCIP_CONSDATA*>constraint, * initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode)) * return constraint # <<<<<<<<<<<<<< * * def includePresol(self, Presol presol, name, desc, priority, maxrounds, timing=SCIP_PRESOLTIMING_FAST): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_constraint)); __pyx_r = ((PyObject *)__pyx_v_constraint); goto __pyx_L0; /* "pyscipopt/scip.pyx":2815 * Py_INCREF(conshdlr) * * def createCons(self, Conshdlr conshdlr, name, initial=True, separate=True, enforce=True, check=True, propagate=True, # <<<<<<<<<<<<<< * local=False, modifiable=False, dynamic=False, removable=False, stickingatnode=False): * """Create a constraint of a custom constraint handler */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("pyscipopt.scip.Model.createCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF((PyObject *)__pyx_v_constraint); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2842 * return constraint * * def includePresol(self, Presol presol, name, desc, priority, maxrounds, timing=SCIP_PRESOLTIMING_FAST): # <<<<<<<<<<<<<< * """Include a presolver * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_309includePresol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_308includePresol[] = "Include a presolver\n\n :param Presol presol: presolver\n :param name: name of presolver\n :param desc: description of presolver\n :param priority: priority of the presolver (>= 0: before, < 0: after constraint handlers)\n :param maxrounds: maximal number of presolving rounds the presolver participates in (-1: no limit)\n :param timing: timing mask of presolver (Default value = SCIP_PRESOLTIMING_FAST)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_309includePresol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_presol = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_maxrounds = 0; PyObject *__pyx_v_timing = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includePresol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_presol,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_maxrounds,&__pyx_n_s_timing,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[5] = __pyx_k__92; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presol)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includePresol", 0, 5, 6, 1); __PYX_ERR(3, 2842, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includePresol", 0, 5, 6, 2); __PYX_ERR(3, 2842, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includePresol", 0, 5, 6, 3); __PYX_ERR(3, 2842, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxrounds)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includePresol", 0, 5, 6, 4); __PYX_ERR(3, 2842, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timing); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includePresol") < 0)) __PYX_ERR(3, 2842, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_presol = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_priority = values[3]; __pyx_v_maxrounds = values[4]; __pyx_v_timing = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includePresol", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2842, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includePresol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_presol), __pyx_ptype_9pyscipopt_4scip_Presol, 1, "presol", 0))) __PYX_ERR(3, 2842, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_308includePresol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_presol, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_maxrounds, __pyx_v_timing); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_308includePresol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v_presol, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_maxrounds, PyObject *__pyx_v_timing) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; SCIP_PRESOLTIMING __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includePresol", 0); /* "pyscipopt/scip.pyx":2853 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePresol(self._scip, n, d, priority, maxrounds, timing, PyPresolCopy, PyPresolFree, PyPresolInit, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2854 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludePresol(self._scip, n, d, priority, maxrounds, timing, PyPresolCopy, PyPresolFree, PyPresolInit, * PyPresolExit, PyPresolInitpre, PyPresolExitpre, PyPresolExec, <SCIP_PRESOLDATA*>presol)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2855 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePresol(self._scip, n, d, priority, maxrounds, timing, PyPresolCopy, PyPresolFree, PyPresolInit, # <<<<<<<<<<<<<< * PyPresolExit, PyPresolInitpre, PyPresolExitpre, PyPresolExec, <SCIP_PRESOLDATA*>presol)) * presol.model = <Model>weakref.proxy(self) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2855, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2855, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2855, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_maxrounds); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2855, __pyx_L1_error) __pyx_t_8 = ((SCIP_PRESOLTIMING)__Pyx_PyInt_As_SCIP_PRESOLTIMING(__pyx_v_timing)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2855, __pyx_L1_error) /* "pyscipopt/scip.pyx":2856 * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludePresol(self._scip, n, d, priority, maxrounds, timing, PyPresolCopy, PyPresolFree, PyPresolInit, * PyPresolExit, PyPresolInitpre, PyPresolExitpre, PyPresolExec, <SCIP_PRESOLDATA*>presol)) # <<<<<<<<<<<<<< * presol.model = <Model>weakref.proxy(self) * Py_INCREF(presol) */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludePresol(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_f_9pyscipopt_4scip_PyPresolCopy, __pyx_f_9pyscipopt_4scip_PyPresolFree, __pyx_f_9pyscipopt_4scip_PyPresolInit, __pyx_f_9pyscipopt_4scip_PyPresolExit, __pyx_f_9pyscipopt_4scip_PyPresolInitpre, __pyx_f_9pyscipopt_4scip_PyPresolExitpre, __pyx_f_9pyscipopt_4scip_PyPresolExec, ((SCIP_PRESOLDATA *)__pyx_v_presol))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2857 * PY_SCIP_CALL(SCIPincludePresol(self._scip, n, d, priority, maxrounds, timing, PyPresolCopy, PyPresolFree, PyPresolInit, * PyPresolExit, PyPresolInitpre, PyPresolExitpre, PyPresolExec, <SCIP_PRESOLDATA*>presol)) * presol.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * Py_INCREF(presol) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_presol->model); __Pyx_DECREF(((PyObject *)__pyx_v_presol->model)); __pyx_v_presol->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2858 * PyPresolExit, PyPresolInitpre, PyPresolExitpre, PyPresolExec, <SCIP_PRESOLDATA*>presol)) * presol.model = <Model>weakref.proxy(self) * Py_INCREF(presol) # <<<<<<<<<<<<<< * * def includeSepa(self, Sepa sepa, name, desc, priority=0, freq=10, maxbounddist=1.0, usessubscip=False, delay=False): */ Py_INCREF(((PyObject *)__pyx_v_presol)); /* "pyscipopt/scip.pyx":2842 * return constraint * * def includePresol(self, Presol presol, name, desc, priority, maxrounds, timing=SCIP_PRESOLTIMING_FAST): # <<<<<<<<<<<<<< * """Include a presolver * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.includePresol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2860 * Py_INCREF(presol) * * def includeSepa(self, Sepa sepa, name, desc, priority=0, freq=10, maxbounddist=1.0, usessubscip=False, delay=False): # <<<<<<<<<<<<<< * """Include a separator * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_311includeSepa(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_310includeSepa[] = "Include a separator\n\n :param Sepa sepa: separator\n :param name: name of separator\n :param desc: description of separator\n :param priority: priority of separator (>= 0: before, < 0: after constraint handlers)\n :param freq: frequency for calling separator\n :param maxbounddist: maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying separation\n :param usessubscip: does the separator use a secondary SCIP instance? (Default value = False)\n :param delay: should separator be delayed, if other separators found cuts? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_311includeSepa(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_sepa = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_freq = 0; PyObject *__pyx_v_maxbounddist = 0; PyObject *__pyx_v_usessubscip = 0; PyObject *__pyx_v_delay = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeSepa (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sepa,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_freq,&__pyx_n_s_maxbounddist,&__pyx_n_s_usessubscip,&__pyx_n_s_delay,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; values[3] = ((PyObject *)__pyx_int_0); values[4] = ((PyObject *)__pyx_int_10); values[5] = ((PyObject *)__pyx_float_1_0); values[6] = ((PyObject *)Py_False); values[7] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sepa)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeSepa", 0, 3, 8, 1); __PYX_ERR(3, 2860, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeSepa", 0, 3, 8, 2); __PYX_ERR(3, 2860, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freq); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxbounddist); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_usessubscip); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delay); if (value) { values[7] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeSepa") < 0)) __PYX_ERR(3, 2860, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sepa = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_priority = values[3]; __pyx_v_freq = values[4]; __pyx_v_maxbounddist = values[5]; __pyx_v_usessubscip = values[6]; __pyx_v_delay = values[7]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeSepa", 0, 3, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2860, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeSepa", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sepa), __pyx_ptype_9pyscipopt_4scip_Sepa, 1, "sepa", 0))) __PYX_ERR(3, 2860, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_310includeSepa(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_sepa, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_freq, __pyx_v_maxbounddist, __pyx_v_usessubscip, __pyx_v_delay); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_310includeSepa(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v_sepa, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq, PyObject *__pyx_v_maxbounddist, PyObject *__pyx_v_usessubscip, PyObject *__pyx_v_delay) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; SCIP_Real __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeSepa", 0); /* "pyscipopt/scip.pyx":2873 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeSepa(self._scip, n, d, priority, freq, maxbounddist, usessubscip, delay, PySepaCopy, PySepaFree, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2874 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeSepa(self._scip, n, d, priority, freq, maxbounddist, usessubscip, delay, PySepaCopy, PySepaFree, * PySepaInit, PySepaExit, PySepaInitsol, PySepaExitsol, PySepaExeclp, PySepaExecsol, <SCIP_SEPADATA*>sepa)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2875 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeSepa(self._scip, n, d, priority, freq, maxbounddist, usessubscip, delay, PySepaCopy, PySepaFree, # <<<<<<<<<<<<<< * PySepaInit, PySepaExit, PySepaInitsol, PySepaExitsol, PySepaExeclp, PySepaExecsol, <SCIP_SEPADATA*>sepa)) * sepa.model = <Model>weakref.proxy(self) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_freq); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_maxbounddist); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_usessubscip); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_delay); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2875, __pyx_L1_error) /* "pyscipopt/scip.pyx":2876 * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeSepa(self._scip, n, d, priority, freq, maxbounddist, usessubscip, delay, PySepaCopy, PySepaFree, * PySepaInit, PySepaExit, PySepaInitsol, PySepaExitsol, PySepaExeclp, PySepaExecsol, <SCIP_SEPADATA*>sepa)) # <<<<<<<<<<<<<< * sepa.model = <Model>weakref.proxy(self) * sepa.name = name */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeSepa(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_f_9pyscipopt_4scip_PySepaCopy, __pyx_f_9pyscipopt_4scip_PySepaFree, __pyx_f_9pyscipopt_4scip_PySepaInit, __pyx_f_9pyscipopt_4scip_PySepaExit, __pyx_f_9pyscipopt_4scip_PySepaInitsol, __pyx_f_9pyscipopt_4scip_PySepaExitsol, __pyx_f_9pyscipopt_4scip_PySepaExeclp, __pyx_f_9pyscipopt_4scip_PySepaExecsol, ((SCIP_SEPADATA *)__pyx_v_sepa))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2877 * PY_SCIP_CALL(SCIPincludeSepa(self._scip, n, d, priority, freq, maxbounddist, usessubscip, delay, PySepaCopy, PySepaFree, * PySepaInit, PySepaExit, PySepaInitsol, PySepaExitsol, PySepaExeclp, PySepaExecsol, <SCIP_SEPADATA*>sepa)) * sepa.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * sepa.name = name * Py_INCREF(sepa) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_sepa->model); __Pyx_DECREF(((PyObject *)__pyx_v_sepa->model)); __pyx_v_sepa->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2878 * PySepaInit, PySepaExit, PySepaInitsol, PySepaExitsol, PySepaExeclp, PySepaExecsol, <SCIP_SEPADATA*>sepa)) * sepa.model = <Model>weakref.proxy(self) * sepa.name = name # <<<<<<<<<<<<<< * Py_INCREF(sepa) * */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 2878, __pyx_L1_error) __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_sepa->name); __Pyx_DECREF(__pyx_v_sepa->name); __pyx_v_sepa->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2879 * sepa.model = <Model>weakref.proxy(self) * sepa.name = name * Py_INCREF(sepa) # <<<<<<<<<<<<<< * * def includeProp(self, Prop prop, name, desc, presolpriority, presolmaxrounds, */ Py_INCREF(((PyObject *)__pyx_v_sepa)); /* "pyscipopt/scip.pyx":2860 * Py_INCREF(presol) * * def includeSepa(self, Sepa sepa, name, desc, priority=0, freq=10, maxbounddist=1.0, usessubscip=False, delay=False): # <<<<<<<<<<<<<< * """Include a separator * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pyscipopt.scip.Model.includeSepa", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2881 * Py_INCREF(sepa) * * def includeProp(self, Prop prop, name, desc, presolpriority, presolmaxrounds, # <<<<<<<<<<<<<< * proptiming, presoltiming=SCIP_PRESOLTIMING_FAST, priority=1, freq=1, delay=True): * """Include a propagator. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_313includeProp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_312includeProp[] = "Include a propagator.\n\n :param Prop prop: propagator\n :param name: name of propagator\n :param desc: description of propagator\n :param presolpriority: presolving priority of the propgator (>= 0: before, < 0: after constraint handlers)\n :param presolmaxrounds: maximal number of presolving rounds the propagator participates in (-1: no limit)\n :param proptiming: positions in the node solving loop where propagation method of constraint handlers should be executed\n :param presoltiming: timing mask of the constraint handler's presolving method (Default value = SCIP_PRESOLTIMING_FAST)\n :param priority: priority of the propagator (Default value = 1)\n :param freq: frequency for calling propagator (Default value = 1)\n :param delay: should propagator be delayed if other propagators have found reductions? (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_313includeProp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_prop = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_presolpriority = 0; PyObject *__pyx_v_presolmaxrounds = 0; PyObject *__pyx_v_proptiming = 0; PyObject *__pyx_v_presoltiming = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_freq = 0; PyObject *__pyx_v_delay = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeProp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_presolpriority,&__pyx_n_s_presolmaxrounds,&__pyx_n_s_proptiming,&__pyx_n_s_presoltiming,&__pyx_n_s_priority,&__pyx_n_s_freq,&__pyx_n_s_delay,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[6] = __pyx_k__93; values[7] = ((PyObject *)__pyx_int_1); values[8] = ((PyObject *)__pyx_int_1); /* "pyscipopt/scip.pyx":2882 * * def includeProp(self, Prop prop, name, desc, presolpriority, presolmaxrounds, * proptiming, presoltiming=SCIP_PRESOLTIMING_FAST, priority=1, freq=1, delay=True): # <<<<<<<<<<<<<< * """Include a propagator. * */ values[9] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeProp", 0, 6, 10, 1); __PYX_ERR(3, 2881, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeProp", 0, 6, 10, 2); __PYX_ERR(3, 2881, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presolpriority)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeProp", 0, 6, 10, 3); __PYX_ERR(3, 2881, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presolmaxrounds)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeProp", 0, 6, 10, 4); __PYX_ERR(3, 2881, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proptiming)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeProp", 0, 6, 10, 5); __PYX_ERR(3, 2881, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_presoltiming); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freq); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delay); if (value) { values[9] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeProp") < 0)) __PYX_ERR(3, 2881, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_prop = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_presolpriority = values[3]; __pyx_v_presolmaxrounds = values[4]; __pyx_v_proptiming = values[5]; __pyx_v_presoltiming = values[6]; __pyx_v_priority = values[7]; __pyx_v_freq = values[8]; __pyx_v_delay = values[9]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeProp", 0, 6, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2881, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeProp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prop), __pyx_ptype_9pyscipopt_4scip_Prop, 1, "prop", 0))) __PYX_ERR(3, 2881, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_312includeProp(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_prop, __pyx_v_name, __pyx_v_desc, __pyx_v_presolpriority, __pyx_v_presolmaxrounds, __pyx_v_proptiming, __pyx_v_presoltiming, __pyx_v_priority, __pyx_v_freq, __pyx_v_delay); /* "pyscipopt/scip.pyx":2881 * Py_INCREF(sepa) * * def includeProp(self, Prop prop, name, desc, presolpriority, presolmaxrounds, # <<<<<<<<<<<<<< * proptiming, presoltiming=SCIP_PRESOLTIMING_FAST, priority=1, freq=1, delay=True): * """Include a propagator. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_312includeProp(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v_prop, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_presolpriority, PyObject *__pyx_v_presolmaxrounds, PyObject *__pyx_v_proptiming, PyObject *__pyx_v_presoltiming, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq, PyObject *__pyx_v_delay) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; SCIP_Bool __pyx_t_8; SCIP_PROPTIMING __pyx_t_9; int __pyx_t_10; int __pyx_t_11; SCIP_PRESOLTIMING __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeProp", 0); /* "pyscipopt/scip.pyx":2897 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeProp(self._scip, n, d, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2898 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeProp(self._scip, n, d, * priority, freq, delay, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2899 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeProp(self._scip, n, d, # <<<<<<<<<<<<<< * priority, freq, delay, * proptiming, presolpriority, presolmaxrounds, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2899, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2899, __pyx_L1_error) /* "pyscipopt/scip.pyx":2900 * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeProp(self._scip, n, d, * priority, freq, delay, # <<<<<<<<<<<<<< * proptiming, presolpriority, presolmaxrounds, * presoltiming, PyPropCopy, PyPropFree, PyPropInit, PyPropExit, */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2900, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_freq); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2900, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_delay); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2900, __pyx_L1_error) /* "pyscipopt/scip.pyx":2901 * PY_SCIP_CALL(SCIPincludeProp(self._scip, n, d, * priority, freq, delay, * proptiming, presolpriority, presolmaxrounds, # <<<<<<<<<<<<<< * presoltiming, PyPropCopy, PyPropFree, PyPropInit, PyPropExit, * PyPropInitpre, PyPropExitpre, PyPropInitsol, PyPropExitsol, */ __pyx_t_9 = ((SCIP_PROPTIMING)__Pyx_PyInt_As_SCIP_PROPTIMING(__pyx_v_proptiming)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2901, __pyx_L1_error) __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_presolpriority); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2901, __pyx_L1_error) __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_presolmaxrounds); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2901, __pyx_L1_error) /* "pyscipopt/scip.pyx":2902 * priority, freq, delay, * proptiming, presolpriority, presolmaxrounds, * presoltiming, PyPropCopy, PyPropFree, PyPropInit, PyPropExit, # <<<<<<<<<<<<<< * PyPropInitpre, PyPropExitpre, PyPropInitsol, PyPropExitsol, * PyPropPresol, PyPropExec, PyPropResProp, */ __pyx_t_12 = ((SCIP_PRESOLTIMING)__Pyx_PyInt_As_SCIP_PRESOLTIMING(__pyx_v_presoltiming)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2902, __pyx_L1_error) /* "pyscipopt/scip.pyx":2899 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeProp(self._scip, n, d, # <<<<<<<<<<<<<< * priority, freq, delay, * proptiming, presolpriority, presolmaxrounds, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeProp(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_f_9pyscipopt_4scip_PyPropCopy, __pyx_f_9pyscipopt_4scip_PyPropFree, __pyx_f_9pyscipopt_4scip_PyPropInit, __pyx_f_9pyscipopt_4scip_PyPropExit, __pyx_f_9pyscipopt_4scip_PyPropInitpre, __pyx_f_9pyscipopt_4scip_PyPropExitpre, __pyx_f_9pyscipopt_4scip_PyPropInitsol, __pyx_f_9pyscipopt_4scip_PyPropExitsol, __pyx_f_9pyscipopt_4scip_PyPropPresol, __pyx_f_9pyscipopt_4scip_PyPropExec, __pyx_f_9pyscipopt_4scip_PyPropResProp, ((SCIP_PROPDATA *)__pyx_v_prop))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2906 * PyPropPresol, PyPropExec, PyPropResProp, * <SCIP_PROPDATA*> prop)) * prop.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * Py_INCREF(prop) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_prop->model); __Pyx_DECREF(((PyObject *)__pyx_v_prop->model)); __pyx_v_prop->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2907 * <SCIP_PROPDATA*> prop)) * prop.model = <Model>weakref.proxy(self) * Py_INCREF(prop) # <<<<<<<<<<<<<< * * def includeHeur(self, Heur heur, name, desc, dispchar, priority=10000, freq=1, freqofs=0, */ Py_INCREF(((PyObject *)__pyx_v_prop)); /* "pyscipopt/scip.pyx":2881 * Py_INCREF(sepa) * * def includeProp(self, Prop prop, name, desc, presolpriority, presolmaxrounds, # <<<<<<<<<<<<<< * proptiming, presoltiming=SCIP_PRESOLTIMING_FAST, priority=1, freq=1, delay=True): * """Include a propagator. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pyscipopt.scip.Model.includeProp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2909 * Py_INCREF(prop) * * def includeHeur(self, Heur heur, name, desc, dispchar, priority=10000, freq=1, freqofs=0, # <<<<<<<<<<<<<< * maxdepth=-1, timingmask=SCIP_HEURTIMING_BEFORENODE, usessubscip=False): * """Include a primal heuristic. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_315includeHeur(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_314includeHeur[] = "Include a primal heuristic.\n\n :param Heur heur: heuristic\n :param name: name of heuristic\n :param desc: description of heuristic\n :param dispchar: display character of heuristic\n :param priority: priority of the heuristic (Default value = 10000)\n :param freq: frequency for calling heuristic (Default value = 1)\n :param freqofs: frequency offset for calling heuristic (Default value = 0)\n :param maxdepth: maximal depth level to call heuristic at (Default value = -1)\n :param timingmask: positions in the node solving loop where heuristic should be executed (Default value = SCIP_HEURTIMING_BEFORENODE)\n :param usessubscip: does the heuristic use a secondary SCIP instance? (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_315includeHeur(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_heur = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_dispchar = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_freq = 0; PyObject *__pyx_v_freqofs = 0; PyObject *__pyx_v_maxdepth = 0; PyObject *__pyx_v_timingmask = 0; PyObject *__pyx_v_usessubscip = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeHeur (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_heur,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_dispchar,&__pyx_n_s_priority,&__pyx_n_s_freq,&__pyx_n_s_freqofs,&__pyx_n_s_maxdepth,&__pyx_n_s_timingmask,&__pyx_n_s_usessubscip,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[4] = ((PyObject *)__pyx_int_10000); values[5] = ((PyObject *)__pyx_int_1); values[6] = ((PyObject *)__pyx_int_0); values[7] = ((PyObject *)__pyx_int_neg_1); values[8] = __pyx_k__94; /* "pyscipopt/scip.pyx":2910 * * def includeHeur(self, Heur heur, name, desc, dispchar, priority=10000, freq=1, freqofs=0, * maxdepth=-1, timingmask=SCIP_HEURTIMING_BEFORENODE, usessubscip=False): # <<<<<<<<<<<<<< * """Include a primal heuristic. * */ values[9] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_heur)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeHeur", 0, 4, 10, 1); __PYX_ERR(3, 2909, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeHeur", 0, 4, 10, 2); __PYX_ERR(3, 2909, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dispchar)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeHeur", 0, 4, 10, 3); __PYX_ERR(3, 2909, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freq); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freqofs); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxdepth); if (value) { values[7] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timingmask); if (value) { values[8] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_usessubscip); if (value) { values[9] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeHeur") < 0)) __PYX_ERR(3, 2909, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); CYTHON_FALLTHROUGH; case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_heur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_dispchar = values[3]; __pyx_v_priority = values[4]; __pyx_v_freq = values[5]; __pyx_v_freqofs = values[6]; __pyx_v_maxdepth = values[7]; __pyx_v_timingmask = values[8]; __pyx_v_usessubscip = values[9]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeHeur", 0, 4, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2909, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeHeur", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_heur), __pyx_ptype_9pyscipopt_4scip_Heur, 1, "heur", 0))) __PYX_ERR(3, 2909, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_314includeHeur(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_heur, __pyx_v_name, __pyx_v_desc, __pyx_v_dispchar, __pyx_v_priority, __pyx_v_freq, __pyx_v_freqofs, __pyx_v_maxdepth, __pyx_v_timingmask, __pyx_v_usessubscip); /* "pyscipopt/scip.pyx":2909 * Py_INCREF(prop) * * def includeHeur(self, Heur heur, name, desc, dispchar, priority=10000, freq=1, freqofs=0, # <<<<<<<<<<<<<< * maxdepth=-1, timingmask=SCIP_HEURTIMING_BEFORENODE, usessubscip=False): * """Include a primal heuristic. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_314includeHeur(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_heur, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_dispchar, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq, PyObject *__pyx_v_freqofs, PyObject *__pyx_v_maxdepth, PyObject *__pyx_v_timingmask, PyObject *__pyx_v_usessubscip) { PyObject *__pyx_v_nam = NULL; PyObject *__pyx_v_des = NULL; long __pyx_v_dis; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; char const *__pyx_t_5; char const *__pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; unsigned int __pyx_t_11; SCIP_Bool __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeHeur", 0); /* "pyscipopt/scip.pyx":2925 * * """ * nam = str_conversion(name) # <<<<<<<<<<<<<< * des = str_conversion(desc) * dis = ord(str_conversion(dispchar)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nam = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2926 * """ * nam = str_conversion(name) * des = str_conversion(desc) # <<<<<<<<<<<<<< * dis = ord(str_conversion(dispchar)) * PY_SCIP_CALL(SCIPincludeHeur(self._scip, nam, des, dis, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_des = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2927 * nam = str_conversion(name) * des = str_conversion(desc) * dis = ord(str_conversion(dispchar)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeHeur(self._scip, nam, des, dis, * priority, freq, freqofs, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dispchar) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dispchar); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_Ord(__pyx_t_1); if (unlikely(__pyx_t_4 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(3, 2927, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dis = __pyx_t_4; /* "pyscipopt/scip.pyx":2928 * des = str_conversion(desc) * dis = ord(str_conversion(dispchar)) * PY_SCIP_CALL(SCIPincludeHeur(self._scip, nam, des, dis, # <<<<<<<<<<<<<< * priority, freq, freqofs, * maxdepth, timingmask, usessubscip, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2928, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_des); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 2928, __pyx_L1_error) /* "pyscipopt/scip.pyx":2929 * dis = ord(str_conversion(dispchar)) * PY_SCIP_CALL(SCIPincludeHeur(self._scip, nam, des, dis, * priority, freq, freqofs, # <<<<<<<<<<<<<< * maxdepth, timingmask, usessubscip, * PyHeurCopy, PyHeurFree, PyHeurInit, PyHeurExit, */ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2929, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_freq); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2929, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_freqofs); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2929, __pyx_L1_error) /* "pyscipopt/scip.pyx":2930 * PY_SCIP_CALL(SCIPincludeHeur(self._scip, nam, des, dis, * priority, freq, freqofs, * maxdepth, timingmask, usessubscip, # <<<<<<<<<<<<<< * PyHeurCopy, PyHeurFree, PyHeurInit, PyHeurExit, * PyHeurInitsol, PyHeurExitsol, PyHeurExec, */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_maxdepth); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2930, __pyx_L1_error) __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_v_timingmask); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2930, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_usessubscip); if (unlikely((__pyx_t_12 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2930, __pyx_L1_error) /* "pyscipopt/scip.pyx":2928 * des = str_conversion(desc) * dis = ord(str_conversion(dispchar)) * PY_SCIP_CALL(SCIPincludeHeur(self._scip, nam, des, dis, # <<<<<<<<<<<<<< * priority, freq, freqofs, * maxdepth, timingmask, usessubscip, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeHeur(__pyx_v_self->_scip, __pyx_t_5, __pyx_t_6, __pyx_v_dis, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_f_9pyscipopt_4scip_PyHeurCopy, __pyx_f_9pyscipopt_4scip_PyHeurFree, __pyx_f_9pyscipopt_4scip_PyHeurInit, __pyx_f_9pyscipopt_4scip_PyHeurExit, __pyx_f_9pyscipopt_4scip_PyHeurInitsol, __pyx_f_9pyscipopt_4scip_PyHeurExitsol, __pyx_f_9pyscipopt_4scip_PyHeurExec, ((SCIP_HEURDATA *)__pyx_v_heur))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2934 * PyHeurInitsol, PyHeurExitsol, PyHeurExec, * <SCIP_HEURDATA*> heur)) * heur.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * heur.name = name * Py_INCREF(heur) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_heur->model); __Pyx_DECREF(((PyObject *)__pyx_v_heur->model)); __pyx_v_heur->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2935 * <SCIP_HEURDATA*> heur)) * heur.model = <Model>weakref.proxy(self) * heur.name = name # <<<<<<<<<<<<<< * Py_INCREF(heur) * */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 2935, __pyx_L1_error) __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_heur->name); __Pyx_DECREF(__pyx_v_heur->name); __pyx_v_heur->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2936 * heur.model = <Model>weakref.proxy(self) * heur.name = name * Py_INCREF(heur) # <<<<<<<<<<<<<< * * def includeRelax(self, Relax relax, name, desc, priority=10000, freq=1): */ Py_INCREF(((PyObject *)__pyx_v_heur)); /* "pyscipopt/scip.pyx":2909 * Py_INCREF(prop) * * def includeHeur(self, Heur heur, name, desc, dispchar, priority=10000, freq=1, freqofs=0, # <<<<<<<<<<<<<< * maxdepth=-1, timingmask=SCIP_HEURTIMING_BEFORENODE, usessubscip=False): * """Include a primal heuristic. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pyscipopt.scip.Model.includeHeur", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nam); __Pyx_XDECREF(__pyx_v_des); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2938 * Py_INCREF(heur) * * def includeRelax(self, Relax relax, name, desc, priority=10000, freq=1): # <<<<<<<<<<<<<< * """Include a relaxation handler. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_317includeRelax(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_316includeRelax[] = "Include a relaxation handler.\n\n :param Relax relax: relaxation handler\n :param name: name of relaxation handler\n :param desc: description of relaxation handler\n :param priority: priority of the relaxation handler (negative: after LP, non-negative: before LP, Default value = 10000)\n :param freq: frequency for calling relaxation handler\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_317includeRelax(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_relax = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_freq = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeRelax (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_relax,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_freq,0}; PyObject* values[5] = {0,0,0,0,0}; values[3] = ((PyObject *)__pyx_int_10000); values[4] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_relax)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeRelax", 0, 3, 5, 1); __PYX_ERR(3, 2938, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeRelax", 0, 3, 5, 2); __PYX_ERR(3, 2938, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freq); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeRelax") < 0)) __PYX_ERR(3, 2938, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_relax = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_priority = values[3]; __pyx_v_freq = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeRelax", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2938, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeRelax", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_relax), __pyx_ptype_9pyscipopt_4scip_Relax, 1, "relax", 0))) __PYX_ERR(3, 2938, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_316includeRelax(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_relax, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_freq); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_316includeRelax(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v_relax, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_freq) { PyObject *__pyx_v_nam = NULL; PyObject *__pyx_v_des = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeRelax", 0); /* "pyscipopt/scip.pyx":2948 * * """ * nam = str_conversion(name) # <<<<<<<<<<<<<< * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeRelax(self._scip, nam, des, priority, freq, PyRelaxCopy, PyRelaxFree, PyRelaxInit, PyRelaxExit, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nam = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2949 * """ * nam = str_conversion(name) * des = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeRelax(self._scip, nam, des, priority, freq, PyRelaxCopy, PyRelaxFree, PyRelaxInit, PyRelaxExit, * PyRelaxInitsol, PyRelaxExitsol, PyRelaxExec, <SCIP_RELAXDATA*> relax)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_des = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2950 * nam = str_conversion(name) * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeRelax(self._scip, nam, des, priority, freq, PyRelaxCopy, PyRelaxFree, PyRelaxInit, PyRelaxExit, # <<<<<<<<<<<<<< * PyRelaxInitsol, PyRelaxExitsol, PyRelaxExec, <SCIP_RELAXDATA*> relax)) * relax.model = <Model>weakref.proxy(self) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2950, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_des); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2950, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2950, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_freq); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2950, __pyx_L1_error) /* "pyscipopt/scip.pyx":2951 * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeRelax(self._scip, nam, des, priority, freq, PyRelaxCopy, PyRelaxFree, PyRelaxInit, PyRelaxExit, * PyRelaxInitsol, PyRelaxExitsol, PyRelaxExec, <SCIP_RELAXDATA*> relax)) # <<<<<<<<<<<<<< * relax.model = <Model>weakref.proxy(self) * relax.name = name */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeRelax(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_f_9pyscipopt_4scip_PyRelaxCopy, __pyx_f_9pyscipopt_4scip_PyRelaxFree, __pyx_f_9pyscipopt_4scip_PyRelaxInit, __pyx_f_9pyscipopt_4scip_PyRelaxExit, __pyx_f_9pyscipopt_4scip_PyRelaxInitsol, __pyx_f_9pyscipopt_4scip_PyRelaxExitsol, __pyx_f_9pyscipopt_4scip_PyRelaxExec, ((SCIP_RELAXDATA *)__pyx_v_relax))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2952 * PY_SCIP_CALL(SCIPincludeRelax(self._scip, nam, des, priority, freq, PyRelaxCopy, PyRelaxFree, PyRelaxInit, PyRelaxExit, * PyRelaxInitsol, PyRelaxExitsol, PyRelaxExec, <SCIP_RELAXDATA*> relax)) * relax.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * relax.name = name * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_relax->model); __Pyx_DECREF(((PyObject *)__pyx_v_relax->model)); __pyx_v_relax->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2953 * PyRelaxInitsol, PyRelaxExitsol, PyRelaxExec, <SCIP_RELAXDATA*> relax)) * relax.model = <Model>weakref.proxy(self) * relax.name = name # <<<<<<<<<<<<<< * * Py_INCREF(relax) */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 2953, __pyx_L1_error) __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_relax->name); __Pyx_DECREF(__pyx_v_relax->name); __pyx_v_relax->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2955 * relax.name = name * * Py_INCREF(relax) # <<<<<<<<<<<<<< * * def includeBranchrule(self, Branchrule branchrule, name, desc, priority, maxdepth, maxbounddist): */ Py_INCREF(((PyObject *)__pyx_v_relax)); /* "pyscipopt/scip.pyx":2938 * Py_INCREF(heur) * * def includeRelax(self, Relax relax, name, desc, priority=10000, freq=1): # <<<<<<<<<<<<<< * """Include a relaxation handler. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.includeRelax", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nam); __Pyx_XDECREF(__pyx_v_des); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2957 * Py_INCREF(relax) * * def includeBranchrule(self, Branchrule branchrule, name, desc, priority, maxdepth, maxbounddist): # <<<<<<<<<<<<<< * """Include a branching rule. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_319includeBranchrule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_318includeBranchrule[] = "Include a branching rule.\n\n :param Branchrule branchrule: branching rule\n :param name: name of branching rule\n :param desc: description of branching rule\n :param priority: priority of branching rule\n :param maxdepth: maximal depth level up to which this branching rule should be used (or -1)\n :param maxbounddist: maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching rule (0.0: only on current best node, 1.0: on all nodes)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_319includeBranchrule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_branchrule = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_maxdepth = 0; PyObject *__pyx_v_maxbounddist = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeBranchrule (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_branchrule,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_maxdepth,&__pyx_n_s_maxbounddist,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_branchrule)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBranchrule", 1, 6, 6, 1); __PYX_ERR(3, 2957, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBranchrule", 1, 6, 6, 2); __PYX_ERR(3, 2957, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBranchrule", 1, 6, 6, 3); __PYX_ERR(3, 2957, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxdepth)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBranchrule", 1, 6, 6, 4); __PYX_ERR(3, 2957, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxbounddist)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBranchrule", 1, 6, 6, 5); __PYX_ERR(3, 2957, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeBranchrule") < 0)) __PYX_ERR(3, 2957, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_branchrule = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_priority = values[3]; __pyx_v_maxdepth = values[4]; __pyx_v_maxbounddist = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeBranchrule", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2957, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeBranchrule", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_branchrule), __pyx_ptype_9pyscipopt_4scip_Branchrule, 1, "branchrule", 0))) __PYX_ERR(3, 2957, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_318includeBranchrule(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_branchrule, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_maxdepth, __pyx_v_maxbounddist); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_318includeBranchrule(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v_branchrule, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_maxdepth, PyObject *__pyx_v_maxbounddist) { PyObject *__pyx_v_nam = NULL; PyObject *__pyx_v_des = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; SCIP_Real __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeBranchrule", 0); /* "pyscipopt/scip.pyx":2968 * * """ * nam = str_conversion(name) # <<<<<<<<<<<<<< * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBranchrule(self._scip, nam, des, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nam = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2969 * """ * nam = str_conversion(name) * des = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeBranchrule(self._scip, nam, des, * priority, maxdepth, maxbounddist, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_des = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2970 * nam = str_conversion(name) * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBranchrule(self._scip, nam, des, # <<<<<<<<<<<<<< * priority, maxdepth, maxbounddist, * PyBranchruleCopy, PyBranchruleFree, PyBranchruleInit, PyBranchruleExit, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 2970, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_des); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 2970, __pyx_L1_error) /* "pyscipopt/scip.pyx":2971 * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBranchrule(self._scip, nam, des, * priority, maxdepth, maxbounddist, # <<<<<<<<<<<<<< * PyBranchruleCopy, PyBranchruleFree, PyBranchruleInit, PyBranchruleExit, * PyBranchruleInitsol, PyBranchruleExitsol, PyBranchruleExeclp, PyBranchruleExecext, */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2971, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_maxdepth); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2971, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_maxbounddist); if (unlikely((__pyx_t_8 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2971, __pyx_L1_error) /* "pyscipopt/scip.pyx":2970 * nam = str_conversion(name) * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBranchrule(self._scip, nam, des, # <<<<<<<<<<<<<< * priority, maxdepth, maxbounddist, * PyBranchruleCopy, PyBranchruleFree, PyBranchruleInit, PyBranchruleExit, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeBranchrule(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_f_9pyscipopt_4scip_PyBranchruleCopy, __pyx_f_9pyscipopt_4scip_PyBranchruleFree, __pyx_f_9pyscipopt_4scip_PyBranchruleInit, __pyx_f_9pyscipopt_4scip_PyBranchruleExit, __pyx_f_9pyscipopt_4scip_PyBranchruleInitsol, __pyx_f_9pyscipopt_4scip_PyBranchruleExitsol, __pyx_f_9pyscipopt_4scip_PyBranchruleExeclp, __pyx_f_9pyscipopt_4scip_PyBranchruleExecext, __pyx_f_9pyscipopt_4scip_PyBranchruleExecps, ((SCIP_BRANCHRULEDATA *)__pyx_v_branchrule))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2975 * PyBranchruleInitsol, PyBranchruleExitsol, PyBranchruleExeclp, PyBranchruleExecext, * PyBranchruleExecps, <SCIP_BRANCHRULEDATA*> branchrule)) * branchrule.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * Py_INCREF(branchrule) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_branchrule->model); __Pyx_DECREF(((PyObject *)__pyx_v_branchrule->model)); __pyx_v_branchrule->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":2976 * PyBranchruleExecps, <SCIP_BRANCHRULEDATA*> branchrule)) * branchrule.model = <Model>weakref.proxy(self) * Py_INCREF(branchrule) # <<<<<<<<<<<<<< * * def getChildren(self): */ Py_INCREF(((PyObject *)__pyx_v_branchrule)); /* "pyscipopt/scip.pyx":2957 * Py_INCREF(relax) * * def includeBranchrule(self, Branchrule branchrule, name, desc, priority, maxdepth, maxbounddist): # <<<<<<<<<<<<<< * """Include a branching rule. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.includeBranchrule", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nam); __Pyx_XDECREF(__pyx_v_des); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2978 * Py_INCREF(branchrule) * * def getChildren(self): # <<<<<<<<<<<<<< * cdef SCIP_NODE** children * cdef int nchildren */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_321getChildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_321getChildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getChildren (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_320getChildren(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_320getChildren(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_NODE **__pyx_v_children; int __pyx_v_nchildren; int __pyx_9genexpr20__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getChildren", 0); /* "pyscipopt/scip.pyx":2981 * cdef SCIP_NODE** children * cdef int nchildren * PY_SCIP_CALL(SCIPgetChildren(self._scip, &children, &nchildren)) # <<<<<<<<<<<<<< * return [Node.create(children[i]) for i in range(nchildren)] * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetChildren(__pyx_v_self->_scip, (&__pyx_v_children), (&__pyx_v_nchildren))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2982 * cdef int nchildren * PY_SCIP_CALL(SCIPgetChildren(self._scip, &children, &nchildren)) * return [Node.create(children[i]) for i in range(nchildren)] # <<<<<<<<<<<<<< * * def includeBenders(self, Benders benders, name, desc, priority=1, cutlp=True, cutpseudo=True, cutrelax=True, */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_nchildren; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr20__pyx_v_i = __pyx_t_7; __pyx_t_2 = __pyx_f_9pyscipopt_4scip_4Node_create((__pyx_v_children[__pyx_9genexpr20__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 2982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":2978 * Py_INCREF(branchrule) * * def getChildren(self): # <<<<<<<<<<<<<< * cdef SCIP_NODE** children * cdef int nchildren */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getChildren", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":2984 * return [Node.create(children[i]) for i in range(nchildren)] * * def includeBenders(self, Benders benders, name, desc, priority=1, cutlp=True, cutpseudo=True, cutrelax=True, # <<<<<<<<<<<<<< * shareaux=False): * """Include a Benders' decomposition. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_323includeBenders(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_322includeBenders[] = "Include a Benders' decomposition.\n\n Keyword arguments:\n benders -- the Benders decomposition\n name -- the name\n desc -- the description\n priority -- priority of the Benders' decomposition\n cutlp -- should Benders' cuts be generated from LP solutions\n cutpseudo -- should Benders' cuts be generated from pseudo solutions\n cutrelax -- should Benders' cuts be generated from relaxation solutions\n shareaux -- should the Benders' decomposition share the auxiliary variables of the highest priority Benders' decomposition\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_323includeBenders(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_cutlp = 0; PyObject *__pyx_v_cutpseudo = 0; PyObject *__pyx_v_cutrelax = 0; PyObject *__pyx_v_shareaux = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeBenders (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_benders,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_cutlp,&__pyx_n_s_cutpseudo,&__pyx_n_s_cutrelax,&__pyx_n_s_shareaux,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; values[3] = ((PyObject *)__pyx_int_1); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); /* "pyscipopt/scip.pyx":2985 * * def includeBenders(self, Benders benders, name, desc, priority=1, cutlp=True, cutpseudo=True, cutrelax=True, * shareaux=False): # <<<<<<<<<<<<<< * """Include a Benders' decomposition. * */ values[7] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benders)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBenders", 0, 3, 8, 1); __PYX_ERR(3, 2984, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBenders", 0, 3, 8, 2); __PYX_ERR(3, 2984, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cutlp); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cutpseudo); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cutrelax); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shareaux); if (value) { values[7] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeBenders") < 0)) __PYX_ERR(3, 2984, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_priority = values[3]; __pyx_v_cutlp = values[4]; __pyx_v_cutpseudo = values[5]; __pyx_v_cutrelax = values[6]; __pyx_v_shareaux = values[7]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeBenders", 0, 3, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2984, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeBenders", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benders), __pyx_ptype_9pyscipopt_4scip_Benders, 1, "benders", 0))) __PYX_ERR(3, 2984, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_322includeBenders(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_benders, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_cutlp, __pyx_v_cutpseudo, __pyx_v_cutrelax, __pyx_v_shareaux); /* "pyscipopt/scip.pyx":2984 * return [Node.create(children[i]) for i in range(nchildren)] * * def includeBenders(self, Benders benders, name, desc, priority=1, cutlp=True, cutpseudo=True, cutrelax=True, # <<<<<<<<<<<<<< * shareaux=False): * """Include a Benders' decomposition. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_322includeBenders(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_cutlp, PyObject *__pyx_v_cutpseudo, PyObject *__pyx_v_cutrelax, PyObject *__pyx_v_shareaux) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; CYTHON_UNUSED SCIP_BENDERS *__pyx_v_scip_benders; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; SCIP_Bool __pyx_t_7; SCIP_Bool __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; PyObject *__pyx_t_11 = NULL; char const *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeBenders", 0); /* "pyscipopt/scip.pyx":2998 * shareaux -- should the Benders' decomposition share the auxiliary variables of the highest priority Benders' decomposition * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBenders(self._scip, n, d, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":2999 * """ * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeBenders(self._scip, n, d, * priority, cutlp, cutrelax, cutpseudo, shareaux, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3000 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBenders(self._scip, n, d, # <<<<<<<<<<<<<< * priority, cutlp, cutrelax, cutpseudo, shareaux, * PyBendersCopy, PyBendersFree, PyBendersInit, PyBendersExit, PyBendersInitpre, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3000, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 3000, __pyx_L1_error) /* "pyscipopt/scip.pyx":3001 * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBenders(self._scip, n, d, * priority, cutlp, cutrelax, cutpseudo, shareaux, # <<<<<<<<<<<<<< * PyBendersCopy, PyBendersFree, PyBendersInit, PyBendersExit, PyBendersInitpre, * PyBendersExitpre, PyBendersInitsol, PyBendersExitsol, PyBendersGetvar, */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3001, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_cutlp); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3001, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_cutrelax); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3001, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_cutpseudo); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3001, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_shareaux); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3001, __pyx_L1_error) /* "pyscipopt/scip.pyx":3000 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBenders(self._scip, n, d, # <<<<<<<<<<<<<< * priority, cutlp, cutrelax, cutpseudo, shareaux, * PyBendersCopy, PyBendersFree, PyBendersInit, PyBendersExit, PyBendersInitpre, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeBenders(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_f_9pyscipopt_4scip_PyBendersCopy, __pyx_f_9pyscipopt_4scip_PyBendersFree, __pyx_f_9pyscipopt_4scip_PyBendersInit, __pyx_f_9pyscipopt_4scip_PyBendersExit, __pyx_f_9pyscipopt_4scip_PyBendersInitpre, __pyx_f_9pyscipopt_4scip_PyBendersExitpre, __pyx_f_9pyscipopt_4scip_PyBendersInitsol, __pyx_f_9pyscipopt_4scip_PyBendersExitsol, __pyx_f_9pyscipopt_4scip_PyBendersGetvar, __pyx_f_9pyscipopt_4scip_PyBendersCreatesub, __pyx_f_9pyscipopt_4scip_PyBendersPresubsolve, __pyx_f_9pyscipopt_4scip_PyBendersSolvesubconvex, __pyx_f_9pyscipopt_4scip_PyBendersSolvesub, __pyx_f_9pyscipopt_4scip_PyBendersPostsolve, __pyx_f_9pyscipopt_4scip_PyBendersFreesub, ((SCIP_BENDERSDATA *)__pyx_v_benders))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3008 * <SCIP_BENDERSDATA*>benders)) * cdef SCIP_BENDERS* scip_benders * scip_benders = SCIPfindBenders(self._scip, n) # <<<<<<<<<<<<<< * benders.model = <Model>weakref.proxy(self) * benders.name = name */ __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(3, 3008, __pyx_L1_error) __pyx_v_scip_benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_12); /* "pyscipopt/scip.pyx":3009 * cdef SCIP_BENDERS* scip_benders * scip_benders = SCIPfindBenders(self._scip, n) * benders.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * benders.name = name * Py_INCREF(benders) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_benders->model); __Pyx_DECREF(((PyObject *)__pyx_v_benders->model)); __pyx_v_benders->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3010 * scip_benders = SCIPfindBenders(self._scip, n) * benders.model = <Model>weakref.proxy(self) * benders.name = name # <<<<<<<<<<<<<< * Py_INCREF(benders) * */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 3010, __pyx_L1_error) __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_benders->name); __Pyx_DECREF(__pyx_v_benders->name); __pyx_v_benders->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3011 * benders.model = <Model>weakref.proxy(self) * benders.name = name * Py_INCREF(benders) # <<<<<<<<<<<<<< * * def includeBenderscut(self, Benders benders, Benderscut benderscut, name, desc, priority=1, islpcut=True): */ Py_INCREF(((PyObject *)__pyx_v_benders)); /* "pyscipopt/scip.pyx":2984 * return [Node.create(children[i]) for i in range(nchildren)] * * def includeBenders(self, Benders benders, name, desc, priority=1, cutlp=True, cutpseudo=True, cutrelax=True, # <<<<<<<<<<<<<< * shareaux=False): * """Include a Benders' decomposition. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pyscipopt.scip.Model.includeBenders", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3013 * Py_INCREF(benders) * * def includeBenderscut(self, Benders benders, Benderscut benderscut, name, desc, priority=1, islpcut=True): # <<<<<<<<<<<<<< * """ Include a Benders' decomposition cutting method * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_325includeBenderscut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_324includeBenderscut[] = " Include a Benders' decomposition cutting method\n\n Keyword arguments:\n benders -- the Benders' decomposition that this cutting method is attached to\n benderscut --- the Benders' decomposition cutting method\n name -- the name\n desc -- the description\n priority -- priority of the Benders' decomposition\n islpcut -- is this cutting method suitable for generating cuts for convex relaxations?\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_325includeBenderscut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders = 0; struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_benderscut = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_priority = 0; PyObject *__pyx_v_islpcut = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeBenderscut (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_benders,&__pyx_n_s_benderscut,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_priority,&__pyx_n_s_islpcut,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[4] = ((PyObject *)__pyx_int_1); values[5] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benders)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_benderscut)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBenderscut", 0, 4, 6, 1); __PYX_ERR(3, 3013, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBenderscut", 0, 4, 6, 2); __PYX_ERR(3, 3013, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeBenderscut", 0, 4, 6, 3); __PYX_ERR(3, 3013, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_islpcut); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeBenderscut") < 0)) __PYX_ERR(3, 3013, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)values[0]); __pyx_v_benderscut = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)values[1]); __pyx_v_name = values[2]; __pyx_v_desc = values[3]; __pyx_v_priority = values[4]; __pyx_v_islpcut = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeBenderscut", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3013, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeBenderscut", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benders), __pyx_ptype_9pyscipopt_4scip_Benders, 1, "benders", 0))) __PYX_ERR(3, 3013, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_benderscut), __pyx_ptype_9pyscipopt_4scip_Benderscut, 1, "benderscut", 0))) __PYX_ERR(3, 3013, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_324includeBenderscut(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_benders, __pyx_v_benderscut, __pyx_v_name, __pyx_v_desc, __pyx_v_priority, __pyx_v_islpcut); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_324includeBenderscut(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v_benders, struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v_benderscut, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_priority, PyObject *__pyx_v_islpcut) { SCIP_BENDERS *__pyx_v__benders; PyObject *__pyx_v_bendersname = NULL; PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_d = NULL; CYTHON_UNUSED SCIP_BENDERSCUT *__pyx_v_scip_benderscut; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; char const *__pyx_t_6; int __pyx_t_7; SCIP_Bool __pyx_t_8; PyObject *__pyx_t_9 = NULL; char const *__pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeBenderscut", 0); /* "pyscipopt/scip.pyx":3026 * cdef SCIP_BENDERS* _benders * * bendersname = str_conversion(benders.name) # <<<<<<<<<<<<<< * _benders = SCIPfindBenders(self._scip, bendersname) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_benders->name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_benders->name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_bendersname = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3027 * * bendersname = str_conversion(benders.name) * _benders = SCIPfindBenders(self._scip, bendersname) # <<<<<<<<<<<<<< * * n = str_conversion(name) */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_bendersname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3027, __pyx_L1_error) __pyx_v__benders = SCIPfindBenders(__pyx_v_self->_scip, __pyx_t_4); /* "pyscipopt/scip.pyx":3029 * _benders = SCIPfindBenders(self._scip, bendersname) * * n = str_conversion(name) # <<<<<<<<<<<<<< * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBenderscut(self._scip, _benders, n, d, priority, islpcut, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3030 * * n = str_conversion(name) * d = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeBenderscut(self._scip, _benders, n, d, priority, islpcut, * PyBenderscutCopy, PyBenderscutFree, PyBenderscutInit, PyBenderscutExit, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3031 * n = str_conversion(name) * d = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeBenderscut(self._scip, _benders, n, d, priority, islpcut, # <<<<<<<<<<<<<< * PyBenderscutCopy, PyBenderscutFree, PyBenderscutInit, PyBenderscutExit, * PyBenderscutInitsol, PyBenderscutExitsol, PyBenderscutExec, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 3031, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_d); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3031, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3031, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_islpcut); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3031, __pyx_L1_error) /* "pyscipopt/scip.pyx":3034 * PyBenderscutCopy, PyBenderscutFree, PyBenderscutInit, PyBenderscutExit, * PyBenderscutInitsol, PyBenderscutExitsol, PyBenderscutExec, * <SCIP_BENDERSCUTDATA*>benderscut)) # <<<<<<<<<<<<<< * * cdef SCIP_BENDERSCUT* scip_benderscut */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeBenderscut(__pyx_v_self->_scip, __pyx_v__benders, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_f_9pyscipopt_4scip_PyBenderscutCopy, __pyx_f_9pyscipopt_4scip_PyBenderscutFree, __pyx_f_9pyscipopt_4scip_PyBenderscutInit, __pyx_f_9pyscipopt_4scip_PyBenderscutExit, __pyx_f_9pyscipopt_4scip_PyBenderscutInitsol, __pyx_f_9pyscipopt_4scip_PyBenderscutExitsol, __pyx_f_9pyscipopt_4scip_PyBenderscutExec, ((SCIP_BENDERSCUTDATA *)__pyx_v_benderscut))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3037 * * cdef SCIP_BENDERSCUT* scip_benderscut * scip_benderscut = SCIPfindBenderscut(_benders, n) # <<<<<<<<<<<<<< * benderscut.model = <Model>weakref.proxy(self) * benderscut.benders = <Benders>weakref.proxy(benders) */ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(3, 3037, __pyx_L1_error) __pyx_v_scip_benderscut = SCIPfindBenderscut(__pyx_v__benders, __pyx_t_10); /* "pyscipopt/scip.pyx":3038 * cdef SCIP_BENDERSCUT* scip_benderscut * scip_benderscut = SCIPfindBenderscut(_benders, n) * benderscut.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * benderscut.benders = <Benders>weakref.proxy(benders) * benderscut.name = name */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_benderscut->model); __Pyx_DECREF(((PyObject *)__pyx_v_benderscut->model)); __pyx_v_benderscut->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3039 * scip_benderscut = SCIPfindBenderscut(_benders, n) * benderscut.model = <Model>weakref.proxy(self) * benderscut.benders = <Benders>weakref.proxy(benders) # <<<<<<<<<<<<<< * benderscut.name = name * # TODO: It might be necessary in increment the reference to benders i.e Py_INCREF(benders) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_weakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_proxy); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_v_benders)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_benders)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_benderscut->benders); __Pyx_DECREF(((PyObject *)__pyx_v_benderscut->benders)); __pyx_v_benderscut->benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3040 * benderscut.model = <Model>weakref.proxy(self) * benderscut.benders = <Benders>weakref.proxy(benders) * benderscut.name = name # <<<<<<<<<<<<<< * # TODO: It might be necessary in increment the reference to benders i.e Py_INCREF(benders) * Py_INCREF(benderscut) */ if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(3, 3040, __pyx_L1_error) __pyx_t_2 = __pyx_v_name; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_benderscut->name); __Pyx_DECREF(__pyx_v_benderscut->name); __pyx_v_benderscut->name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3042 * benderscut.name = name * # TODO: It might be necessary in increment the reference to benders i.e Py_INCREF(benders) * Py_INCREF(benderscut) # <<<<<<<<<<<<<< * * */ Py_INCREF(((PyObject *)__pyx_v_benderscut)); /* "pyscipopt/scip.pyx":3013 * Py_INCREF(benders) * * def includeBenderscut(self, Benders benders, Benderscut benderscut, name, desc, priority=1, islpcut=True): # <<<<<<<<<<<<<< * """ Include a Benders' decomposition cutting method * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyscipopt.scip.Model.includeBenderscut", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bendersname); __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3045 * * * def getLPBranchCands(self): # <<<<<<<<<<<<<< * """gets branching candidates for LP solution branching (fractional variables) along with solution values, * fractionalities, and number of branching candidates; The number of branching candidates does NOT account */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_327getLPBranchCands(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_326getLPBranchCands[] = "gets branching candidates for LP solution branching (fractional variables) along with solution values,\n fractionalities, and number of branching candidates; The number of branching candidates does NOT account\n for fractional implicit integer variables which should not be used for branching decisions. Fractional\n implicit integer variables are stored at the positions *nlpcands to *nlpcands + *nfracimplvars - 1\n branching rules should always select the branching candidate among the first npriolpcands of the candidate list\n\n :return tuple (lpcands, lpcandssol, lpcadsfrac, nlpcands, npriolpcands, nfracimplvars) where\n\n lpcands: list of variables of LP branching candidates\n lpcandssol: list of LP candidate solution values\n lpcandsfrac\tlist of LP candidate fractionalities\n nlpcands: number of LP branching candidates\n npriolpcands: number of candidates with maximal priority\n nfracimplvars: number of fractional implicit integer variables\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_327getLPBranchCands(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLPBranchCands (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_326getLPBranchCands(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_326getLPBranchCands(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { int __pyx_v_ncands; int __pyx_v_nlpcands; int __pyx_v_npriolpcands; int __pyx_v_nfracimplvars; SCIP_VAR **__pyx_v_lpcands; SCIP_Real *__pyx_v_lpcandssol; SCIP_Real *__pyx_v_lpcandsfrac; int __pyx_9genexpr21__pyx_v_i; int __pyx_9genexpr22__pyx_v_i; int __pyx_9genexpr23__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLPBranchCands", 0); /* "pyscipopt/scip.pyx":3067 * cdef int nfracimplvars * * ncands = SCIPgetNLPBranchCands(self._scip) # <<<<<<<<<<<<<< * cdef SCIP_VAR** lpcands * cdef SCIP_Real* lpcandssol */ __pyx_v_ncands = SCIPgetNLPBranchCands(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3072 * cdef SCIP_Real* lpcandsfrac * * PY_SCIP_CALL(SCIPgetLPBranchCands(self._scip, &lpcands, &lpcandssol, &lpcandsfrac, # <<<<<<<<<<<<<< * &nlpcands, &npriolpcands, &nfracimplvars)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pyscipopt/scip.pyx":3073 * * PY_SCIP_CALL(SCIPgetLPBranchCands(self._scip, &lpcands, &lpcandssol, &lpcandsfrac, * &nlpcands, &npriolpcands, &nfracimplvars)) # <<<<<<<<<<<<<< * * return ([Variable.create(lpcands[i]) for i in range(ncands)], [lpcandssol[i] for i in range(ncands)], */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetLPBranchCands(__pyx_v_self->_scip, (&__pyx_v_lpcands), (&__pyx_v_lpcandssol), (&__pyx_v_lpcandsfrac), (&__pyx_v_nlpcands), (&__pyx_v_npriolpcands), (&__pyx_v_nfracimplvars))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3075 * &nlpcands, &npriolpcands, &nfracimplvars)) * * return ([Variable.create(lpcands[i]) for i in range(ncands)], [lpcandssol[i] for i in range(ncands)], # <<<<<<<<<<<<<< * [lpcandsfrac[i] for i in range(ncands)], nlpcands, npriolpcands, nfracimplvars) * */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_ncands; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr21__pyx_v_i = __pyx_t_7; __pyx_t_2 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v_lpcands[__pyx_9genexpr21__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_v_ncands; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr22__pyx_v_i = __pyx_t_7; __pyx_t_3 = PyFloat_FromDouble((__pyx_v_lpcandssol[__pyx_9genexpr22__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } /* exit inner scope */ { /* enter inner scope */ /* "pyscipopt/scip.pyx":3076 * * return ([Variable.create(lpcands[i]) for i in range(ncands)], [lpcandssol[i] for i in range(ncands)], * [lpcandsfrac[i] for i in range(ncands)], nlpcands, npriolpcands, nfracimplvars) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_v_ncands; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr23__pyx_v_i = __pyx_t_7; __pyx_t_4 = PyFloat_FromDouble((__pyx_v_lpcandsfrac[__pyx_9genexpr23__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 3076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } /* exit inner scope */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nlpcands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_npriolpcands); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_nfracimplvars); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "pyscipopt/scip.pyx":3075 * &nlpcands, &npriolpcands, &nfracimplvars)) * * return ([Variable.create(lpcands[i]) for i in range(ncands)], [lpcandssol[i] for i in range(ncands)], # <<<<<<<<<<<<<< * [lpcandsfrac[i] for i in range(ncands)], nlpcands, npriolpcands, nfracimplvars) * */ __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3045 * * * def getLPBranchCands(self): # <<<<<<<<<<<<<< * """gets branching candidates for LP solution branching (fractional variables) along with solution values, * fractionalities, and number of branching candidates; The number of branching candidates does NOT account */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.Model.getLPBranchCands", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3079 * * * def getPseudoBranchCands(self): # <<<<<<<<<<<<<< * """gets branching candidates for pseudo solution branching (non-fixed variables) along with the number of candidates * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_329getPseudoBranchCands(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_328getPseudoBranchCands[] = "gets branching candidates for pseudo solution branching (non-fixed variables) along with the number of candidates\n\n :return tuple (pseudocands, npseudocands, npriopseudocands) where\n\n pseudocands: list of pseudo branching variable candidates\n npriopseudocands: number of candidates with maximal priority\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_329getPseudoBranchCands(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPseudoBranchCands (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_328getPseudoBranchCands(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_328getPseudoBranchCands(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_VAR **__pyx_v_cands; int __pyx_v_ncands; int __pyx_v_npriocands; int __pyx_9genexpr24__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPseudoBranchCands", 0); /* "pyscipopt/scip.pyx":3092 * cdef int npriocands * * PY_SCIP_CALL(SCIPgetPseudoBranchCands(self._scip, &cands, &ncands, &npriocands)) # <<<<<<<<<<<<<< * * return ([Variable.create(cands[i]) for i in range(ncands)], npriocands) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetPseudoBranchCands(__pyx_v_self->_scip, (&__pyx_v_cands), (&__pyx_v_ncands), (&__pyx_v_npriocands))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3094 * PY_SCIP_CALL(SCIPgetPseudoBranchCands(self._scip, &cands, &ncands, &npriocands)) * * return ([Variable.create(cands[i]) for i in range(ncands)], npriocands) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_ncands; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_9genexpr24__pyx_v_i = __pyx_t_7; __pyx_t_2 = __pyx_f_9pyscipopt_4scip_8Variable_create((__pyx_v_cands[__pyx_9genexpr24__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 3094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npriocands); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3079 * * * def getPseudoBranchCands(self): # <<<<<<<<<<<<<< * """gets branching candidates for pseudo solution branching (non-fixed variables) along with the number of candidates * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.getPseudoBranchCands", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3097 * * * def branchVar(self, variable): # <<<<<<<<<<<<<< * """Branch on a non-continuous variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_331branchVar(PyObject *__pyx_v_self, PyObject *__pyx_v_variable); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_330branchVar[] = "Branch on a non-continuous variable.\n\n :param variable: Variable to branch on\n :return: tuple(downchild, eqchild, upchild) of Nodes of the left, middle and right child.\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_331branchVar(PyObject *__pyx_v_self, PyObject *__pyx_v_variable) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchVar (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_330branchVar(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_variable)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_330branchVar(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_variable) { SCIP_NODE *__pyx_v_downchild; SCIP_NODE *__pyx_v_eqchild; SCIP_NODE *__pyx_v_upchild; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("branchVar", 0); /* "pyscipopt/scip.pyx":3104 * * """ * cdef SCIP_NODE* downchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * cdef SCIP_NODE* eqchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) */ __pyx_v_downchild = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3105 * """ * cdef SCIP_NODE* downchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* eqchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * */ __pyx_v_eqchild = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3106 * cdef SCIP_NODE* downchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* eqchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPbranchVar(self._scip, (<Variable>variable).scip_var, &downchild, &eqchild, &upchild)) */ __pyx_v_upchild = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3108 * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * * PY_SCIP_CALL(SCIPbranchVar(self._scip, (<Variable>variable).scip_var, &downchild, &eqchild, &upchild)) # <<<<<<<<<<<<<< * return Node.create(downchild), Node.create(eqchild), Node.create(upchild) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPbranchVar(__pyx_v_self->_scip, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_variable)->scip_var, (&__pyx_v_downchild), (&__pyx_v_eqchild), (&__pyx_v_upchild))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3109 * * PY_SCIP_CALL(SCIPbranchVar(self._scip, (<Variable>variable).scip_var, &downchild, &eqchild, &upchild)) * return Node.create(downchild), Node.create(eqchild), Node.create(upchild) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_downchild); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_eqchild); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_upchild); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3097 * * * def branchVar(self, variable): # <<<<<<<<<<<<<< * """Branch on a non-continuous variable. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.branchVar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3112 * * * def branchVarVal(self, variable, value): # <<<<<<<<<<<<<< * """Branches on variable using a value which separates the domain of the variable. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_333branchVarVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_332branchVarVal[] = "Branches on variable using a value which separates the domain of the variable.\n\n :param variable: Variable to branch on\n :param value: float, value to branch on\n :return: tuple(downchild, eqchild, upchild) of Nodes of the left, middle and right child. Middle child only exists\n if branch variable is integer\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_333branchVarVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_variable = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("branchVarVal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variable)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("branchVarVal", 1, 2, 2, 1); __PYX_ERR(3, 3112, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "branchVarVal") < 0)) __PYX_ERR(3, 3112, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_variable = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("branchVarVal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3112, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.branchVarVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_332branchVarVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_variable, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_332branchVarVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_variable, PyObject *__pyx_v_value) { SCIP_NODE *__pyx_v_downchild; SCIP_NODE *__pyx_v_eqchild; SCIP_NODE *__pyx_v_upchild; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("branchVarVal", 0); /* "pyscipopt/scip.pyx":3121 * * """ * cdef SCIP_NODE* downchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * cdef SCIP_NODE* eqchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) */ __pyx_v_downchild = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3122 * """ * cdef SCIP_NODE* downchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* eqchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * */ __pyx_v_eqchild = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3123 * cdef SCIP_NODE* downchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* eqchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPbranchVarVal(self._scip, (<Variable>variable).scip_var, value, &downchild, &eqchild, &upchild)) */ __pyx_v_upchild = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3125 * cdef SCIP_NODE* upchild = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * * PY_SCIP_CALL(SCIPbranchVarVal(self._scip, (<Variable>variable).scip_var, value, &downchild, &eqchild, &upchild)) # <<<<<<<<<<<<<< * # TODO should the stuff be freed and how? * return Node.create(downchild), Node.create(eqchild), Node.create(upchild) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3125, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPbranchVarVal(__pyx_v_self->_scip, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_variable)->scip_var, __pyx_t_3, (&__pyx_v_downchild), (&__pyx_v_eqchild), (&__pyx_v_upchild))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3127 * PY_SCIP_CALL(SCIPbranchVarVal(self._scip, (<Variable>variable).scip_var, value, &downchild, &eqchild, &upchild)) * # TODO should the stuff be freed and how? * return Node.create(downchild), Node.create(eqchild), Node.create(upchild) # <<<<<<<<<<<<<< * * def calcNodeselPriority(self, Variable variable, branchdir, targetvalue): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_downchild); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_eqchild); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_upchild); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3112 * * * def branchVarVal(self, variable, value): # <<<<<<<<<<<<<< * """Branches on variable using a value which separates the domain of the variable. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.branchVarVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3129 * return Node.create(downchild), Node.create(eqchild), Node.create(upchild) * * def calcNodeselPriority(self, Variable variable, branchdir, targetvalue): # <<<<<<<<<<<<<< * """calculates the node selection priority for moving the given variable's LP value * to the given target value; */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_335calcNodeselPriority(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_334calcNodeselPriority[] = "calculates the node selection priority for moving the given variable's LP value\n to the given target value;\n this node selection priority can be given to the SCIPcreateChild() call\n\n :param variable: variable on which the branching is applied\n :param branchdir: type of branching that was performed\n :param targetvalue: new value of the variable in the child node\n :return: node selection priority for moving the given variable's LP value to the given target value\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_335calcNodeselPriority(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_variable = 0; PyObject *__pyx_v_branchdir = 0; PyObject *__pyx_v_targetvalue = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("calcNodeselPriority (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_branchdir,&__pyx_n_s_targetvalue,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variable)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_branchdir)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("calcNodeselPriority", 1, 3, 3, 1); __PYX_ERR(3, 3129, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_targetvalue)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("calcNodeselPriority", 1, 3, 3, 2); __PYX_ERR(3, 3129, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calcNodeselPriority") < 0)) __PYX_ERR(3, 3129, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_variable = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_branchdir = values[1]; __pyx_v_targetvalue = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("calcNodeselPriority", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3129, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.calcNodeselPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_variable), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "variable", 0))) __PYX_ERR(3, 3129, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_334calcNodeselPriority(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_variable, __pyx_v_branchdir, __pyx_v_targetvalue); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_334calcNodeselPriority(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_variable, PyObject *__pyx_v_branchdir, PyObject *__pyx_v_targetvalue) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_BRANCHDIR __pyx_t_1; SCIP_Real __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("calcNodeselPriority", 0); /* "pyscipopt/scip.pyx":3140 * * """ * return SCIPcalcNodeselPriority(self._scip, variable.scip_var, branchdir, targetvalue) # <<<<<<<<<<<<<< * * def calcChildEstimate(self, Variable variable, targetvalue): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((SCIP_BRANCHDIR)__Pyx_PyInt_As_SCIP_BRANCHDIR(__pyx_v_branchdir)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3140, __pyx_L1_error) __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_targetvalue); if (unlikely((__pyx_t_2 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3140, __pyx_L1_error) __pyx_t_3 = PyFloat_FromDouble(SCIPcalcNodeselPriority(__pyx_v_self->_scip, __pyx_v_variable->scip_var, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3129 * return Node.create(downchild), Node.create(eqchild), Node.create(upchild) * * def calcNodeselPriority(self, Variable variable, branchdir, targetvalue): # <<<<<<<<<<<<<< * """calculates the node selection priority for moving the given variable's LP value * to the given target value; */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.calcNodeselPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3142 * return SCIPcalcNodeselPriority(self._scip, variable.scip_var, branchdir, targetvalue) * * def calcChildEstimate(self, Variable variable, targetvalue): # <<<<<<<<<<<<<< * """Calculates an estimate for the objective of the best feasible solution * contained in the subtree after applying the given branching; */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_337calcChildEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_336calcChildEstimate[] = "Calculates an estimate for the objective of the best feasible solution\n contained in the subtree after applying the given branching;\n this estimate can be given to the SCIPcreateChild() call\n\n :param variable: Variable to compute the estimate for\n :param targetvalue: new value of the variable in the child node\n :return: objective estimate of the best solution in the subtree after applying the given branching\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_337calcChildEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_variable = 0; PyObject *__pyx_v_targetvalue = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("calcChildEstimate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_targetvalue,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variable)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_targetvalue)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("calcChildEstimate", 1, 2, 2, 1); __PYX_ERR(3, 3142, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calcChildEstimate") < 0)) __PYX_ERR(3, 3142, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_variable = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_targetvalue = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("calcChildEstimate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3142, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.calcChildEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_variable), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "variable", 0))) __PYX_ERR(3, 3142, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_336calcChildEstimate(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_variable, __pyx_v_targetvalue); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_336calcChildEstimate(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_variable, PyObject *__pyx_v_targetvalue) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Real __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("calcChildEstimate", 0); /* "pyscipopt/scip.pyx":3152 * * """ * return SCIPcalcChildEstimate(self._scip, variable.scip_var, targetvalue) # <<<<<<<<<<<<<< * * def createChild(self, nodeselprio, estimate): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_targetvalue); if (unlikely((__pyx_t_1 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3152, __pyx_L1_error) __pyx_t_2 = PyFloat_FromDouble(SCIPcalcChildEstimate(__pyx_v_self->_scip, __pyx_v_variable->scip_var, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3142 * return SCIPcalcNodeselPriority(self._scip, variable.scip_var, branchdir, targetvalue) * * def calcChildEstimate(self, Variable variable, targetvalue): # <<<<<<<<<<<<<< * """Calculates an estimate for the objective of the best feasible solution * contained in the subtree after applying the given branching; */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.calcChildEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3154 * return SCIPcalcChildEstimate(self._scip, variable.scip_var, targetvalue) * * def createChild(self, nodeselprio, estimate): # <<<<<<<<<<<<<< * """Create a child node of the focus node. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_339createChild(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_338createChild[] = "Create a child node of the focus node.\n\n :param nodeselprio: float, node selection priority of new node\n :param estimate: float, estimate for(transformed) objective value of best feasible solution in subtree\n :return: Node, the child which was created\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_339createChild(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nodeselprio = 0; PyObject *__pyx_v_estimate = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createChild (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nodeselprio,&__pyx_n_s_estimate,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeselprio)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_estimate)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("createChild", 1, 2, 2, 1); __PYX_ERR(3, 3154, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createChild") < 0)) __PYX_ERR(3, 3154, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_nodeselprio = values[0]; __pyx_v_estimate = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("createChild", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3154, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.createChild", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_338createChild(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_nodeselprio, __pyx_v_estimate); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_338createChild(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_nodeselprio, PyObject *__pyx_v_estimate) { SCIP_NODE *__pyx_v_child; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; SCIP_Real __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createChild", 0); /* "pyscipopt/scip.pyx":3162 * * """ * cdef SCIP_NODE* child = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateChild(self._scip, &child, nodeselprio, estimate)) * return Node.create(child) */ __pyx_v_child = ((SCIP_NODE *)malloc((sizeof(SCIP_NODE)))); /* "pyscipopt/scip.pyx":3163 * """ * cdef SCIP_NODE* child = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * PY_SCIP_CALL(SCIPcreateChild(self._scip, &child, nodeselprio, estimate)) # <<<<<<<<<<<<<< * return Node.create(child) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_nodeselprio); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3163, __pyx_L1_error) __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_estimate); if (unlikely((__pyx_t_4 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3163, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateChild(__pyx_v_self->_scip, (&__pyx_v_child), __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3164 * cdef SCIP_NODE* child = <SCIP_NODE*> malloc(sizeof(SCIP_NODE)) * PY_SCIP_CALL(SCIPcreateChild(self._scip, &child, nodeselprio, estimate)) * return Node.create(child) # <<<<<<<<<<<<<< * * # Diving methods (Diving is LP related) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9pyscipopt_4scip_4Node_create(__pyx_v_child); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3154 * return SCIPcalcChildEstimate(self._scip, variable.scip_var, targetvalue) * * def createChild(self, nodeselprio, estimate): # <<<<<<<<<<<<<< * """Create a child node of the focus node. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.createChild", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3167 * * # Diving methods (Diving is LP related) * def startDive(self): # <<<<<<<<<<<<<< * """Initiates LP diving * It allows the user to change the LP in several ways, solve, change again, etc, without affecting the actual LP that has. When endDive() is called, */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_341startDive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_340startDive[] = "Initiates LP diving\n It allows the user to change the LP in several ways, solve, change again, etc, without affecting the actual LP that has. When endDive() is called,\n SCIP will undo all changes done and recover the LP it had before startDive\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_341startDive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("startDive (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_340startDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_340startDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("startDive", 0); /* "pyscipopt/scip.pyx":3172 * SCIP will undo all changes done and recover the LP it had before startDive * """ * PY_SCIP_CALL(SCIPstartDive(self._scip)) # <<<<<<<<<<<<<< * * def endDive(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPstartDive(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3167 * * # Diving methods (Diving is LP related) * def startDive(self): # <<<<<<<<<<<<<< * """Initiates LP diving * It allows the user to change the LP in several ways, solve, change again, etc, without affecting the actual LP that has. When endDive() is called, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.startDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3174 * PY_SCIP_CALL(SCIPstartDive(self._scip)) * * def endDive(self): # <<<<<<<<<<<<<< * """Quits probing and resets bounds and constraints to the focus node's environment""" * PY_SCIP_CALL(SCIPendDive(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_343endDive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_342endDive[] = "Quits probing and resets bounds and constraints to the focus node's environment"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_343endDive(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("endDive (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_342endDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_342endDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("endDive", 0); /* "pyscipopt/scip.pyx":3176 * def endDive(self): * """Quits probing and resets bounds and constraints to the focus node's environment""" * PY_SCIP_CALL(SCIPendDive(self._scip)) # <<<<<<<<<<<<<< * * def chgVarObjDive(self, Variable var, newobj): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPendDive(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3174 * PY_SCIP_CALL(SCIPstartDive(self._scip)) * * def endDive(self): # <<<<<<<<<<<<<< * """Quits probing and resets bounds and constraints to the focus node's environment""" * PY_SCIP_CALL(SCIPendDive(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.endDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3178 * PY_SCIP_CALL(SCIPendDive(self._scip)) * * def chgVarObjDive(self, Variable var, newobj): # <<<<<<<<<<<<<< * """changes (column) variable's objective value in current dive""" * PY_SCIP_CALL(SCIPchgVarObjDive(self._scip, var.scip_var, newobj)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_345chgVarObjDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_344chgVarObjDive[] = "changes (column) variable's objective value in current dive"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_345chgVarObjDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_newobj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarObjDive (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_newobj,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newobj)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarObjDive", 1, 2, 2, 1); __PYX_ERR(3, 3178, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarObjDive") < 0)) __PYX_ERR(3, 3178, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_newobj = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarObjDive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3178, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarObjDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3178, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_344chgVarObjDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_newobj); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_344chgVarObjDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newobj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarObjDive", 0); /* "pyscipopt/scip.pyx":3180 * def chgVarObjDive(self, Variable var, newobj): * """changes (column) variable's objective value in current dive""" * PY_SCIP_CALL(SCIPchgVarObjDive(self._scip, var.scip_var, newobj)) # <<<<<<<<<<<<<< * * def chgVarLbDive(self, Variable var, newbound): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_newobj); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3180, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarObjDive(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3178 * PY_SCIP_CALL(SCIPendDive(self._scip)) * * def chgVarObjDive(self, Variable var, newobj): # <<<<<<<<<<<<<< * """changes (column) variable's objective value in current dive""" * PY_SCIP_CALL(SCIPchgVarObjDive(self._scip, var.scip_var, newobj)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarObjDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3182 * PY_SCIP_CALL(SCIPchgVarObjDive(self._scip, var.scip_var, newobj)) * * def chgVarLbDive(self, Variable var, newbound): # <<<<<<<<<<<<<< * """changes variable's current lb in current dive""" * PY_SCIP_CALL(SCIPchgVarLbDive(self._scip, var.scip_var, newbound)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_347chgVarLbDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_346chgVarLbDive[] = "changes variable's current lb in current dive"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_347chgVarLbDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_newbound = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarLbDive (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_newbound,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newbound)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarLbDive", 1, 2, 2, 1); __PYX_ERR(3, 3182, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarLbDive") < 0)) __PYX_ERR(3, 3182, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_newbound = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarLbDive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3182, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLbDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3182, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_346chgVarLbDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_newbound); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_346chgVarLbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newbound) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarLbDive", 0); /* "pyscipopt/scip.pyx":3184 * def chgVarLbDive(self, Variable var, newbound): * """changes variable's current lb in current dive""" * PY_SCIP_CALL(SCIPchgVarLbDive(self._scip, var.scip_var, newbound)) # <<<<<<<<<<<<<< * * def chgVarUbDive(self, Variable var, newbound): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_newbound); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3184, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarLbDive(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3182 * PY_SCIP_CALL(SCIPchgVarObjDive(self._scip, var.scip_var, newobj)) * * def chgVarLbDive(self, Variable var, newbound): # <<<<<<<<<<<<<< * """changes variable's current lb in current dive""" * PY_SCIP_CALL(SCIPchgVarLbDive(self._scip, var.scip_var, newbound)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarLbDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3186 * PY_SCIP_CALL(SCIPchgVarLbDive(self._scip, var.scip_var, newbound)) * * def chgVarUbDive(self, Variable var, newbound): # <<<<<<<<<<<<<< * """changes variable's current ub in current dive""" * PY_SCIP_CALL(SCIPchgVarUbDive(self._scip, var.scip_var, newbound)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_349chgVarUbDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_348chgVarUbDive[] = "changes variable's current ub in current dive"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_349chgVarUbDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_newbound = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarUbDive (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_newbound,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newbound)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarUbDive", 1, 2, 2, 1); __PYX_ERR(3, 3186, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarUbDive") < 0)) __PYX_ERR(3, 3186, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_newbound = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarUbDive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3186, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUbDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3186, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_348chgVarUbDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_newbound); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_348chgVarUbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newbound) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarUbDive", 0); /* "pyscipopt/scip.pyx":3188 * def chgVarUbDive(self, Variable var, newbound): * """changes variable's current ub in current dive""" * PY_SCIP_CALL(SCIPchgVarUbDive(self._scip, var.scip_var, newbound)) # <<<<<<<<<<<<<< * * def getVarLbDive(self, Variable var): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_newbound); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3188, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarUbDive(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3186 * PY_SCIP_CALL(SCIPchgVarLbDive(self._scip, var.scip_var, newbound)) * * def chgVarUbDive(self, Variable var, newbound): # <<<<<<<<<<<<<< * """changes variable's current ub in current dive""" * PY_SCIP_CALL(SCIPchgVarUbDive(self._scip, var.scip_var, newbound)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarUbDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3190 * PY_SCIP_CALL(SCIPchgVarUbDive(self._scip, var.scip_var, newbound)) * * def getVarLbDive(self, Variable var): # <<<<<<<<<<<<<< * """returns variable's current lb in current dive""" * return SCIPgetVarLbDive(self._scip, var.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_351getVarLbDive(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_350getVarLbDive[] = "returns variable's current lb in current dive"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_351getVarLbDive(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVarLbDive (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3190, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_350getVarLbDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_350getVarLbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVarLbDive", 0); /* "pyscipopt/scip.pyx":3192 * def getVarLbDive(self, Variable var): * """returns variable's current lb in current dive""" * return SCIPgetVarLbDive(self._scip, var.scip_var) # <<<<<<<<<<<<<< * * def getVarUbDive(self, Variable var): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetVarLbDive(__pyx_v_self->_scip, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3190 * PY_SCIP_CALL(SCIPchgVarUbDive(self._scip, var.scip_var, newbound)) * * def getVarLbDive(self, Variable var): # <<<<<<<<<<<<<< * """returns variable's current lb in current dive""" * return SCIPgetVarLbDive(self._scip, var.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getVarLbDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3194 * return SCIPgetVarLbDive(self._scip, var.scip_var) * * def getVarUbDive(self, Variable var): # <<<<<<<<<<<<<< * """returns variable's current ub in current dive""" * return SCIPgetVarUbDive(self._scip, var.scip_var) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_353getVarUbDive(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_352getVarUbDive[] = "returns variable's current ub in current dive"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_353getVarUbDive(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVarUbDive (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3194, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_352getVarUbDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_352getVarUbDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVarUbDive", 0); /* "pyscipopt/scip.pyx":3196 * def getVarUbDive(self, Variable var): * """returns variable's current ub in current dive""" * return SCIPgetVarUbDive(self._scip, var.scip_var) # <<<<<<<<<<<<<< * * def chgRowLhsDive(self, Row row, newlhs): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetVarUbDive(__pyx_v_self->_scip, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3194 * return SCIPgetVarLbDive(self._scip, var.scip_var) * * def getVarUbDive(self, Variable var): # <<<<<<<<<<<<<< * """returns variable's current ub in current dive""" * return SCIPgetVarUbDive(self._scip, var.scip_var) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getVarUbDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3198 * return SCIPgetVarUbDive(self._scip, var.scip_var) * * def chgRowLhsDive(self, Row row, newlhs): # <<<<<<<<<<<<<< * """changes row lhs in current dive, change will be undone after diving * ends, for permanent changes use SCIPchgRowLhs() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_355chgRowLhsDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_354chgRowLhsDive[] = "changes row lhs in current dive, change will be undone after diving\n ends, for permanent changes use SCIPchgRowLhs()\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_355chgRowLhsDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row = 0; PyObject *__pyx_v_newlhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgRowLhsDive (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_newlhs,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newlhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgRowLhsDive", 1, 2, 2, 1); __PYX_ERR(3, 3198, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgRowLhsDive") < 0)) __PYX_ERR(3, 3198, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_row = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_newlhs = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgRowLhsDive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3198, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgRowLhsDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 3198, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_354chgRowLhsDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_row, __pyx_v_newlhs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_354chgRowLhsDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_newlhs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgRowLhsDive", 0); /* "pyscipopt/scip.pyx":3202 * ends, for permanent changes use SCIPchgRowLhs() * """ * PY_SCIP_CALL(SCIPchgRowLhsDive(self._scip, row.scip_row, newlhs)) # <<<<<<<<<<<<<< * * def chgRowRhsDive(self, Row row, newrhs): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_newlhs); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3202, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgRowLhsDive(__pyx_v_self->_scip, __pyx_v_row->scip_row, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3198 * return SCIPgetVarUbDive(self._scip, var.scip_var) * * def chgRowLhsDive(self, Row row, newlhs): # <<<<<<<<<<<<<< * """changes row lhs in current dive, change will be undone after diving * ends, for permanent changes use SCIPchgRowLhs() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.chgRowLhsDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3204 * PY_SCIP_CALL(SCIPchgRowLhsDive(self._scip, row.scip_row, newlhs)) * * def chgRowRhsDive(self, Row row, newrhs): # <<<<<<<<<<<<<< * """changes row rhs in current dive, change will be undone after diving * ends, for permanent changes use SCIPchgRowLhs() */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_357chgRowRhsDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_356chgRowRhsDive[] = "changes row rhs in current dive, change will be undone after diving\n ends, for permanent changes use SCIPchgRowLhs()\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_357chgRowRhsDive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row = 0; PyObject *__pyx_v_newrhs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgRowRhsDive (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_newrhs,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newrhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgRowRhsDive", 1, 2, 2, 1); __PYX_ERR(3, 3204, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgRowRhsDive") < 0)) __PYX_ERR(3, 3204, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_row = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_newrhs = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgRowRhsDive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3204, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgRowRhsDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 3204, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_356chgRowRhsDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_row, __pyx_v_newrhs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_356chgRowRhsDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_newrhs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgRowRhsDive", 0); /* "pyscipopt/scip.pyx":3208 * ends, for permanent changes use SCIPchgRowLhs() * """ * PY_SCIP_CALL(SCIPchgRowRhsDive(self._scip, row.scip_row, newrhs)) # <<<<<<<<<<<<<< * * def addRowDive(self, Row row): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_newrhs); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3208, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgRowRhsDive(__pyx_v_self->_scip, __pyx_v_row->scip_row, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3204 * PY_SCIP_CALL(SCIPchgRowLhsDive(self._scip, row.scip_row, newlhs)) * * def chgRowRhsDive(self, Row row, newrhs): # <<<<<<<<<<<<<< * """changes row rhs in current dive, change will be undone after diving * ends, for permanent changes use SCIPchgRowLhs() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.chgRowRhsDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3210 * PY_SCIP_CALL(SCIPchgRowRhsDive(self._scip, row.scip_row, newrhs)) * * def addRowDive(self, Row row): # <<<<<<<<<<<<<< * """adds a row to the LP in current dive""" * PY_SCIP_CALL(SCIPaddRowDive(self._scip, row.scip_row)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_359addRowDive(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_358addRowDive[] = "adds a row to the LP in current dive"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_359addRowDive(PyObject *__pyx_v_self, PyObject *__pyx_v_row) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addRowDive (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 3210, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_358addRowDive(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Row *)__pyx_v_row)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_358addRowDive(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addRowDive", 0); /* "pyscipopt/scip.pyx":3212 * def addRowDive(self, Row row): * """adds a row to the LP in current dive""" * PY_SCIP_CALL(SCIPaddRowDive(self._scip, row.scip_row)) # <<<<<<<<<<<<<< * * def solveDiveLP(self, itlim = -1): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddRowDive(__pyx_v_self->_scip, __pyx_v_row->scip_row)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3210 * PY_SCIP_CALL(SCIPchgRowRhsDive(self._scip, row.scip_row, newrhs)) * * def addRowDive(self, Row row): # <<<<<<<<<<<<<< * """adds a row to the LP in current dive""" * PY_SCIP_CALL(SCIPaddRowDive(self._scip, row.scip_row)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.addRowDive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3214 * PY_SCIP_CALL(SCIPaddRowDive(self._scip, row.scip_row)) * * def solveDiveLP(self, itlim = -1): # <<<<<<<<<<<<<< * """solves the LP of the current dive no separation or pricing is applied * no separation or pricing is applied */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_361solveDiveLP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_360solveDiveLP[] = "solves the LP of the current dive no separation or pricing is applied\n no separation or pricing is applied\n :param itlim: maximal number of LP iterations to perform (Default value = -1, that is, no limit)\n returns two booleans:\n lperror -- if an unresolved lp error occured\n cutoff -- whether the LP was infeasible or the objective limit was reached\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_361solveDiveLP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_itlim = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solveDiveLP (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_itlim,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itlim); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solveDiveLP") < 0)) __PYX_ERR(3, 3214, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_itlim = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("solveDiveLP", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3214, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.solveDiveLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_360solveDiveLP(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_itlim); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_360solveDiveLP(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_itlim) { SCIP_Bool __pyx_v_lperror; SCIP_Bool __pyx_v_cutoff; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solveDiveLP", 0); /* "pyscipopt/scip.pyx":3225 * cdef SCIP_Bool cutoff * * PY_SCIP_CALL(SCIPsolveDiveLP(self._scip, itlim, &lperror, &cutoff)) # <<<<<<<<<<<<<< * return lperror, cutoff * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_itlim); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3225, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsolveDiveLP(__pyx_v_self->_scip, __pyx_t_3, (&__pyx_v_lperror), (&__pyx_v_cutoff))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3226 * * PY_SCIP_CALL(SCIPsolveDiveLP(self._scip, itlim, &lperror, &cutoff)) * return lperror, cutoff # <<<<<<<<<<<<<< * * def inRepropagation(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_lperror); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_cutoff); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3214 * PY_SCIP_CALL(SCIPaddRowDive(self._scip, row.scip_row)) * * def solveDiveLP(self, itlim = -1): # <<<<<<<<<<<<<< * """solves the LP of the current dive no separation or pricing is applied * no separation or pricing is applied */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.solveDiveLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3228 * return lperror, cutoff * * def inRepropagation(self): # <<<<<<<<<<<<<< * """returns if the current node is already solved and only propagated again.""" * return SCIPinRepropagation(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_363inRepropagation(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_362inRepropagation[] = "returns if the current node is already solved and only propagated again."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_363inRepropagation(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inRepropagation (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_362inRepropagation(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_362inRepropagation(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inRepropagation", 0); /* "pyscipopt/scip.pyx":3230 * def inRepropagation(self): * """returns if the current node is already solved and only propagated again.""" * return SCIPinRepropagation(self._scip) # <<<<<<<<<<<<<< * * # Probing methods (Probing is tree based) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPinRepropagation(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3228 * return lperror, cutoff * * def inRepropagation(self): # <<<<<<<<<<<<<< * """returns if the current node is already solved and only propagated again.""" * return SCIPinRepropagation(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.inRepropagation", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3233 * * # Probing methods (Probing is tree based) * def startProbing(self): # <<<<<<<<<<<<<< * """Initiates probing, making methods SCIPnewProbingNode(), SCIPbacktrackProbing(), SCIPchgVarLbProbing(), * SCIPchgVarUbProbing(), SCIPfixVarProbing(), SCIPpropagateProbing(), SCIPsolveProbingLP(), etc available */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_365startProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_364startProbing[] = "Initiates probing, making methods SCIPnewProbingNode(), SCIPbacktrackProbing(), SCIPchgVarLbProbing(),\n SCIPchgVarUbProbing(), SCIPfixVarProbing(), SCIPpropagateProbing(), SCIPsolveProbingLP(), etc available\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_365startProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("startProbing (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_364startProbing(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_364startProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("startProbing", 0); /* "pyscipopt/scip.pyx":3237 * SCIPchgVarUbProbing(), SCIPfixVarProbing(), SCIPpropagateProbing(), SCIPsolveProbingLP(), etc available * """ * PY_SCIP_CALL(SCIPstartProbing(self._scip)) # <<<<<<<<<<<<<< * * def endProbing(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPstartProbing(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3233 * * # Probing methods (Probing is tree based) * def startProbing(self): # <<<<<<<<<<<<<< * """Initiates probing, making methods SCIPnewProbingNode(), SCIPbacktrackProbing(), SCIPchgVarLbProbing(), * SCIPchgVarUbProbing(), SCIPfixVarProbing(), SCIPpropagateProbing(), SCIPsolveProbingLP(), etc available */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.startProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3239 * PY_SCIP_CALL(SCIPstartProbing(self._scip)) * * def endProbing(self): # <<<<<<<<<<<<<< * """Quits probing and resets bounds and constraints to the focus node's environment""" * PY_SCIP_CALL(SCIPendProbing(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_367endProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_366endProbing[] = "Quits probing and resets bounds and constraints to the focus node's environment"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_367endProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("endProbing (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_366endProbing(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_366endProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("endProbing", 0); /* "pyscipopt/scip.pyx":3241 * def endProbing(self): * """Quits probing and resets bounds and constraints to the focus node's environment""" * PY_SCIP_CALL(SCIPendProbing(self._scip)) # <<<<<<<<<<<<<< * * def chgVarObjProbing(self, Variable var, newobj): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPendProbing(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3239 * PY_SCIP_CALL(SCIPstartProbing(self._scip)) * * def endProbing(self): # <<<<<<<<<<<<<< * """Quits probing and resets bounds and constraints to the focus node's environment""" * PY_SCIP_CALL(SCIPendProbing(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.endProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3243 * PY_SCIP_CALL(SCIPendProbing(self._scip)) * * def chgVarObjProbing(self, Variable var, newobj): # <<<<<<<<<<<<<< * """changes (column) variable's objective value during probing mode""" * PY_SCIP_CALL(SCIPchgVarObjProbing(self._scip, var.scip_var, newobj)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_369chgVarObjProbing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_368chgVarObjProbing[] = "changes (column) variable's objective value during probing mode"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_369chgVarObjProbing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_newobj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgVarObjProbing (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_newobj,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newobj)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chgVarObjProbing", 1, 2, 2, 1); __PYX_ERR(3, 3243, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgVarObjProbing") < 0)) __PYX_ERR(3, 3243, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_newobj = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgVarObjProbing", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3243, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarObjProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3243, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_368chgVarObjProbing(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_newobj); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_368chgVarObjProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_newobj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgVarObjProbing", 0); /* "pyscipopt/scip.pyx":3245 * def chgVarObjProbing(self, Variable var, newobj): * """changes (column) variable's objective value during probing mode""" * PY_SCIP_CALL(SCIPchgVarObjProbing(self._scip, var.scip_var, newobj)) # <<<<<<<<<<<<<< * * def fixVarProbing(self, Variable var, fixedval): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_newobj); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3245, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgVarObjProbing(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3243 * PY_SCIP_CALL(SCIPendProbing(self._scip)) * * def chgVarObjProbing(self, Variable var, newobj): # <<<<<<<<<<<<<< * """changes (column) variable's objective value during probing mode""" * PY_SCIP_CALL(SCIPchgVarObjProbing(self._scip, var.scip_var, newobj)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.chgVarObjProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3247 * PY_SCIP_CALL(SCIPchgVarObjProbing(self._scip, var.scip_var, newobj)) * * def fixVarProbing(self, Variable var, fixedval): # <<<<<<<<<<<<<< * """Fixes a variable at the current probing node.""" * PY_SCIP_CALL(SCIPfixVarProbing(self._scip, var.scip_var, fixedval)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_371fixVarProbing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_370fixVarProbing[] = "Fixes a variable at the current probing node."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_371fixVarProbing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_fixedval = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fixVarProbing (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_fixedval,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedval)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fixVarProbing", 1, 2, 2, 1); __PYX_ERR(3, 3247, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fixVarProbing") < 0)) __PYX_ERR(3, 3247, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_fixedval = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fixVarProbing", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3247, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.fixVarProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3247, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_370fixVarProbing(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_fixedval); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_370fixVarProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_fixedval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fixVarProbing", 0); /* "pyscipopt/scip.pyx":3249 * def fixVarProbing(self, Variable var, fixedval): * """Fixes a variable at the current probing node.""" * PY_SCIP_CALL(SCIPfixVarProbing(self._scip, var.scip_var, fixedval)) # <<<<<<<<<<<<<< * * def isObjChangedProbing(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fixedval); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3249, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfixVarProbing(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3247 * PY_SCIP_CALL(SCIPchgVarObjProbing(self._scip, var.scip_var, newobj)) * * def fixVarProbing(self, Variable var, fixedval): # <<<<<<<<<<<<<< * """Fixes a variable at the current probing node.""" * PY_SCIP_CALL(SCIPfixVarProbing(self._scip, var.scip_var, fixedval)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.fixVarProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3251 * PY_SCIP_CALL(SCIPfixVarProbing(self._scip, var.scip_var, fixedval)) * * def isObjChangedProbing(self): # <<<<<<<<<<<<<< * """returns whether the objective function has changed during probing mode""" * return SCIPisObjChangedProbing(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_373isObjChangedProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_372isObjChangedProbing[] = "returns whether the objective function has changed during probing mode"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_373isObjChangedProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isObjChangedProbing (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_372isObjChangedProbing(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_372isObjChangedProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isObjChangedProbing", 0); /* "pyscipopt/scip.pyx":3253 * def isObjChangedProbing(self): * """returns whether the objective function has changed during probing mode""" * return SCIPisObjChangedProbing(self._scip) # <<<<<<<<<<<<<< * * def inProbing(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPisObjChangedProbing(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3251 * PY_SCIP_CALL(SCIPfixVarProbing(self._scip, var.scip_var, fixedval)) * * def isObjChangedProbing(self): # <<<<<<<<<<<<<< * """returns whether the objective function has changed during probing mode""" * return SCIPisObjChangedProbing(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.isObjChangedProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3255 * return SCIPisObjChangedProbing(self._scip) * * def inProbing(self): # <<<<<<<<<<<<<< * """returns whether we are in probing mode; probing mode is activated via startProbing() and stopped via endProbing()""" * return SCIPinProbing(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_375inProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_374inProbing[] = "returns whether we are in probing mode; probing mode is activated via startProbing() and stopped via endProbing()"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_375inProbing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inProbing (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_374inProbing(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_374inProbing(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inProbing", 0); /* "pyscipopt/scip.pyx":3257 * def inProbing(self): * """returns whether we are in probing mode; probing mode is activated via startProbing() and stopped via endProbing()""" * return SCIPinProbing(self._scip) # <<<<<<<<<<<<<< * * def solveProbingLP(self, itlim = -1): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPinProbing(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3255 * return SCIPisObjChangedProbing(self._scip) * * def inProbing(self): # <<<<<<<<<<<<<< * """returns whether we are in probing mode; probing mode is activated via startProbing() and stopped via endProbing()""" * return SCIPinProbing(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.inProbing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3259 * return SCIPinProbing(self._scip) * * def solveProbingLP(self, itlim = -1): # <<<<<<<<<<<<<< * """solves the LP at the current probing node (cannot be applied at preprocessing stage) * no separation or pricing is applied */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_377solveProbingLP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_376solveProbingLP[] = "solves the LP at the current probing node (cannot be applied at preprocessing stage)\n no separation or pricing is applied\n :param itlim: maximal number of LP iterations to perform (Default value = -1, that is, no limit)\n returns two booleans:\n lperror -- if an unresolved lp error occured\n cutoff -- whether the LP was infeasible or the objective limit was reached\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_377solveProbingLP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_itlim = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solveProbingLP (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_itlim,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itlim); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solveProbingLP") < 0)) __PYX_ERR(3, 3259, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_itlim = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("solveProbingLP", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3259, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.solveProbingLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_376solveProbingLP(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_itlim); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_376solveProbingLP(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_itlim) { SCIP_Bool __pyx_v_lperror; SCIP_Bool __pyx_v_cutoff; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solveProbingLP", 0); /* "pyscipopt/scip.pyx":3270 * cdef SCIP_Bool cutoff * * PY_SCIP_CALL(SCIPsolveProbingLP(self._scip, itlim, &lperror, &cutoff)) # <<<<<<<<<<<<<< * return lperror, cutoff * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_itlim); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3270, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsolveProbingLP(__pyx_v_self->_scip, __pyx_t_3, (&__pyx_v_lperror), (&__pyx_v_cutoff))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3271 * * PY_SCIP_CALL(SCIPsolveProbingLP(self._scip, itlim, &lperror, &cutoff)) * return lperror, cutoff # <<<<<<<<<<<<<< * * def interruptSolve(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_lperror); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_cutoff); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3259 * return SCIPinProbing(self._scip) * * def solveProbingLP(self, itlim = -1): # <<<<<<<<<<<<<< * """solves the LP at the current probing node (cannot be applied at preprocessing stage) * no separation or pricing is applied */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.solveProbingLP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3273 * return lperror, cutoff * * def interruptSolve(self): # <<<<<<<<<<<<<< * """Interrupt the solving process as soon as possible.""" * PY_SCIP_CALL(SCIPinterruptSolve(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_379interruptSolve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_378interruptSolve[] = "Interrupt the solving process as soon as possible."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_379interruptSolve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("interruptSolve (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_378interruptSolve(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_378interruptSolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("interruptSolve", 0); /* "pyscipopt/scip.pyx":3275 * def interruptSolve(self): * """Interrupt the solving process as soon as possible.""" * PY_SCIP_CALL(SCIPinterruptSolve(self._scip)) # <<<<<<<<<<<<<< * * # Solution functions */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPinterruptSolve(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3273 * return lperror, cutoff * * def interruptSolve(self): # <<<<<<<<<<<<<< * """Interrupt the solving process as soon as possible.""" * PY_SCIP_CALL(SCIPinterruptSolve(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.interruptSolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3279 * # Solution functions * * def createSol(self, Heur heur = None): # <<<<<<<<<<<<<< * """Create a new primal solution. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_381createSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_380createSol[] = "Create a new primal solution.\n\n :param Heur heur: heuristic that found the solution (Default value = None)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_381createSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_heur = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_heur,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct __pyx_obj_9pyscipopt_4scip_Heur *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_heur); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createSol") < 0)) __PYX_ERR(3, 3279, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_heur = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("createSol", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3279, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.createSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_heur), __pyx_ptype_9pyscipopt_4scip_Heur, 1, "heur", 0))) __PYX_ERR(3, 3279, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_380createSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_heur); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_380createSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v_heur) { SCIP_HEUR *__pyx_v__heur; PyObject *__pyx_v_n = NULL; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createSol", 0); /* "pyscipopt/scip.pyx":3287 * cdef SCIP_HEUR* _heur * * if isinstance(heur, Heur): # <<<<<<<<<<<<<< * n = str_conversion(heur.name) * _heur = SCIPfindHeur(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_heur), __pyx_ptype_9pyscipopt_4scip_Heur); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":3288 * * if isinstance(heur, Heur): * n = str_conversion(heur.name) # <<<<<<<<<<<<<< * _heur = SCIPfindHeur(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_heur->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_heur->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3289 * if isinstance(heur, Heur): * n = str_conversion(heur.name) * _heur = SCIPfindHeur(self._scip, n) # <<<<<<<<<<<<<< * else: * _heur = NULL */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3289, __pyx_L1_error) __pyx_v__heur = SCIPfindHeur(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3287 * cdef SCIP_HEUR* _heur * * if isinstance(heur, Heur): # <<<<<<<<<<<<<< * n = str_conversion(heur.name) * _heur = SCIPfindHeur(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3291 * _heur = SCIPfindHeur(self._scip, n) * else: * _heur = NULL # <<<<<<<<<<<<<< * solution = Solution() * PY_SCIP_CALL(SCIPcreateSol(self._scip, &solution.sol, _heur)) */ /*else*/ { __pyx_v__heur = NULL; } __pyx_L3:; /* "pyscipopt/scip.pyx":3292 * else: * _heur = NULL * solution = Solution() # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcreateSol(self._scip, &solution.sol, _heur)) * return solution */ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Solution)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3293 * _heur = NULL * solution = Solution() * PY_SCIP_CALL(SCIPcreateSol(self._scip, &solution.sol, _heur)) # <<<<<<<<<<<<<< * return solution * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcreateSol(__pyx_v_self->_scip, (&__pyx_v_solution->sol), __pyx_v__heur)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3294 * solution = Solution() * PY_SCIP_CALL(SCIPcreateSol(self._scip, &solution.sol, _heur)) * return solution # <<<<<<<<<<<<<< * * def printBestSol(self, write_zeros=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_solution)); __pyx_r = ((PyObject *)__pyx_v_solution); goto __pyx_L0; /* "pyscipopt/scip.pyx":3279 * # Solution functions * * def createSol(self, Heur heur = None): # <<<<<<<<<<<<<< * """Create a new primal solution. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.createSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF((PyObject *)__pyx_v_solution); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3296 * return solution * * def printBestSol(self, write_zeros=False): # <<<<<<<<<<<<<< * """Prints the best feasible primal solution.""" * PY_SCIP_CALL(SCIPprintBestSol(self._scip, NULL, write_zeros)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_383printBestSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_382printBestSol[] = "Prints the best feasible primal solution."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_383printBestSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_zeros = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printBestSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_write_zeros,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_zeros); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "printBestSol") < 0)) __PYX_ERR(3, 3296, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_zeros = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("printBestSol", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3296, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.printBestSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_382printBestSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_write_zeros); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_382printBestSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_write_zeros) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("printBestSol", 0); /* "pyscipopt/scip.pyx":3298 * def printBestSol(self, write_zeros=False): * """Prints the best feasible primal solution.""" * PY_SCIP_CALL(SCIPprintBestSol(self._scip, NULL, write_zeros)) # <<<<<<<<<<<<<< * * def printSol(self, Solution solution, write_zeros=False): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_write_zeros); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3298, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintBestSol(__pyx_v_self->_scip, NULL, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3296 * return solution * * def printBestSol(self, write_zeros=False): # <<<<<<<<<<<<<< * """Prints the best feasible primal solution.""" * PY_SCIP_CALL(SCIPprintBestSol(self._scip, NULL, write_zeros)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.printBestSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3300 * PY_SCIP_CALL(SCIPprintBestSol(self._scip, NULL, write_zeros)) * * def printSol(self, Solution solution, write_zeros=False): # <<<<<<<<<<<<<< * """Print the given primal solution. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_385printSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_384printSol[] = "Print the given primal solution.\n\n Keyword arguments:\n solution -- solution to print\n write_zeros -- include variables that are set to zero\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_385printSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; PyObject *__pyx_v_write_zeros = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_write_zeros,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_zeros); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "printSol") < 0)) __PYX_ERR(3, 3300, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_write_zeros = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("printSol", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3300, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.printSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3300, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_384printSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_solution, __pyx_v_write_zeros); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_384printSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_write_zeros) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Bool __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("printSol", 0); /* "pyscipopt/scip.pyx":3307 * write_zeros -- include variables that are set to zero * """ * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, NULL, write_zeros)) # <<<<<<<<<<<<<< * * def writeBestSol(self, filename="origprob.sol", write_zeros=False): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_write_zeros); if (unlikely((__pyx_t_3 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3307, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintSol(__pyx_v_self->_scip, __pyx_v_solution->sol, NULL, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3300 * PY_SCIP_CALL(SCIPprintBestSol(self._scip, NULL, write_zeros)) * * def printSol(self, Solution solution, write_zeros=False): # <<<<<<<<<<<<<< * """Print the given primal solution. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.printSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3309 * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, NULL, write_zeros)) * * def writeBestSol(self, filename="origprob.sol", write_zeros=False): # <<<<<<<<<<<<<< * """Write the best feasible primal solution to a file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_387writeBestSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_386writeBestSol[] = "Write the best feasible primal solution to a file.\n\n Keyword arguments:\n filename -- name of the output file\n write_zeros -- include variables that are set to zero\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_387writeBestSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_write_zeros = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeBestSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_write_zeros,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_kp_u_origprob_sol); values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_zeros); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeBestSol") < 0)) __PYX_ERR(3, 3309, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_filename = values[0]; __pyx_v_write_zeros = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("writeBestSol", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3309, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.writeBestSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_386writeBestSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_filename, __pyx_v_write_zeros); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_386writeBestSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_write_zeros) { PyObject *__pyx_v_f = NULL; FILE *__pyx_v_cfile; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; SCIP_Bool __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeBestSol", 0); /* "pyscipopt/scip.pyx":3318 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) */ /*with:*/ { __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename); __Pyx_INCREF(__pyx_n_u_w); __Pyx_GIVEREF(__pyx_n_u_w); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_w); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3318, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3318, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { __pyx_v_f = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":3319 * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: * cfile = fdopen(f.fileno(), "w") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3319, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3319, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3319, __pyx_L7_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cfile = fdopen(__pyx_t_9, ((char const *)"w")); /* "pyscipopt/scip.pyx":3320 * with open(filename, "w") as f: * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) # <<<<<<<<<<<<<< * * def writeSol(self, Solution solution, filename="origprob.sol", write_zeros=False): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3320, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_write_zeros); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3320, __pyx_L7_error) __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintBestSol(__pyx_v_self->_scip, __pyx_v_cfile, __pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3320, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3320, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":3318 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("pyscipopt.scip.Model.writeBestSol", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(3, 3318, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3318, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3318, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12 < 0) __PYX_ERR(3, 3318, __pyx_L9_except_error) __pyx_t_13 = ((!(__pyx_t_12 != 0)) != 0); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __PYX_ERR(3, 3318, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__95, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "pyscipopt/scip.pyx":3309 * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, NULL, write_zeros)) * * def writeBestSol(self, filename="origprob.sol", write_zeros=False): # <<<<<<<<<<<<<< * """Write the best feasible primal solution to a file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.writeBestSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3322 * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) * * def writeSol(self, Solution solution, filename="origprob.sol", write_zeros=False): # <<<<<<<<<<<<<< * """Write the given primal solution to a file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_389writeSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_388writeSol[] = "Write the given primal solution to a file.\n\n Keyword arguments:\n solution -- solution to write\n filename -- name of the output file\n write_zeros -- include variables that are set to zero\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_389writeSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_write_zeros = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_filename,&__pyx_n_s_write_zeros,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)__pyx_kp_u_origprob_sol); values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_zeros); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeSol") < 0)) __PYX_ERR(3, 3322, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_filename = values[1]; __pyx_v_write_zeros = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("writeSol", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3322, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.writeSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3322, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_388writeSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_solution, __pyx_v_filename, __pyx_v_write_zeros); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_388writeSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_filename, PyObject *__pyx_v_write_zeros) { PyObject *__pyx_v_f = NULL; FILE *__pyx_v_cfile; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; SCIP_Bool __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeSol", 0); /* "pyscipopt/scip.pyx":3332 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, cfile, write_zeros)) */ /*with:*/ { __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename); __Pyx_INCREF(__pyx_n_u_w); __Pyx_GIVEREF(__pyx_n_u_w); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_w); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3332, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3332, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { __pyx_v_f = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":3333 * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: * cfile = fdopen(f.fileno(), "w") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, cfile, write_zeros)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3333, __pyx_L7_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cfile = fdopen(__pyx_t_9, ((char const *)"w")); /* "pyscipopt/scip.pyx":3334 * with open(filename, "w") as f: * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, cfile, write_zeros)) # <<<<<<<<<<<<<< * * # perhaps this should not be included as it implements duplicated functionality */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3334, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_write_zeros); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3334, __pyx_L7_error) __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintSol(__pyx_v_self->_scip, __pyx_v_solution->sol, __pyx_v_cfile, __pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3334, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3334, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":3332 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, cfile, write_zeros)) */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("pyscipopt.scip.Model.writeSol", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(3, 3332, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3332, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3332, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12 < 0) __PYX_ERR(3, 3332, __pyx_L9_except_error) __pyx_t_13 = ((!(__pyx_t_12 != 0)) != 0); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __PYX_ERR(3, 3332, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__95, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "pyscipopt/scip.pyx":3322 * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) * * def writeSol(self, Solution solution, filename="origprob.sol", write_zeros=False): # <<<<<<<<<<<<<< * """Write the given primal solution to a file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.writeSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3338 * # perhaps this should not be included as it implements duplicated functionality * # (as does it's namesake in SCIP) * def readSol(self, filename): # <<<<<<<<<<<<<< * """Reads a given solution file, problem has to be transformed in advance. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_391readSol(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_390readSol[] = "Reads a given solution file, problem has to be transformed in advance.\n\n Keyword arguments:\n filename -- name of the input file\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_391readSol(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readSol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_390readSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_filename)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_390readSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_v_fn = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readSol", 0); /* "pyscipopt/scip.pyx":3344 * filename -- name of the input file * """ * fn = str_conversion(filename) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreadSol(self._scip, fn)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fn = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3345 * """ * fn = str_conversion(filename) * PY_SCIP_CALL(SCIPreadSol(self._scip, fn)) # <<<<<<<<<<<<<< * * def readSolFile(self, filename): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3345, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreadSol(__pyx_v_self->_scip, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3338 * # perhaps this should not be included as it implements duplicated functionality * # (as does it's namesake in SCIP) * def readSol(self, filename): # <<<<<<<<<<<<<< * """Reads a given solution file, problem has to be transformed in advance. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.readSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fn); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3347 * PY_SCIP_CALL(SCIPreadSol(self._scip, fn)) * * def readSolFile(self, filename): # <<<<<<<<<<<<<< * """Reads a given solution file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_393readSolFile(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_392readSolFile[] = "Reads a given solution file.\n\n Solution is created but not added to storage/the model.\n Use 'addSol' OR 'trySol' to add it.\n\n Keyword arguments:\n filename -- name of the input file\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_393readSolFile(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readSolFile (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_392readSolFile(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_filename)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_392readSolFile(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename) { SCIP_Bool __pyx_v_partial; SCIP_Bool __pyx_v_error; struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; PyObject *__pyx_v_fn = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readSolFile", 0); /* "pyscipopt/scip.pyx":3361 * cdef Solution solution * * fn = str_conversion(filename) # <<<<<<<<<<<<<< * solution = self.createSol() * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fn = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3362 * * fn = str_conversion(filename) * solution = self.createSol() # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) * if error: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createSol); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Solution))))) __PYX_ERR(3, 3362, __pyx_L1_error) __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3363 * fn = str_conversion(filename) * solution = self.createSol() * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) # <<<<<<<<<<<<<< * if error: * raise Exception("SCIP: reading solution from file failed!") */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3363, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreadSolFile(__pyx_v_self->_scip, __pyx_t_4, __pyx_v_solution->sol, 0, (&__pyx_v_partial), (&__pyx_v_error))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3364 * solution = self.createSol() * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) * if error: # <<<<<<<<<<<<<< * raise Exception("SCIP: reading solution from file failed!") * */ __pyx_t_6 = (__pyx_v_error != 0); if (unlikely(__pyx_t_6)) { /* "pyscipopt/scip.pyx":3365 * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) * if error: * raise Exception("SCIP: reading solution from file failed!") # <<<<<<<<<<<<<< * * return solution */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 3365, __pyx_L1_error) /* "pyscipopt/scip.pyx":3364 * solution = self.createSol() * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) * if error: # <<<<<<<<<<<<<< * raise Exception("SCIP: reading solution from file failed!") * */ } /* "pyscipopt/scip.pyx":3367 * raise Exception("SCIP: reading solution from file failed!") * * return solution # <<<<<<<<<<<<<< * * def setSolVal(self, Solution solution, Variable var, val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_solution)); __pyx_r = ((PyObject *)__pyx_v_solution); goto __pyx_L0; /* "pyscipopt/scip.pyx":3347 * PY_SCIP_CALL(SCIPreadSol(self._scip, fn)) * * def readSolFile(self, filename): # <<<<<<<<<<<<<< * """Reads a given solution file. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.readSolFile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_solution); __Pyx_XDECREF(__pyx_v_fn); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3369 * return solution * * def setSolVal(self, Solution solution, Variable var, val): # <<<<<<<<<<<<<< * """Set a variable in a solution. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_395setSolVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_394setSolVal[] = "Set a variable in a solution.\n\n :param Solution solution: solution to be modified\n :param Variable var: variable in the solution\n :param val: value of the specified variable\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_395setSolVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_val = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSolVal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_var,&__pyx_n_s_val,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSolVal", 1, 3, 3, 1); __PYX_ERR(3, 3369, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSolVal", 1, 3, 3, 2); __PYX_ERR(3, 3369, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSolVal") < 0)) __PYX_ERR(3, 3369, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); __pyx_v_val = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setSolVal", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3369, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setSolVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3369, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3369, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_394setSolVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_solution, __pyx_v_var, __pyx_v_val); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_394setSolVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_val) { SCIP_SOL *__pyx_v__sol; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_Real __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSolVal", 0); /* "pyscipopt/scip.pyx":3378 * """ * cdef SCIP_SOL* _sol * _sol = <SCIP_SOL*>solution.sol # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetSolVal(self._scip, _sol, var.scip_var, val)) * */ __pyx_v__sol = ((SCIP_SOL *)__pyx_v_solution->sol); /* "pyscipopt/scip.pyx":3379 * cdef SCIP_SOL* _sol * _sol = <SCIP_SOL*>solution.sol * PY_SCIP_CALL(SCIPsetSolVal(self._scip, _sol, var.scip_var, val)) # <<<<<<<<<<<<<< * * def trySol(self, Solution solution, printreason=True, completely=False, checkbounds=True, checkintegrality=True, checklprows=True, free=True): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_3 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3379, __pyx_L1_error) __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetSolVal(__pyx_v_self->_scip, __pyx_v__sol, __pyx_v_var->scip_var, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3369 * return solution * * def setSolVal(self, Solution solution, Variable var, val): # <<<<<<<<<<<<<< * """Set a variable in a solution. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.setSolVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3381 * PY_SCIP_CALL(SCIPsetSolVal(self._scip, _sol, var.scip_var, val)) * * def trySol(self, Solution solution, printreason=True, completely=False, checkbounds=True, checkintegrality=True, checklprows=True, free=True): # <<<<<<<<<<<<<< * """Check given primal solution for feasibility and try to add it to the storage. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_397trySol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_396trySol[] = "Check given primal solution for feasibility and try to add it to the storage.\n\n :param Solution solution: solution to store\n :param printreason: should all reasons of violations be printed? (Default value = True)\n :param completely: should all violation be checked? (Default value = False)\n :param checkbounds: should the bounds of the variables be checked? (Default value = True)\n :param checkintegrality: has integrality to be checked? (Default value = True)\n :param checklprows: have current LP rows (both local and global) to be checked? (Default value = True)\n :param free: should solution be freed? (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_397trySol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; PyObject *__pyx_v_printreason = 0; PyObject *__pyx_v_completely = 0; PyObject *__pyx_v_checkbounds = 0; PyObject *__pyx_v_checkintegrality = 0; PyObject *__pyx_v_checklprows = 0; PyObject *__pyx_v_free = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trySol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_printreason,&__pyx_n_s_completely,&__pyx_n_s_checkbounds,&__pyx_n_s_checkintegrality,&__pyx_n_s_checklprows,&__pyx_n_s_free,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_False); values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printreason); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_completely); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkbounds); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkintegrality); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checklprows); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trySol") < 0)) __PYX_ERR(3, 3381, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_printreason = values[1]; __pyx_v_completely = values[2]; __pyx_v_checkbounds = values[3]; __pyx_v_checkintegrality = values[4]; __pyx_v_checklprows = values[5]; __pyx_v_free = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("trySol", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3381, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.trySol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3381, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_396trySol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_solution, __pyx_v_printreason, __pyx_v_completely, __pyx_v_checkbounds, __pyx_v_checkintegrality, __pyx_v_checklprows, __pyx_v_free); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_396trySol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_printreason, PyObject *__pyx_v_completely, PyObject *__pyx_v_checkbounds, PyObject *__pyx_v_checkintegrality, PyObject *__pyx_v_checklprows, PyObject *__pyx_v_free) { SCIP_Bool __pyx_v_stored; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; SCIP_Bool __pyx_t_4; SCIP_Bool __pyx_t_5; SCIP_Bool __pyx_t_6; SCIP_Bool __pyx_t_7; SCIP_Bool __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trySol", 0); /* "pyscipopt/scip.pyx":3394 * """ * cdef SCIP_Bool stored * if free: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPtrySolFree(self._scip, &solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_free); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3394, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3395 * cdef SCIP_Bool stored * if free: * PY_SCIP_CALL(SCIPtrySolFree(self._scip, &solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPtrySol(self._scip, solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_printreason); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3395, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_completely); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3395, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_checkbounds); if (unlikely((__pyx_t_6 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3395, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_checkintegrality); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3395, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_checklprows); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3395, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtrySolFree(__pyx_v_self->_scip, (&__pyx_v_solution->sol), __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, (&__pyx_v_stored))); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3394 * """ * cdef SCIP_Bool stored * if free: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPtrySolFree(self._scip, &solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3397 * PY_SCIP_CALL(SCIPtrySolFree(self._scip, &solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) * else: * PY_SCIP_CALL(SCIPtrySol(self._scip, solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) # <<<<<<<<<<<<<< * return stored * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_printreason); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3397, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_completely); if (unlikely((__pyx_t_7 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3397, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_checkbounds); if (unlikely((__pyx_t_6 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3397, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_checkintegrality); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3397, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_checklprows); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3397, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPtrySol(__pyx_v_self->_scip, __pyx_v_solution->sol, __pyx_t_8, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4, (&__pyx_v_stored))); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":3398 * else: * PY_SCIP_CALL(SCIPtrySol(self._scip, solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &stored)) * return stored # <<<<<<<<<<<<<< * * def checkSol(self, Solution solution, printreason=True, completely=False, checkbounds=True, checkintegrality=True, checklprows=True, original=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_stored); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3381 * PY_SCIP_CALL(SCIPsetSolVal(self._scip, _sol, var.scip_var, val)) * * def trySol(self, Solution solution, printreason=True, completely=False, checkbounds=True, checkintegrality=True, checklprows=True, free=True): # <<<<<<<<<<<<<< * """Check given primal solution for feasibility and try to add it to the storage. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pyscipopt.scip.Model.trySol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3400 * return stored * * def checkSol(self, Solution solution, printreason=True, completely=False, checkbounds=True, checkintegrality=True, checklprows=True, original=False): # <<<<<<<<<<<<<< * """Check given primal solution for feasibility without adding it to the storage. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_399checkSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_398checkSol[] = "Check given primal solution for feasibility without adding it to the storage.\n\n :param Solution solution: solution to store\n :param printreason: should all reasons of violations be printed? (Default value = True)\n :param completely: should all violation be checked? (Default value = False)\n :param checkbounds: should the bounds of the variables be checked? (Default value = True)\n :param checkintegrality: has integrality to be checked? (Default value = True)\n :param checklprows: have current LP rows (both local and global) to be checked? (Default value = True)\n :param original: must the solution be checked against the original problem (Default value = False)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_399checkSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; PyObject *__pyx_v_printreason = 0; PyObject *__pyx_v_completely = 0; PyObject *__pyx_v_checkbounds = 0; PyObject *__pyx_v_checkintegrality = 0; PyObject *__pyx_v_checklprows = 0; PyObject *__pyx_v_original = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("checkSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_printreason,&__pyx_n_s_completely,&__pyx_n_s_checkbounds,&__pyx_n_s_checkintegrality,&__pyx_n_s_checklprows,&__pyx_n_s_original,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_False); values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)Py_True); values[5] = ((PyObject *)Py_True); values[6] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printreason); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_completely); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkbounds); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checkintegrality); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_checklprows); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_original); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkSol") < 0)) __PYX_ERR(3, 3400, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_printreason = values[1]; __pyx_v_completely = values[2]; __pyx_v_checkbounds = values[3]; __pyx_v_checkintegrality = values[4]; __pyx_v_checklprows = values[5]; __pyx_v_original = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("checkSol", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3400, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.checkSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3400, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_398checkSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_solution, __pyx_v_printreason, __pyx_v_completely, __pyx_v_checkbounds, __pyx_v_checkintegrality, __pyx_v_checklprows, __pyx_v_original); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_398checkSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_printreason, PyObject *__pyx_v_completely, PyObject *__pyx_v_checkbounds, PyObject *__pyx_v_checkintegrality, PyObject *__pyx_v_checklprows, PyObject *__pyx_v_original) { SCIP_Bool __pyx_v_feasible; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; SCIP_Bool __pyx_t_4; SCIP_Bool __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; SCIP_Bool __pyx_t_8; SCIP_Bool __pyx_t_9; SCIP_Bool __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checkSol", 0); /* "pyscipopt/scip.pyx":3413 * """ * cdef SCIP_Bool feasible * if original: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcheckSolOrig(self._scip, solution.sol, &feasible, printreason, completely)) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_original); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3413, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3414 * cdef SCIP_Bool feasible * if original: * PY_SCIP_CALL(SCIPcheckSolOrig(self._scip, solution.sol, &feasible, printreason, completely)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPcheckSol(self._scip, solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &feasible)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_printreason); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3414, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_completely); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3414, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcheckSolOrig(__pyx_v_self->_scip, __pyx_v_solution->sol, (&__pyx_v_feasible), __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3413 * """ * cdef SCIP_Bool feasible * if original: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcheckSolOrig(self._scip, solution.sol, &feasible, printreason, completely)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3416 * PY_SCIP_CALL(SCIPcheckSolOrig(self._scip, solution.sol, &feasible, printreason, completely)) * else: * PY_SCIP_CALL(SCIPcheckSol(self._scip, solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &feasible)) # <<<<<<<<<<<<<< * return feasible * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_printreason); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3416, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_completely); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3416, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_checkbounds); if (unlikely((__pyx_t_8 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3416, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_checkintegrality); if (unlikely((__pyx_t_9 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3416, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_checklprows); if (unlikely((__pyx_t_10 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3416, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcheckSol(__pyx_v_self->_scip, __pyx_v_solution->sol, __pyx_t_5, __pyx_t_4, __pyx_t_8, __pyx_t_9, __pyx_t_10, (&__pyx_v_feasible))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":3417 * else: * PY_SCIP_CALL(SCIPcheckSol(self._scip, solution.sol, printreason, completely, checkbounds, checkintegrality, checklprows, &feasible)) * return feasible # <<<<<<<<<<<<<< * * def addSol(self, Solution solution, free=True): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_feasible); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3400 * return stored * * def checkSol(self, Solution solution, printreason=True, completely=False, checkbounds=True, checkintegrality=True, checklprows=True, original=False): # <<<<<<<<<<<<<< * """Check given primal solution for feasibility without adding it to the storage. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.checkSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3419 * return feasible * * def addSol(self, Solution solution, free=True): # <<<<<<<<<<<<<< * """Try to add a solution to the storage. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_401addSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_400addSol[] = "Try to add a solution to the storage.\n\n :param Solution solution: solution to store\n :param free: should solution be freed afterwards? (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_401addSol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution = 0; PyObject *__pyx_v_free = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addSol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solution,&__pyx_n_s_free,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solution)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addSol") < 0)) __PYX_ERR(3, 3419, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_solution = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_free = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("addSol", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3419, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.addSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3419, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_400addSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_solution, __pyx_v_free); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_400addSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution, PyObject *__pyx_v_free) { SCIP_Bool __pyx_v_stored; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addSol", 0); /* "pyscipopt/scip.pyx":3427 * """ * cdef SCIP_Bool stored * if free: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddSolFree(self._scip, &solution.sol, &stored)) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_free); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3427, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3428 * cdef SCIP_Bool stored * if free: * PY_SCIP_CALL(SCIPaddSolFree(self._scip, &solution.sol, &stored)) # <<<<<<<<<<<<<< * else: * PY_SCIP_CALL(SCIPaddSol(self._scip, solution.sol, &stored)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddSolFree(__pyx_v_self->_scip, (&__pyx_v_solution->sol), (&__pyx_v_stored))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3427 * """ * cdef SCIP_Bool stored * if free: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPaddSolFree(self._scip, &solution.sol, &stored)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3430 * PY_SCIP_CALL(SCIPaddSolFree(self._scip, &solution.sol, &stored)) * else: * PY_SCIP_CALL(SCIPaddSol(self._scip, solution.sol, &stored)) # <<<<<<<<<<<<<< * return stored * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPaddSol(__pyx_v_self->_scip, __pyx_v_solution->sol, (&__pyx_v_stored))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":3431 * else: * PY_SCIP_CALL(SCIPaddSol(self._scip, solution.sol, &stored)) * return stored # <<<<<<<<<<<<<< * * def freeSol(self, Solution solution): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_stored); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3419 * return feasible * * def addSol(self, Solution solution, free=True): # <<<<<<<<<<<<<< * """Try to add a solution to the storage. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.addSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3433 * return stored * * def freeSol(self, Solution solution): # <<<<<<<<<<<<<< * """Free given solution * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_403freeSol(PyObject *__pyx_v_self, PyObject *__pyx_v_solution); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_402freeSol[] = "Free given solution\n\n :param Solution solution: solution to be freed\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_403freeSol(PyObject *__pyx_v_self, PyObject *__pyx_v_solution) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freeSol (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solution), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "solution", 0))) __PYX_ERR(3, 3433, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_402freeSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_v_solution)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_402freeSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_solution) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freeSol", 0); /* "pyscipopt/scip.pyx":3439 * * """ * PY_SCIP_CALL(SCIPfreeSol(self._scip, &solution.sol)) # <<<<<<<<<<<<<< * * def getSols(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfreeSol(__pyx_v_self->_scip, (&__pyx_v_solution->sol))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3433 * return stored * * def freeSol(self, Solution solution): # <<<<<<<<<<<<<< * """Free given solution * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.freeSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3441 * PY_SCIP_CALL(SCIPfreeSol(self._scip, &solution.sol)) * * def getSols(self): # <<<<<<<<<<<<<< * """Retrieve list of all feasible primal solutions stored in the solution storage.""" * cdef SCIP_SOL** _sols */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_405getSols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_404getSols[] = "Retrieve list of all feasible primal solutions stored in the solution storage."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_405getSols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_404getSols(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_404getSols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_SOL **__pyx_v__sols; int __pyx_v_nsols; PyObject *__pyx_v_sols = NULL; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSols", 0); /* "pyscipopt/scip.pyx":3445 * cdef SCIP_SOL** _sols * cdef SCIP_SOL* _sol * _sols = SCIPgetSols(self._scip) # <<<<<<<<<<<<<< * nsols = SCIPgetNSols(self._scip) * sols = [] */ __pyx_v__sols = SCIPgetSols(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3446 * cdef SCIP_SOL* _sol * _sols = SCIPgetSols(self._scip) * nsols = SCIPgetNSols(self._scip) # <<<<<<<<<<<<<< * sols = [] * */ __pyx_v_nsols = SCIPgetNSols(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3447 * _sols = SCIPgetSols(self._scip) * nsols = SCIPgetNSols(self._scip) * sols = [] # <<<<<<<<<<<<<< * * for i in range(nsols): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sols = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3449 * sols = [] * * for i in range(nsols): # <<<<<<<<<<<<<< * sols.append(Solution.create(_sols[i])) * */ __pyx_t_2 = __pyx_v_nsols; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pyscipopt/scip.pyx":3450 * * for i in range(nsols): * sols.append(Solution.create(_sols[i])) # <<<<<<<<<<<<<< * * return sols */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create((__pyx_v__sols[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_sols, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pyscipopt/scip.pyx":3452 * sols.append(Solution.create(_sols[i])) * * return sols # <<<<<<<<<<<<<< * * def getBestSol(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_sols); __pyx_r = __pyx_v_sols; goto __pyx_L0; /* "pyscipopt/scip.pyx":3441 * PY_SCIP_CALL(SCIPfreeSol(self._scip, &solution.sol)) * * def getSols(self): # <<<<<<<<<<<<<< * """Retrieve list of all feasible primal solutions stored in the solution storage.""" * cdef SCIP_SOL** _sols */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getSols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sols); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3454 * return sols * * def getBestSol(self): # <<<<<<<<<<<<<< * """Retrieve currently best known feasible primal solution.""" * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_407getBestSol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_406getBestSol[] = "Retrieve currently best known feasible primal solution."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_407getBestSol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBestSol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_406getBestSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_406getBestSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBestSol", 0); /* "pyscipopt/scip.pyx":3456 * def getBestSol(self): * """Retrieve currently best known feasible primal solution.""" * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) # <<<<<<<<<<<<<< * return self._bestSol * */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(SCIPgetBestSol(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Solution))))) __PYX_ERR(3, 3456, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_bestSol); __Pyx_DECREF(((PyObject *)__pyx_v_self->_bestSol)); __pyx_v_self->_bestSol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3457 * """Retrieve currently best known feasible primal solution.""" * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) * return self._bestSol # <<<<<<<<<<<<<< * * def getSolObjVal(self, Solution sol, original=True): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_bestSol)); __pyx_r = ((PyObject *)__pyx_v_self->_bestSol); goto __pyx_L0; /* "pyscipopt/scip.pyx":3454 * return sols * * def getBestSol(self): # <<<<<<<<<<<<<< * """Retrieve currently best known feasible primal solution.""" * self._bestSol = Solution.create(SCIPgetBestSol(self._scip)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getBestSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3459 * return self._bestSol * * def getSolObjVal(self, Solution sol, original=True): # <<<<<<<<<<<<<< * """Retrieve the objective value of the solution. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_409getSolObjVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_408getSolObjVal[] = "Retrieve the objective value of the solution.\n\n :param Solution sol: solution\n :param original: objective value in original space (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_409getSolObjVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = 0; PyObject *__pyx_v_original = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSolObjVal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sol,&__pyx_n_s_original,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sol)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_original); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getSolObjVal") < 0)) __PYX_ERR(3, 3459, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_original = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getSolObjVal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3459, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getSolObjVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "sol", 0))) __PYX_ERR(3, 3459, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_408getSolObjVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_sol, __pyx_v_original); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_408getSolObjVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol, PyObject *__pyx_v_original) { PyObject *__pyx_v_objval = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolObjVal", 0); __Pyx_INCREF((PyObject *)__pyx_v_sol); /* "pyscipopt/scip.pyx":3466 * * """ * if sol == None: # <<<<<<<<<<<<<< * sol = Solution.create(NULL) * if original: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_sol), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3466, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pyscipopt/scip.pyx":3467 * """ * if sol == None: * sol = Solution.create(NULL) # <<<<<<<<<<<<<< * if original: * objval = SCIPgetSolOrigObj(self._scip, sol.sol) */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Solution))))) __PYX_ERR(3, 3467, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_sol, ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1)); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3466 * * """ * if sol == None: # <<<<<<<<<<<<<< * sol = Solution.create(NULL) * if original: */ } /* "pyscipopt/scip.pyx":3468 * if sol == None: * sol = Solution.create(NULL) * if original: # <<<<<<<<<<<<<< * objval = SCIPgetSolOrigObj(self._scip, sol.sol) * else: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_original); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3468, __pyx_L1_error) if (__pyx_t_2) { /* "pyscipopt/scip.pyx":3469 * sol = Solution.create(NULL) * if original: * objval = SCIPgetSolOrigObj(self._scip, sol.sol) # <<<<<<<<<<<<<< * else: * objval = SCIPgetSolTransObj(self._scip, sol.sol) */ __pyx_t_1 = PyFloat_FromDouble(SCIPgetSolOrigObj(__pyx_v_self->_scip, __pyx_v_sol->sol)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_objval = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3468 * if sol == None: * sol = Solution.create(NULL) * if original: # <<<<<<<<<<<<<< * objval = SCIPgetSolOrigObj(self._scip, sol.sol) * else: */ goto __pyx_L4; } /* "pyscipopt/scip.pyx":3471 * objval = SCIPgetSolOrigObj(self._scip, sol.sol) * else: * objval = SCIPgetSolTransObj(self._scip, sol.sol) # <<<<<<<<<<<<<< * return objval * */ /*else*/ { __pyx_t_1 = PyFloat_FromDouble(SCIPgetSolTransObj(__pyx_v_self->_scip, __pyx_v_sol->sol)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_objval = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "pyscipopt/scip.pyx":3472 * else: * objval = SCIPgetSolTransObj(self._scip, sol.sol) * return objval # <<<<<<<<<<<<<< * * def getObjVal(self, original=True): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objval); __pyx_r = __pyx_v_objval; goto __pyx_L0; /* "pyscipopt/scip.pyx":3459 * return self._bestSol * * def getSolObjVal(self, Solution sol, original=True): # <<<<<<<<<<<<<< * """Retrieve the objective value of the solution. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getSolObjVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_objval); __Pyx_XDECREF((PyObject *)__pyx_v_sol); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3474 * return objval * * def getObjVal(self, original=True): # <<<<<<<<<<<<<< * """Retrieve the objective value of value of best solution. * Can only be called after solving is completed. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_411getObjVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_410getObjVal[] = "Retrieve the objective value of value of best solution.\n Can only be called after solving is completed.\n\n :param original: objective value in original space (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_411getObjVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_original = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObjVal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_original,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_original); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getObjVal") < 0)) __PYX_ERR(3, 3474, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_original = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getObjVal", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3474, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getObjVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_410getObjVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_original); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_410getObjVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_original) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getObjVal", 0); /* "pyscipopt/scip.pyx":3481 * * """ * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * return self.getSolObjVal(self._bestSol, original) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getStage); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_SOLVING); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 3481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":3482 * """ * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") # <<<<<<<<<<<<<< * return self.getSolObjVal(self._bestSol, original) * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3482, __pyx_L1_error) /* "pyscipopt/scip.pyx":3481 * * """ * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * return self.getSolObjVal(self._bestSol, original) */ } /* "pyscipopt/scip.pyx":3483 * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") * return self.getSolObjVal(self._bestSol, original) # <<<<<<<<<<<<<< * * def getSolVal(self, Solution sol, Variable var): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getSolObjVal); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self->_bestSol), __pyx_v_original}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3483, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self->_bestSol), __pyx_v_original}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3483, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->_bestSol)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_bestSol)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self->_bestSol)); __Pyx_INCREF(__pyx_v_original); __Pyx_GIVEREF(__pyx_v_original); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_original); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3474 * return objval * * def getObjVal(self, original=True): # <<<<<<<<<<<<<< * """Retrieve the objective value of value of best solution. * Can only be called after solving is completed. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.getObjVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3485 * return self.getSolObjVal(self._bestSol, original) * * def getSolVal(self, Solution sol, Variable var): # <<<<<<<<<<<<<< * """Retrieve value of given variable in the given solution or in * the LP/pseudo solution if sol == None */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_413getSolVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_412getSolVal[] = "Retrieve value of given variable in the given solution or in\n the LP/pseudo solution if sol == None\n\n :param Solution sol: solution\n :param Variable var: variable to query the value of\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_413getSolVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol = 0; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSolVal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sol,&__pyx_n_s_var,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sol)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getSolVal", 1, 2, 2, 1); __PYX_ERR(3, 3485, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getSolVal") < 0)) __PYX_ERR(3, 3485, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)values[0]); __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getSolVal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3485, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getSolVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sol), __pyx_ptype_9pyscipopt_4scip_Solution, 1, "sol", 0))) __PYX_ERR(3, 3485, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3485, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_412getSolVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_sol, __pyx_v_var); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_412getSolVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Solution *__pyx_v_sol, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolVal", 0); __Pyx_INCREF((PyObject *)__pyx_v_sol); /* "pyscipopt/scip.pyx":3493 * * """ * if sol == None: # <<<<<<<<<<<<<< * sol = Solution.create(NULL) * return SCIPgetSolVal(self._scip, sol.sol, var.scip_var) */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_sol), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3493, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3493, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pyscipopt/scip.pyx":3494 * """ * if sol == None: * sol = Solution.create(NULL) # <<<<<<<<<<<<<< * return SCIPgetSolVal(self._scip, sol.sol, var.scip_var) * */ __pyx_t_1 = __pyx_f_9pyscipopt_4scip_8Solution_create(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Solution))))) __PYX_ERR(3, 3494, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_sol, ((struct __pyx_obj_9pyscipopt_4scip_Solution *)__pyx_t_1)); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3493 * * """ * if sol == None: # <<<<<<<<<<<<<< * sol = Solution.create(NULL) * return SCIPgetSolVal(self._scip, sol.sol, var.scip_var) */ } /* "pyscipopt/scip.pyx":3495 * if sol == None: * sol = Solution.create(NULL) * return SCIPgetSolVal(self._scip, sol.sol, var.scip_var) # <<<<<<<<<<<<<< * * def getVal(self, Variable var): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetSolVal(__pyx_v_self->_scip, __pyx_v_sol->sol, __pyx_v_var->scip_var)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3485 * return self.getSolObjVal(self._bestSol, original) * * def getSolVal(self, Solution sol, Variable var): # <<<<<<<<<<<<<< * """Retrieve value of given variable in the given solution or in * the LP/pseudo solution if sol == None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getSolVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sol); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3497 * return SCIPgetSolVal(self._scip, sol.sol, var.scip_var) * * def getVal(self, Variable var): # <<<<<<<<<<<<<< * """Retrieve the value of the best known solution. * Can only be called after solving is completed. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_415getVal(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_414getVal[] = "Retrieve the value of the best known solution.\n Can only be called after solving is completed.\n\n :param Variable var: variable to query the value of\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_415getVal(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVal (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3497, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_414getVal(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_414getVal(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVal", 0); /* "pyscipopt/scip.pyx":3504 * * """ * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * return self.getSolVal(self._bestSol, var) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getStage); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_SOLVING); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 3504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":3505 * """ * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") # <<<<<<<<<<<<<< * return self.getSolVal(self._bestSol, var) * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3505, __pyx_L1_error) /* "pyscipopt/scip.pyx":3504 * * """ * if not self.getStage() >= SCIP_STAGE_SOLVING: # <<<<<<<<<<<<<< * raise Warning("method cannot be called before problem is solved") * return self.getSolVal(self._bestSol, var) */ } /* "pyscipopt/scip.pyx":3506 * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") * return self.getSolVal(self._bestSol, var) # <<<<<<<<<<<<<< * * def getPrimalbound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getSolVal); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self->_bestSol), ((PyObject *)__pyx_v_var)}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self->_bestSol), ((PyObject *)__pyx_v_var)}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->_bestSol)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_bestSol)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self->_bestSol)); __Pyx_INCREF(((PyObject *)__pyx_v_var)); __Pyx_GIVEREF(((PyObject *)__pyx_v_var)); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_var)); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3497 * return SCIPgetSolVal(self._scip, sol.sol, var.scip_var) * * def getVal(self, Variable var): # <<<<<<<<<<<<<< * """Retrieve the value of the best known solution. * Can only be called after solving is completed. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.getVal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3508 * return self.getSolVal(self._bestSol, var) * * def getPrimalbound(self): # <<<<<<<<<<<<<< * """Retrieve the best primal bound.""" * return SCIPgetPrimalbound(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_417getPrimalbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_416getPrimalbound[] = "Retrieve the best primal bound."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_417getPrimalbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPrimalbound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_416getPrimalbound(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_416getPrimalbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPrimalbound", 0); /* "pyscipopt/scip.pyx":3510 * def getPrimalbound(self): * """Retrieve the best primal bound.""" * return SCIPgetPrimalbound(self._scip) # <<<<<<<<<<<<<< * * def getDualbound(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetPrimalbound(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3508 * return self.getSolVal(self._bestSol, var) * * def getPrimalbound(self): # <<<<<<<<<<<<<< * """Retrieve the best primal bound.""" * return SCIPgetPrimalbound(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getPrimalbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3512 * return SCIPgetPrimalbound(self._scip) * * def getDualbound(self): # <<<<<<<<<<<<<< * """Retrieve the best dual bound.""" * return SCIPgetDualbound(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_419getDualbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_418getDualbound[] = "Retrieve the best dual bound."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_419getDualbound(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDualbound (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_418getDualbound(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_418getDualbound(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDualbound", 0); /* "pyscipopt/scip.pyx":3514 * def getDualbound(self): * """Retrieve the best dual bound.""" * return SCIPgetDualbound(self._scip) # <<<<<<<<<<<<<< * * def getDualboundRoot(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetDualbound(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3512 * return SCIPgetPrimalbound(self._scip) * * def getDualbound(self): # <<<<<<<<<<<<<< * """Retrieve the best dual bound.""" * return SCIPgetDualbound(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getDualbound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3516 * return SCIPgetDualbound(self._scip) * * def getDualboundRoot(self): # <<<<<<<<<<<<<< * """Retrieve the best root dual bound.""" * return SCIPgetDualboundRoot(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_421getDualboundRoot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_420getDualboundRoot[] = "Retrieve the best root dual bound."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_421getDualboundRoot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDualboundRoot (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_420getDualboundRoot(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_420getDualboundRoot(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDualboundRoot", 0); /* "pyscipopt/scip.pyx":3518 * def getDualboundRoot(self): * """Retrieve the best root dual bound.""" * return SCIPgetDualboundRoot(self._scip) # <<<<<<<<<<<<<< * * def writeName(self, Variable var): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPgetDualboundRoot(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3516 * return SCIPgetDualbound(self._scip) * * def getDualboundRoot(self): # <<<<<<<<<<<<<< * """Retrieve the best root dual bound.""" * return SCIPgetDualboundRoot(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getDualboundRoot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3520 * return SCIPgetDualboundRoot(self._scip) * * def writeName(self, Variable var): # <<<<<<<<<<<<<< * """Write the name of the variable to the std out. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_423writeName(PyObject *__pyx_v_self, PyObject *__pyx_v_var); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_422writeName[] = "Write the name of the variable to the std out.\n\n :param Variable var: variable\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_423writeName(PyObject *__pyx_v_self, PyObject *__pyx_v_var) { int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeName (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3520, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_422writeName(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_var)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_422writeName(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeName", 0); /* "pyscipopt/scip.pyx":3526 * * """ * PY_SCIP_CALL(SCIPwriteVarName(self._scip, NULL, var.scip_var, False)) # <<<<<<<<<<<<<< * * def getStage(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPwriteVarName(__pyx_v_self->_scip, NULL, __pyx_v_var->scip_var, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3520 * return SCIPgetDualboundRoot(self._scip) * * def writeName(self, Variable var): # <<<<<<<<<<<<<< * """Write the name of the variable to the std out. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.writeName", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3528 * PY_SCIP_CALL(SCIPwriteVarName(self._scip, NULL, var.scip_var, False)) * * def getStage(self): # <<<<<<<<<<<<<< * """Retrieve current SCIP stage""" * return SCIPgetStage(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_425getStage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_424getStage[] = "Retrieve current SCIP stage"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_425getStage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getStage (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_424getStage(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_424getStage(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getStage", 0); /* "pyscipopt/scip.pyx":3530 * def getStage(self): * """Retrieve current SCIP stage""" * return SCIPgetStage(self._scip) # <<<<<<<<<<<<<< * * def getStatus(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_STAGE(SCIPgetStage(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3528 * PY_SCIP_CALL(SCIPwriteVarName(self._scip, NULL, var.scip_var, False)) * * def getStage(self): # <<<<<<<<<<<<<< * """Retrieve current SCIP stage""" * return SCIPgetStage(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getStage", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3532 * return SCIPgetStage(self._scip) * * def getStatus(self): # <<<<<<<<<<<<<< * """Retrieve solution status.""" * cdef SCIP_STATUS stat = SCIPgetStatus(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_427getStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_426getStatus[] = "Retrieve solution status."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_427getStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getStatus (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_426getStatus(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_426getStatus(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_STATUS __pyx_v_stat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getStatus", 0); /* "pyscipopt/scip.pyx":3534 * def getStatus(self): * """Retrieve solution status.""" * cdef SCIP_STATUS stat = SCIPgetStatus(self._scip) # <<<<<<<<<<<<<< * if stat == SCIP_STATUS_OPTIMAL: * return "optimal" */ __pyx_v_stat = SCIPgetStatus(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3535 * """Retrieve solution status.""" * cdef SCIP_STATUS stat = SCIPgetStatus(self._scip) * if stat == SCIP_STATUS_OPTIMAL: # <<<<<<<<<<<<<< * return "optimal" * elif stat == SCIP_STATUS_TIMELIMIT: */ switch (__pyx_v_stat) { case SCIP_STATUS_OPTIMAL: /* "pyscipopt/scip.pyx":3536 * cdef SCIP_STATUS stat = SCIPgetStatus(self._scip) * if stat == SCIP_STATUS_OPTIMAL: * return "optimal" # <<<<<<<<<<<<<< * elif stat == SCIP_STATUS_TIMELIMIT: * return "timelimit" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_optimal); __pyx_r = __pyx_n_u_optimal; goto __pyx_L0; /* "pyscipopt/scip.pyx":3535 * """Retrieve solution status.""" * cdef SCIP_STATUS stat = SCIPgetStatus(self._scip) * if stat == SCIP_STATUS_OPTIMAL: # <<<<<<<<<<<<<< * return "optimal" * elif stat == SCIP_STATUS_TIMELIMIT: */ break; case SCIP_STATUS_TIMELIMIT: /* "pyscipopt/scip.pyx":3538 * return "optimal" * elif stat == SCIP_STATUS_TIMELIMIT: * return "timelimit" # <<<<<<<<<<<<<< * elif stat == SCIP_STATUS_INFEASIBLE: * return "infeasible" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_timelimit); __pyx_r = __pyx_n_u_timelimit; goto __pyx_L0; /* "pyscipopt/scip.pyx":3537 * if stat == SCIP_STATUS_OPTIMAL: * return "optimal" * elif stat == SCIP_STATUS_TIMELIMIT: # <<<<<<<<<<<<<< * return "timelimit" * elif stat == SCIP_STATUS_INFEASIBLE: */ break; case SCIP_STATUS_INFEASIBLE: /* "pyscipopt/scip.pyx":3540 * return "timelimit" * elif stat == SCIP_STATUS_INFEASIBLE: * return "infeasible" # <<<<<<<<<<<<<< * elif stat == SCIP_STATUS_UNBOUNDED: * return "unbounded" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_infeasible); __pyx_r = __pyx_n_u_infeasible; goto __pyx_L0; /* "pyscipopt/scip.pyx":3539 * elif stat == SCIP_STATUS_TIMELIMIT: * return "timelimit" * elif stat == SCIP_STATUS_INFEASIBLE: # <<<<<<<<<<<<<< * return "infeasible" * elif stat == SCIP_STATUS_UNBOUNDED: */ break; case SCIP_STATUS_UNBOUNDED: /* "pyscipopt/scip.pyx":3542 * return "infeasible" * elif stat == SCIP_STATUS_UNBOUNDED: * return "unbounded" # <<<<<<<<<<<<<< * elif stat == SCIP_STATUS_USERINTERRUPT: * return "userinterrupt" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_unbounded); __pyx_r = __pyx_n_u_unbounded; goto __pyx_L0; /* "pyscipopt/scip.pyx":3541 * elif stat == SCIP_STATUS_INFEASIBLE: * return "infeasible" * elif stat == SCIP_STATUS_UNBOUNDED: # <<<<<<<<<<<<<< * return "unbounded" * elif stat == SCIP_STATUS_USERINTERRUPT: */ break; case SCIP_STATUS_USERINTERRUPT: /* "pyscipopt/scip.pyx":3544 * return "unbounded" * elif stat == SCIP_STATUS_USERINTERRUPT: * return "userinterrupt" # <<<<<<<<<<<<<< * else: * return "unknown" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_userinterrupt); __pyx_r = __pyx_n_u_userinterrupt; goto __pyx_L0; /* "pyscipopt/scip.pyx":3543 * elif stat == SCIP_STATUS_UNBOUNDED: * return "unbounded" * elif stat == SCIP_STATUS_USERINTERRUPT: # <<<<<<<<<<<<<< * return "userinterrupt" * else: */ break; default: /* "pyscipopt/scip.pyx":3546 * return "userinterrupt" * else: * return "unknown" # <<<<<<<<<<<<<< * * def getObjectiveSense(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_unknown); __pyx_r = __pyx_n_u_unknown; goto __pyx_L0; break; } /* "pyscipopt/scip.pyx":3532 * return SCIPgetStage(self._scip) * * def getStatus(self): # <<<<<<<<<<<<<< * """Retrieve solution status.""" * cdef SCIP_STATUS stat = SCIPgetStatus(self._scip) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3548 * return "unknown" * * def getObjectiveSense(self): # <<<<<<<<<<<<<< * """Retrieve objective sense.""" * cdef SCIP_OBJSENSE sense = SCIPgetObjsense(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_429getObjectiveSense(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_428getObjectiveSense[] = "Retrieve objective sense."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_429getObjectiveSense(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObjectiveSense (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_428getObjectiveSense(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_428getObjectiveSense(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_OBJSENSE __pyx_v_sense; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getObjectiveSense", 0); /* "pyscipopt/scip.pyx":3550 * def getObjectiveSense(self): * """Retrieve objective sense.""" * cdef SCIP_OBJSENSE sense = SCIPgetObjsense(self._scip) # <<<<<<<<<<<<<< * if sense == SCIP_OBJSENSE_MAXIMIZE: * return "maximize" */ __pyx_v_sense = SCIPgetObjsense(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3551 * """Retrieve objective sense.""" * cdef SCIP_OBJSENSE sense = SCIPgetObjsense(self._scip) * if sense == SCIP_OBJSENSE_MAXIMIZE: # <<<<<<<<<<<<<< * return "maximize" * elif sense == SCIP_OBJSENSE_MINIMIZE: */ switch (__pyx_v_sense) { case SCIP_OBJSENSE_MAXIMIZE: /* "pyscipopt/scip.pyx":3552 * cdef SCIP_OBJSENSE sense = SCIPgetObjsense(self._scip) * if sense == SCIP_OBJSENSE_MAXIMIZE: * return "maximize" # <<<<<<<<<<<<<< * elif sense == SCIP_OBJSENSE_MINIMIZE: * return "minimize" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_maximize); __pyx_r = __pyx_n_u_maximize; goto __pyx_L0; /* "pyscipopt/scip.pyx":3551 * """Retrieve objective sense.""" * cdef SCIP_OBJSENSE sense = SCIPgetObjsense(self._scip) * if sense == SCIP_OBJSENSE_MAXIMIZE: # <<<<<<<<<<<<<< * return "maximize" * elif sense == SCIP_OBJSENSE_MINIMIZE: */ break; case SCIP_OBJSENSE_MINIMIZE: /* "pyscipopt/scip.pyx":3554 * return "maximize" * elif sense == SCIP_OBJSENSE_MINIMIZE: * return "minimize" # <<<<<<<<<<<<<< * else: * return "unknown" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_minimize); __pyx_r = __pyx_n_u_minimize; goto __pyx_L0; /* "pyscipopt/scip.pyx":3553 * if sense == SCIP_OBJSENSE_MAXIMIZE: * return "maximize" * elif sense == SCIP_OBJSENSE_MINIMIZE: # <<<<<<<<<<<<<< * return "minimize" * else: */ break; default: /* "pyscipopt/scip.pyx":3556 * return "minimize" * else: * return "unknown" # <<<<<<<<<<<<<< * * def catchEvent(self, eventtype, Eventhdlr eventhdlr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_unknown); __pyx_r = __pyx_n_u_unknown; goto __pyx_L0; break; } /* "pyscipopt/scip.pyx":3548 * return "unknown" * * def getObjectiveSense(self): # <<<<<<<<<<<<<< * """Retrieve objective sense.""" * cdef SCIP_OBJSENSE sense = SCIPgetObjsense(self._scip) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3558 * return "unknown" * * def catchEvent(self, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """catches a global (not variable or row dependent) event""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_431catchEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_430catchEvent[] = "catches a global (not variable or row dependent) event"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_431catchEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_eventtype = 0; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("catchEvent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eventtype,&__pyx_n_s_eventhdlr,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventtype)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("catchEvent", 1, 2, 2, 1); __PYX_ERR(3, 3558, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "catchEvent") < 0)) __PYX_ERR(3, 3558, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_eventtype = values[0]; __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("catchEvent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3558, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.catchEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 3558, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_430catchEvent(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_eventtype, __pyx_v_eventhdlr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_430catchEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr) { SCIP_EVENTHDLR *__pyx_v__eventhdlr; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_EVENTTYPE __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("catchEvent", 0); /* "pyscipopt/scip.pyx":3561 * """catches a global (not variable or row dependent) event""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":3562 * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) # <<<<<<<<<<<<<< * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_eventhdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_eventhdlr->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3563 * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) # <<<<<<<<<<<<<< * else: * raise Warning("event handler not found") */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3563, __pyx_L1_error) __pyx_v__eventhdlr = SCIPfindEventhdlr(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3561 * """catches a global (not variable or row dependent) event""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3565 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcatchEvent(self._scip, eventtype, _eventhdlr, NULL, NULL)) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3565, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3566 * else: * raise Warning("event handler not found") * PY_SCIP_CALL(SCIPcatchEvent(self._scip, eventtype, _eventhdlr, NULL, NULL)) # <<<<<<<<<<<<<< * * def dropEvent(self, eventtype, Eventhdlr eventhdlr): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = ((SCIP_EVENTTYPE)__Pyx_PyInt_As_SCIP_EVENTTYPE(__pyx_v_eventtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3566, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcatchEvent(__pyx_v_self->_scip, __pyx_t_7, __pyx_v__eventhdlr, NULL, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3558 * return "unknown" * * def catchEvent(self, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """catches a global (not variable or row dependent) event""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.catchEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3568 * PY_SCIP_CALL(SCIPcatchEvent(self._scip, eventtype, _eventhdlr, NULL, NULL)) * * def dropEvent(self, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """drops a global event (stops to track event)""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_433dropEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_432dropEvent[] = "drops a global event (stops to track event)"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_433dropEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_eventtype = 0; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dropEvent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eventtype,&__pyx_n_s_eventhdlr,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventtype)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dropEvent", 1, 2, 2, 1); __PYX_ERR(3, 3568, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dropEvent") < 0)) __PYX_ERR(3, 3568, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_eventtype = values[0]; __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dropEvent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3568, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.dropEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 3568, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_432dropEvent(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_eventtype, __pyx_v_eventhdlr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_432dropEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr) { SCIP_EVENTHDLR *__pyx_v__eventhdlr; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_EVENTTYPE __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dropEvent", 0); /* "pyscipopt/scip.pyx":3571 * """drops a global event (stops to track event)""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":3572 * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) # <<<<<<<<<<<<<< * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_eventhdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_eventhdlr->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3573 * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) # <<<<<<<<<<<<<< * else: * raise Warning("event handler not found") */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3573, __pyx_L1_error) __pyx_v__eventhdlr = SCIPfindEventhdlr(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3571 * """drops a global event (stops to track event)""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3575 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPdropEvent(self._scip, eventtype, _eventhdlr, NULL, -1)) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3575, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3576 * else: * raise Warning("event handler not found") * PY_SCIP_CALL(SCIPdropEvent(self._scip, eventtype, _eventhdlr, NULL, -1)) # <<<<<<<<<<<<<< * * def catchVarEvent(self, Variable var, eventtype, Eventhdlr eventhdlr): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = ((SCIP_EVENTTYPE)__Pyx_PyInt_As_SCIP_EVENTTYPE(__pyx_v_eventtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3576, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPdropEvent(__pyx_v_self->_scip, __pyx_t_7, __pyx_v__eventhdlr, NULL, -1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3568 * PY_SCIP_CALL(SCIPcatchEvent(self._scip, eventtype, _eventhdlr, NULL, NULL)) * * def dropEvent(self, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """drops a global event (stops to track event)""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.dropEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3578 * PY_SCIP_CALL(SCIPdropEvent(self._scip, eventtype, _eventhdlr, NULL, -1)) * * def catchVarEvent(self, Variable var, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """catches an objective value or domain change event on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_435catchVarEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_434catchVarEvent[] = "catches an objective value or domain change event on the given transformed variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_435catchVarEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_eventtype = 0; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("catchVarEvent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_eventtype,&__pyx_n_s_eventhdlr,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("catchVarEvent", 1, 3, 3, 1); __PYX_ERR(3, 3578, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("catchVarEvent", 1, 3, 3, 2); __PYX_ERR(3, 3578, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "catchVarEvent") < 0)) __PYX_ERR(3, 3578, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_eventtype = values[1]; __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("catchVarEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3578, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.catchVarEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3578, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 3578, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_434catchVarEvent(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_eventtype, __pyx_v_eventhdlr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_434catchVarEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr) { SCIP_EVENTHDLR *__pyx_v__eventhdlr; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_EVENTTYPE __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("catchVarEvent", 0); /* "pyscipopt/scip.pyx":3581 * """catches an objective value or domain change event on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":3582 * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) # <<<<<<<<<<<<<< * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_eventhdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_eventhdlr->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3583 * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) # <<<<<<<<<<<<<< * else: * raise Warning("event handler not found") */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3583, __pyx_L1_error) __pyx_v__eventhdlr = SCIPfindEventhdlr(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3581 * """catches an objective value or domain change event on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3585 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcatchVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, NULL)) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3585, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3586 * else: * raise Warning("event handler not found") * PY_SCIP_CALL(SCIPcatchVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, NULL)) # <<<<<<<<<<<<<< * * def dropVarEvent(self, Variable var, eventtype, Eventhdlr eventhdlr): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = ((SCIP_EVENTTYPE)__Pyx_PyInt_As_SCIP_EVENTTYPE(__pyx_v_eventtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3586, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcatchVarEvent(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_7, __pyx_v__eventhdlr, NULL, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3578 * PY_SCIP_CALL(SCIPdropEvent(self._scip, eventtype, _eventhdlr, NULL, -1)) * * def catchVarEvent(self, Variable var, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """catches an objective value or domain change event on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.catchVarEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3588 * PY_SCIP_CALL(SCIPcatchVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, NULL)) * * def dropVarEvent(self, Variable var, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """drops an objective value or domain change event (stops to track event) on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_437dropVarEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_436dropVarEvent[] = "drops an objective value or domain change event (stops to track event) on the given transformed variable"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_437dropVarEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = 0; PyObject *__pyx_v_eventtype = 0; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dropVarEvent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_eventtype,&__pyx_n_s_eventhdlr,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dropVarEvent", 1, 3, 3, 1); __PYX_ERR(3, 3588, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dropVarEvent", 1, 3, 3, 2); __PYX_ERR(3, 3588, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dropVarEvent") < 0)) __PYX_ERR(3, 3588, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_var = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)values[0]); __pyx_v_eventtype = values[1]; __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dropVarEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3588, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.dropVarEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), __pyx_ptype_9pyscipopt_4scip_Variable, 1, "var", 0))) __PYX_ERR(3, 3588, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 3588, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_436dropVarEvent(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_var, __pyx_v_eventtype, __pyx_v_eventhdlr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_436dropVarEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr) { SCIP_EVENTHDLR *__pyx_v__eventhdlr; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_EVENTTYPE __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dropVarEvent", 0); /* "pyscipopt/scip.pyx":3591 * """drops an objective value or domain change event (stops to track event) on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":3592 * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) # <<<<<<<<<<<<<< * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_eventhdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_eventhdlr->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3593 * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) # <<<<<<<<<<<<<< * else: * raise Warning("event handler not found") */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3593, __pyx_L1_error) __pyx_v__eventhdlr = SCIPfindEventhdlr(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3591 * """drops an objective value or domain change event (stops to track event) on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3595 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPdropVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, -1)) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3595, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3596 * else: * raise Warning("event handler not found") * PY_SCIP_CALL(SCIPdropVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, -1)) # <<<<<<<<<<<<<< * * def catchRowEvent(self, Row row, eventtype, Eventhdlr eventhdlr): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = ((SCIP_EVENTTYPE)__Pyx_PyInt_As_SCIP_EVENTTYPE(__pyx_v_eventtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3596, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPdropVarEvent(__pyx_v_self->_scip, __pyx_v_var->scip_var, __pyx_t_7, __pyx_v__eventhdlr, NULL, -1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3588 * PY_SCIP_CALL(SCIPcatchVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, NULL)) * * def dropVarEvent(self, Variable var, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """drops an objective value or domain change event (stops to track event) on the given transformed variable""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.dropVarEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3598 * PY_SCIP_CALL(SCIPdropVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, -1)) * * def catchRowEvent(self, Row row, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """catches a row coefficient, constant, or side change event on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_439catchRowEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_438catchRowEvent[] = "catches a row coefficient, constant, or side change event on the given row"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_439catchRowEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row = 0; PyObject *__pyx_v_eventtype = 0; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("catchRowEvent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_eventtype,&__pyx_n_s_eventhdlr,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("catchRowEvent", 1, 3, 3, 1); __PYX_ERR(3, 3598, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("catchRowEvent", 1, 3, 3, 2); __PYX_ERR(3, 3598, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "catchRowEvent") < 0)) __PYX_ERR(3, 3598, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_row = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_eventtype = values[1]; __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("catchRowEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3598, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.catchRowEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 3598, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 3598, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_438catchRowEvent(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_row, __pyx_v_eventtype, __pyx_v_eventhdlr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_438catchRowEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr) { SCIP_EVENTHDLR *__pyx_v__eventhdlr; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_EVENTTYPE __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("catchRowEvent", 0); /* "pyscipopt/scip.pyx":3601 * """catches a row coefficient, constant, or side change event on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":3602 * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) # <<<<<<<<<<<<<< * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_eventhdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_eventhdlr->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3603 * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) # <<<<<<<<<<<<<< * else: * raise Warning("event handler not found") */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3603, __pyx_L1_error) __pyx_v__eventhdlr = SCIPfindEventhdlr(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3601 * """catches a row coefficient, constant, or side change event on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3605 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcatchRowEvent(self._scip, row.scip_row, eventtype, _eventhdlr, NULL, NULL)) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3605, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3606 * else: * raise Warning("event handler not found") * PY_SCIP_CALL(SCIPcatchRowEvent(self._scip, row.scip_row, eventtype, _eventhdlr, NULL, NULL)) # <<<<<<<<<<<<<< * * def dropRowEvent(self, Row row, eventtype, Eventhdlr eventhdlr): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = ((SCIP_EVENTTYPE)__Pyx_PyInt_As_SCIP_EVENTTYPE(__pyx_v_eventtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3606, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcatchRowEvent(__pyx_v_self->_scip, __pyx_v_row->scip_row, __pyx_t_7, __pyx_v__eventhdlr, NULL, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3598 * PY_SCIP_CALL(SCIPdropVarEvent(self._scip, var.scip_var, eventtype, _eventhdlr, NULL, -1)) * * def catchRowEvent(self, Row row, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """catches a row coefficient, constant, or side change event on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.catchRowEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3608 * PY_SCIP_CALL(SCIPcatchRowEvent(self._scip, row.scip_row, eventtype, _eventhdlr, NULL, NULL)) * * def dropRowEvent(self, Row row, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """drops a row coefficient, constant, or side change event (stops to track event) on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_441dropRowEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_440dropRowEvent[] = "drops a row coefficient, constant, or side change event (stops to track event) on the given row"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_441dropRowEvent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row = 0; PyObject *__pyx_v_eventtype = 0; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dropRowEvent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_eventtype,&__pyx_n_s_eventhdlr,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dropRowEvent", 1, 3, 3, 1); __PYX_ERR(3, 3608, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eventhdlr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dropRowEvent", 1, 3, 3, 2); __PYX_ERR(3, 3608, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dropRowEvent") < 0)) __PYX_ERR(3, 3608, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_row = ((struct __pyx_obj_9pyscipopt_4scip_Row *)values[0]); __pyx_v_eventtype = values[1]; __pyx_v_eventhdlr = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dropRowEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3608, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.dropRowEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row), __pyx_ptype_9pyscipopt_4scip_Row, 1, "row", 0))) __PYX_ERR(3, 3608, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr, 1, "eventhdlr", 0))) __PYX_ERR(3, 3608, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_440dropRowEvent(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_row, __pyx_v_eventtype, __pyx_v_eventhdlr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_440dropRowEvent(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Row *__pyx_v_row, PyObject *__pyx_v_eventtype, struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v_eventhdlr) { SCIP_EVENTHDLR *__pyx_v__eventhdlr; PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char const *__pyx_t_6; SCIP_EVENTTYPE __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dropRowEvent", 0); /* "pyscipopt/scip.pyx":3611 * """drops a row coefficient, constant, or side change event (stops to track event) on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_eventhdlr), __pyx_ptype_9pyscipopt_4scip_Eventhdlr); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "pyscipopt/scip.pyx":3612 * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) # <<<<<<<<<<<<<< * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_eventhdlr->name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_eventhdlr->name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_n = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3613 * if isinstance(eventhdlr, Eventhdlr): * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) # <<<<<<<<<<<<<< * else: * raise Warning("event handler not found") */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3613, __pyx_L1_error) __pyx_v__eventhdlr = SCIPfindEventhdlr(__pyx_v_self->_scip, __pyx_t_6); /* "pyscipopt/scip.pyx":3611 * """drops a row coefficient, constant, or side change event (stops to track event) on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr * if isinstance(eventhdlr, Eventhdlr): # <<<<<<<<<<<<<< * n = str_conversion(eventhdlr.name) * _eventhdlr = SCIPfindEventhdlr(self._scip, n) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3615 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPdropRowEvent(self._scip, row.scip_row, eventtype, _eventhdlr, NULL, -1)) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Warning, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3615, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3616 * else: * raise Warning("event handler not found") * PY_SCIP_CALL(SCIPdropRowEvent(self._scip, row.scip_row, eventtype, _eventhdlr, NULL, -1)) # <<<<<<<<<<<<<< * * # Statistic Methods */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = ((SCIP_EVENTTYPE)__Pyx_PyInt_As_SCIP_EVENTTYPE(__pyx_v_eventtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3616, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPdropRowEvent(__pyx_v_self->_scip, __pyx_v_row->scip_row, __pyx_t_7, __pyx_v__eventhdlr, NULL, -1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3608 * PY_SCIP_CALL(SCIPcatchRowEvent(self._scip, row.scip_row, eventtype, _eventhdlr, NULL, NULL)) * * def dropRowEvent(self, Row row, eventtype, Eventhdlr eventhdlr): # <<<<<<<<<<<<<< * """drops a row coefficient, constant, or side change event (stops to track event) on the given row""" * cdef SCIP_EVENTHDLR* _eventhdlr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.dropRowEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3620 * # Statistic Methods * * def printStatistics(self): # <<<<<<<<<<<<<< * """Print statistics.""" * PY_SCIP_CALL(SCIPprintStatistics(self._scip, NULL)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_443printStatistics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_442printStatistics[] = "Print statistics."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_443printStatistics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printStatistics (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_442printStatistics(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_442printStatistics(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("printStatistics", 0); /* "pyscipopt/scip.pyx":3622 * def printStatistics(self): * """Print statistics.""" * PY_SCIP_CALL(SCIPprintStatistics(self._scip, NULL)) # <<<<<<<<<<<<<< * * def writeStatistics(self, filename="origprob.stats"): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintStatistics(__pyx_v_self->_scip, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3620 * # Statistic Methods * * def printStatistics(self): # <<<<<<<<<<<<<< * """Print statistics.""" * PY_SCIP_CALL(SCIPprintStatistics(self._scip, NULL)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.printStatistics", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3624 * PY_SCIP_CALL(SCIPprintStatistics(self._scip, NULL)) * * def writeStatistics(self, filename="origprob.stats"): # <<<<<<<<<<<<<< * """Write statistics to a file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_445writeStatistics(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_444writeStatistics[] = "Write statistics to a file.\n\n Keyword arguments:\n filename -- name of the output file\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_445writeStatistics(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeStatistics (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_kp_u_origprob_stats); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeStatistics") < 0)) __PYX_ERR(3, 3624, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_filename = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("writeStatistics", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3624, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.writeStatistics", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_444writeStatistics(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_filename); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_444writeStatistics(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename) { PyObject *__pyx_v_f = NULL; FILE *__pyx_v_cfile; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeStatistics", 0); /* "pyscipopt/scip.pyx":3632 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile)) */ /*with:*/ { __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename); __Pyx_INCREF(__pyx_n_u_w); __Pyx_GIVEREF(__pyx_n_u_w); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_w); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3632, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3632, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { __pyx_v_f = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":3633 * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: * cfile = fdopen(f.fileno(), "w") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3633, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3633, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3633, __pyx_L7_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cfile = fdopen(__pyx_t_9, ((char const *)"w")); /* "pyscipopt/scip.pyx":3634 * with open(filename, "w") as f: * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile)) # <<<<<<<<<<<<<< * * def getNLPs(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3634, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPprintStatistics(__pyx_v_self->_scip, __pyx_v_cfile)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3634, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3634, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":3632 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile)) */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("pyscipopt.scip.Model.writeStatistics", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(3, 3632, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3632, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3632, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(3, 3632, __pyx_L9_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __PYX_ERR(3, 3632, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__95, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "pyscipopt/scip.pyx":3624 * PY_SCIP_CALL(SCIPprintStatistics(self._scip, NULL)) * * def writeStatistics(self, filename="origprob.stats"): # <<<<<<<<<<<<<< * """Write statistics to a file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.writeStatistics", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3636 * PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile)) * * def getNLPs(self): # <<<<<<<<<<<<<< * """gets total number of LPs solved so far""" * return SCIPgetNLPs(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_447getNLPs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_446getNLPs[] = "gets total number of LPs solved so far"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_447getNLPs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNLPs (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_446getNLPs(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_446getNLPs(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNLPs", 0); /* "pyscipopt/scip.pyx":3638 * def getNLPs(self): * """gets total number of LPs solved so far""" * return SCIPgetNLPs(self._scip) # <<<<<<<<<<<<<< * * # Verbosity Methods */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNLPs(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3636 * PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile)) * * def getNLPs(self): # <<<<<<<<<<<<<< * """gets total number of LPs solved so far""" * return SCIPgetNLPs(self._scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNLPs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3642 * # Verbosity Methods * * def hideOutput(self, quiet = True): # <<<<<<<<<<<<<< * """Hide the output. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_449hideOutput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_448hideOutput[] = "Hide the output.\n\n :param quiet: hide output? (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_449hideOutput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_quiet = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hideOutput (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_quiet,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_quiet); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hideOutput") < 0)) __PYX_ERR(3, 3642, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_quiet = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("hideOutput", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3642, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.hideOutput", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_448hideOutput(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_quiet); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_448hideOutput(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_quiet) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_Bool __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("hideOutput", 0); /* "pyscipopt/scip.pyx":3648 * * """ * SCIPsetMessagehdlrQuiet(self._scip, quiet) # <<<<<<<<<<<<<< * * # Output Methods */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_quiet); if (unlikely((__pyx_t_1 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3648, __pyx_L1_error) SCIPsetMessagehdlrQuiet(__pyx_v_self->_scip, __pyx_t_1); /* "pyscipopt/scip.pyx":3642 * # Verbosity Methods * * def hideOutput(self, quiet = True): # <<<<<<<<<<<<<< * """Hide the output. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.hideOutput", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3652 * # Output Methods * * def redirectOutput(self): # <<<<<<<<<<<<<< * """Send output to python instead of terminal.""" * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_451redirectOutput(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_450redirectOutput[] = "Send output to python instead of terminal."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_451redirectOutput(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("redirectOutput (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_450redirectOutput(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_450redirectOutput(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_MESSAGEHDLR *__pyx_v_myMessageHandler; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("redirectOutput", 0); /* "pyscipopt/scip.pyx":3657 * cdef SCIP_MESSAGEHDLR *myMessageHandler * * PY_SCIP_CALL(SCIPmessagehdlrCreate(&myMessageHandler, False, NULL, False, relayMessage, relayMessage, relayMessage, NULL, NULL)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetMessagehdlr(self._scip, myMessageHandler)) * SCIPmessageSetErrorPrinting(relayErrorMessage, NULL) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPmessagehdlrCreate((&__pyx_v_myMessageHandler), 0, NULL, 0, __pyx_f_9pyscipopt_4scip_relayMessage, __pyx_f_9pyscipopt_4scip_relayMessage, __pyx_f_9pyscipopt_4scip_relayMessage, NULL, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3658 * * PY_SCIP_CALL(SCIPmessagehdlrCreate(&myMessageHandler, False, NULL, False, relayMessage, relayMessage, relayMessage, NULL, NULL)) * PY_SCIP_CALL(SCIPsetMessagehdlr(self._scip, myMessageHandler)) # <<<<<<<<<<<<<< * SCIPmessageSetErrorPrinting(relayErrorMessage, NULL) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetMessagehdlr(__pyx_v_self->_scip, __pyx_v_myMessageHandler)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3659 * PY_SCIP_CALL(SCIPmessagehdlrCreate(&myMessageHandler, False, NULL, False, relayMessage, relayMessage, relayMessage, NULL, NULL)) * PY_SCIP_CALL(SCIPsetMessagehdlr(self._scip, myMessageHandler)) * SCIPmessageSetErrorPrinting(relayErrorMessage, NULL) # <<<<<<<<<<<<<< * * # Parameter Methods */ SCIPmessageSetErrorPrinting(__pyx_f_9pyscipopt_4scip_relayErrorMessage, NULL); /* "pyscipopt/scip.pyx":3652 * # Output Methods * * def redirectOutput(self): # <<<<<<<<<<<<<< * """Send output to python instead of terminal.""" * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.redirectOutput", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3663 * # Parameter Methods * * def setBoolParam(self, name, value): # <<<<<<<<<<<<<< * """Set a boolean-valued parameter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_453setBoolParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_452setBoolParam[] = "Set a boolean-valued parameter.\n\n :param name: name of parameter\n :param value: value of parameter\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_453setBoolParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBoolParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setBoolParam", 1, 2, 2, 1); __PYX_ERR(3, 3663, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBoolParam") < 0)) __PYX_ERR(3, 3663, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBoolParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3663, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setBoolParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_452setBoolParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_452setBoolParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; SCIP_Bool __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBoolParam", 0); /* "pyscipopt/scip.pyx":3670 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, value)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3671 * """ * n = str_conversion(name) * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, value)) # <<<<<<<<<<<<<< * * def setIntParam(self, name, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3671, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3671, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetBoolParam(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3663 * # Parameter Methods * * def setBoolParam(self, name, value): # <<<<<<<<<<<<<< * """Set a boolean-valued parameter. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setBoolParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3673 * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, value)) * * def setIntParam(self, name, value): # <<<<<<<<<<<<<< * """Set an int-valued parameter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_455setIntParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_454setIntParam[] = "Set an int-valued parameter.\n\n :param name: name of parameter\n :param value: value of parameter\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_455setIntParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setIntParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntParam", 1, 2, 2, 1); __PYX_ERR(3, 3673, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIntParam") < 0)) __PYX_ERR(3, 3673, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setIntParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3673, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setIntParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_454setIntParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_454setIntParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setIntParam", 0); /* "pyscipopt/scip.pyx":3680 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, value)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3681 * """ * n = str_conversion(name) * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, value)) # <<<<<<<<<<<<<< * * def setLongintParam(self, name, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3681, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3681, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetIntParam(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3673 * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, value)) * * def setIntParam(self, name, value): # <<<<<<<<<<<<<< * """Set an int-valued parameter. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setIntParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3683 * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, value)) * * def setLongintParam(self, name, value): # <<<<<<<<<<<<<< * """Set a long-valued parameter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_457setLongintParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_456setLongintParam[] = "Set a long-valued parameter.\n\n :param name: name of parameter\n :param value: value of parameter\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_457setLongintParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLongintParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setLongintParam", 1, 2, 2, 1); __PYX_ERR(3, 3683, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLongintParam") < 0)) __PYX_ERR(3, 3683, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setLongintParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3683, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setLongintParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_456setLongintParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_456setLongintParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; SCIP_Longint __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setLongintParam", 0); /* "pyscipopt/scip.pyx":3690 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, value)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3691 * """ * n = str_conversion(name) * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, value)) # <<<<<<<<<<<<<< * * def setRealParam(self, name, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3691, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_As_SCIP_Longint(__pyx_v_value); if (unlikely((__pyx_t_5 == ((SCIP_Longint)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3691, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetLongintParam(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3683 * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, value)) * * def setLongintParam(self, name, value): # <<<<<<<<<<<<<< * """Set a long-valued parameter. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setLongintParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3693 * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, value)) * * def setRealParam(self, name, value): # <<<<<<<<<<<<<< * """Set a real-valued parameter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_459setRealParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_458setRealParam[] = "Set a real-valued parameter.\n\n :param name: name of parameter\n :param value: value of parameter\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_459setRealParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRealParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setRealParam", 1, 2, 2, 1); __PYX_ERR(3, 3693, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRealParam") < 0)) __PYX_ERR(3, 3693, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRealParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3693, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setRealParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_458setRealParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_458setRealParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; SCIP_Real __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRealParam", 0); /* "pyscipopt/scip.pyx":3700 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, value)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3701 * """ * n = str_conversion(name) * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, value)) # <<<<<<<<<<<<<< * * def setCharParam(self, name, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3701, __pyx_L1_error) __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_5 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3701, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetRealParam(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3693 * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, value)) * * def setRealParam(self, name, value): # <<<<<<<<<<<<<< * """Set a real-valued parameter. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setRealParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3703 * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, value)) * * def setCharParam(self, name, value): # <<<<<<<<<<<<<< * """Set a char-valued parameter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_461setCharParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_460setCharParam[] = "Set a char-valued parameter.\n\n :param name: name of parameter\n :param value: value of parameter\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_461setCharParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCharParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setCharParam", 1, 2, 2, 1); __PYX_ERR(3, 3703, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCharParam") < 0)) __PYX_ERR(3, 3703, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCharParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3703, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setCharParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_460setCharParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_460setCharParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; long __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCharParam", 0); /* "pyscipopt/scip.pyx":3710 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, ord(value))) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3711 * """ * n = str_conversion(name) * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, ord(value))) # <<<<<<<<<<<<<< * * def setStringParam(self, name, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3711, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_Ord(__pyx_v_value); if (unlikely(__pyx_t_5 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(3, 3711, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetCharParam(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3703 * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, value)) * * def setCharParam(self, name, value): # <<<<<<<<<<<<<< * """Set a char-valued parameter. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setCharParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3713 * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, ord(value))) * * def setStringParam(self, name, value): # <<<<<<<<<<<<<< * """Set a string-valued parameter. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_463setStringParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_462setStringParam[] = "Set a string-valued parameter.\n\n :param name: name of parameter\n :param value: value of parameter\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_463setStringParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setStringParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setStringParam", 1, 2, 2, 1); __PYX_ERR(3, 3713, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setStringParam") < 0)) __PYX_ERR(3, 3713, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setStringParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3713, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setStringParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_462setStringParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_462setStringParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; char *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setStringParam", 0); /* "pyscipopt/scip.pyx":3720 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * v = str_conversion(value) * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, v)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3721 * """ * n = str_conversion(name) * v = str_conversion(value) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, v)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_v = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3722 * n = str_conversion(name) * v = str_conversion(value) * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, v)) # <<<<<<<<<<<<<< * * def setParam(self, name, value): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3722, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_v); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 3722, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetStringParam(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3713 * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, ord(value))) * * def setStringParam(self, name, value): # <<<<<<<<<<<<<< * """Set a string-valued parameter. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setStringParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3724 * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, v)) * * def setParam(self, name, value): # <<<<<<<<<<<<<< * """Set a parameter with value in int, bool, real, long, char or str. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_465setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_464setParam[] = "Set a parameter with value in int, bool, real, long, char or str.\n\n :param name: name of parameter\n :param value: value of parameter\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_465setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setParam (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setParam", 1, 2, 2, 1); __PYX_ERR(3, 3724, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setParam") < 0)) __PYX_ERR(3, 3724, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setParam", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3724, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_464setParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_464setParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { SCIP_PARAM *__pyx_v_param; PyObject *__pyx_v_n = NULL; SCIP_PARAMTYPE __pyx_v_paramtype; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; int __pyx_t_5; char *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; SCIP_Longint __pyx_t_9; double __pyx_t_10; char __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setParam", 0); /* "pyscipopt/scip.pyx":3732 * cdef SCIP_PARAM* param * * n = str_conversion(name) # <<<<<<<<<<<<<< * param = SCIPgetParam(self._scip, n) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3733 * * n = str_conversion(name) * param = SCIPgetParam(self._scip, n) # <<<<<<<<<<<<<< * * if param == NULL: */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3733, __pyx_L1_error) __pyx_v_param = SCIPgetParam(__pyx_v_self->_scip, __pyx_t_4); /* "pyscipopt/scip.pyx":3735 * param = SCIPgetParam(self._scip, n) * * if param == NULL: # <<<<<<<<<<<<<< * raise KeyError("Not a valid parameter name") * */ __pyx_t_5 = ((__pyx_v_param == NULL) != 0); if (unlikely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":3736 * * if param == NULL: * raise KeyError("Not a valid parameter name") # <<<<<<<<<<<<<< * * paramtype = SCIPparamGetType(param) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 3736, __pyx_L1_error) /* "pyscipopt/scip.pyx":3735 * param = SCIPgetParam(self._scip, n) * * if param == NULL: # <<<<<<<<<<<<<< * raise KeyError("Not a valid parameter name") * */ } /* "pyscipopt/scip.pyx":3738 * raise KeyError("Not a valid parameter name") * * paramtype = SCIPparamGetType(param) # <<<<<<<<<<<<<< * * if paramtype == SCIP_PARAMTYPE_BOOL: */ __pyx_v_paramtype = SCIPparamGetType(__pyx_v_param); /* "pyscipopt/scip.pyx":3740 * paramtype = SCIPparamGetType(param) * * if paramtype == SCIP_PARAMTYPE_BOOL: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, bool(int(value)))) * elif paramtype == SCIP_PARAMTYPE_INT: */ switch (__pyx_v_paramtype) { case SCIP_PARAMTYPE_BOOL: /* "pyscipopt/scip.pyx":3741 * * if paramtype == SCIP_PARAMTYPE_BOOL: * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, bool(int(value)))) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_INT: * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, int(value))) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3741, __pyx_L1_error) __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 3741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetBoolParam(__pyx_v_self->_scip, __pyx_t_6, (!(!__pyx_t_5)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3740 * paramtype = SCIPparamGetType(param) * * if paramtype == SCIP_PARAMTYPE_BOOL: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, bool(int(value)))) * elif paramtype == SCIP_PARAMTYPE_INT: */ break; case SCIP_PARAMTYPE_INT: /* "pyscipopt/scip.pyx":3743 * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, bool(int(value)))) * elif paramtype == SCIP_PARAMTYPE_INT: * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, int(value))) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_LONGINT: * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, int(value))) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3743, __pyx_L1_error) __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetIntParam(__pyx_v_self->_scip, __pyx_t_6, __pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3742 * if paramtype == SCIP_PARAMTYPE_BOOL: * PY_SCIP_CALL(SCIPsetBoolParam(self._scip, n, bool(int(value)))) * elif paramtype == SCIP_PARAMTYPE_INT: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, int(value))) * elif paramtype == SCIP_PARAMTYPE_LONGINT: */ break; case SCIP_PARAMTYPE_LONGINT: /* "pyscipopt/scip.pyx":3745 * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, int(value))) * elif paramtype == SCIP_PARAMTYPE_LONGINT: * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, int(value))) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_REAL: * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, float(value))) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3745, __pyx_L1_error) __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyInt_As_SCIP_Longint(__pyx_t_3); if (unlikely((__pyx_t_9 == ((SCIP_Longint)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3745, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetLongintParam(__pyx_v_self->_scip, __pyx_t_6, __pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3744 * elif paramtype == SCIP_PARAMTYPE_INT: * PY_SCIP_CALL(SCIPsetIntParam(self._scip, n, int(value))) * elif paramtype == SCIP_PARAMTYPE_LONGINT: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, int(value))) * elif paramtype == SCIP_PARAMTYPE_REAL: */ break; case SCIP_PARAMTYPE_REAL: /* "pyscipopt/scip.pyx":3747 * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, int(value))) * elif paramtype == SCIP_PARAMTYPE_REAL: * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, float(value))) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_CHAR: * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, value)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3747, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_AsDouble(__pyx_v_value); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3747, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetRealParam(__pyx_v_self->_scip, __pyx_t_6, __pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3746 * elif paramtype == SCIP_PARAMTYPE_LONGINT: * PY_SCIP_CALL(SCIPsetLongintParam(self._scip, n, int(value))) * elif paramtype == SCIP_PARAMTYPE_REAL: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, float(value))) * elif paramtype == SCIP_PARAMTYPE_CHAR: */ break; case SCIP_PARAMTYPE_CHAR: /* "pyscipopt/scip.pyx":3749 * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, float(value))) * elif paramtype == SCIP_PARAMTYPE_CHAR: * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, value)) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_STRING: * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, value)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3749, __pyx_L1_error) __pyx_t_11 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_11 == (char)-1) && PyErr_Occurred())) __PYX_ERR(3, 3749, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetCharParam(__pyx_v_self->_scip, __pyx_t_6, __pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3748 * elif paramtype == SCIP_PARAMTYPE_REAL: * PY_SCIP_CALL(SCIPsetRealParam(self._scip, n, float(value))) * elif paramtype == SCIP_PARAMTYPE_CHAR: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, value)) * elif paramtype == SCIP_PARAMTYPE_STRING: */ break; case SCIP_PARAMTYPE_STRING: /* "pyscipopt/scip.pyx":3751 * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, value)) * elif paramtype == SCIP_PARAMTYPE_STRING: * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, value)) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_n); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3751, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(3, 3751, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetStringParam(__pyx_v_self->_scip, __pyx_t_6, __pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3750 * elif paramtype == SCIP_PARAMTYPE_CHAR: * PY_SCIP_CALL(SCIPsetCharParam(self._scip, n, value)) * elif paramtype == SCIP_PARAMTYPE_STRING: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, value)) * */ break; default: break; } /* "pyscipopt/scip.pyx":3724 * PY_SCIP_CALL(SCIPsetStringParam(self._scip, n, v)) * * def setParam(self, name, value): # <<<<<<<<<<<<<< * """Set a parameter with value in int, bool, real, long, char or str. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.setParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3754 * * * def getParam(self, name): # <<<<<<<<<<<<<< * """Get the value of a parameter of type * int, bool, real, long, char or str. */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_467getParam(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_466getParam[] = "Get the value of a parameter of type\n int, bool, real, long, char or str.\n\n :param name: name of parameter\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_467getParam(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getParam (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_466getParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_466getParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name) { SCIP_PARAM *__pyx_v_param; PyObject *__pyx_v_n = NULL; SCIP_PARAMTYPE __pyx_v_paramtype; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getParam", 0); /* "pyscipopt/scip.pyx":3762 * cdef SCIP_PARAM* param * * n = str_conversion(name) # <<<<<<<<<<<<<< * param = SCIPgetParam(self._scip, n) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3763 * * n = str_conversion(name) * param = SCIPgetParam(self._scip, n) # <<<<<<<<<<<<<< * * if param == NULL: */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3763, __pyx_L1_error) __pyx_v_param = SCIPgetParam(__pyx_v_self->_scip, __pyx_t_4); /* "pyscipopt/scip.pyx":3765 * param = SCIPgetParam(self._scip, n) * * if param == NULL: # <<<<<<<<<<<<<< * raise KeyError("Not a valid parameter name") * */ __pyx_t_5 = ((__pyx_v_param == NULL) != 0); if (unlikely(__pyx_t_5)) { /* "pyscipopt/scip.pyx":3766 * * if param == NULL: * raise KeyError("Not a valid parameter name") # <<<<<<<<<<<<<< * * paramtype = SCIPparamGetType(param) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 3766, __pyx_L1_error) /* "pyscipopt/scip.pyx":3765 * param = SCIPgetParam(self._scip, n) * * if param == NULL: # <<<<<<<<<<<<<< * raise KeyError("Not a valid parameter name") * */ } /* "pyscipopt/scip.pyx":3768 * raise KeyError("Not a valid parameter name") * * paramtype = SCIPparamGetType(param) # <<<<<<<<<<<<<< * * if paramtype == SCIP_PARAMTYPE_BOOL: */ __pyx_v_paramtype = SCIPparamGetType(__pyx_v_param); /* "pyscipopt/scip.pyx":3770 * paramtype = SCIPparamGetType(param) * * if paramtype == SCIP_PARAMTYPE_BOOL: # <<<<<<<<<<<<<< * return SCIPparamGetBool(param) * elif paramtype == SCIP_PARAMTYPE_INT: */ switch (__pyx_v_paramtype) { case SCIP_PARAMTYPE_BOOL: /* "pyscipopt/scip.pyx":3771 * * if paramtype == SCIP_PARAMTYPE_BOOL: * return SCIPparamGetBool(param) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_INT: * return SCIPparamGetInt(param) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(SCIPparamGetBool(__pyx_v_param)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3770 * paramtype = SCIPparamGetType(param) * * if paramtype == SCIP_PARAMTYPE_BOOL: # <<<<<<<<<<<<<< * return SCIPparamGetBool(param) * elif paramtype == SCIP_PARAMTYPE_INT: */ break; case SCIP_PARAMTYPE_INT: /* "pyscipopt/scip.pyx":3773 * return SCIPparamGetBool(param) * elif paramtype == SCIP_PARAMTYPE_INT: * return SCIPparamGetInt(param) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_LONGINT: * return SCIPparamGetLongint(param) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPparamGetInt(__pyx_v_param)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3772 * if paramtype == SCIP_PARAMTYPE_BOOL: * return SCIPparamGetBool(param) * elif paramtype == SCIP_PARAMTYPE_INT: # <<<<<<<<<<<<<< * return SCIPparamGetInt(param) * elif paramtype == SCIP_PARAMTYPE_LONGINT: */ break; case SCIP_PARAMTYPE_LONGINT: /* "pyscipopt/scip.pyx":3775 * return SCIPparamGetInt(param) * elif paramtype == SCIP_PARAMTYPE_LONGINT: * return SCIPparamGetLongint(param) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_REAL: * return SCIPparamGetReal(param) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_Longint(SCIPparamGetLongint(__pyx_v_param)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3774 * elif paramtype == SCIP_PARAMTYPE_INT: * return SCIPparamGetInt(param) * elif paramtype == SCIP_PARAMTYPE_LONGINT: # <<<<<<<<<<<<<< * return SCIPparamGetLongint(param) * elif paramtype == SCIP_PARAMTYPE_REAL: */ break; case SCIP_PARAMTYPE_REAL: /* "pyscipopt/scip.pyx":3777 * return SCIPparamGetLongint(param) * elif paramtype == SCIP_PARAMTYPE_REAL: * return SCIPparamGetReal(param) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_CHAR: * return chr(SCIPparamGetChar(param)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(SCIPparamGetReal(__pyx_v_param)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3776 * elif paramtype == SCIP_PARAMTYPE_LONGINT: * return SCIPparamGetLongint(param) * elif paramtype == SCIP_PARAMTYPE_REAL: # <<<<<<<<<<<<<< * return SCIPparamGetReal(param) * elif paramtype == SCIP_PARAMTYPE_CHAR: */ break; case SCIP_PARAMTYPE_CHAR: /* "pyscipopt/scip.pyx":3779 * return SCIPparamGetReal(param) * elif paramtype == SCIP_PARAMTYPE_CHAR: * return chr(SCIPparamGetChar(param)) # <<<<<<<<<<<<<< * elif paramtype == SCIP_PARAMTYPE_STRING: * return SCIPparamGetString(param) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_char(SCIPparamGetChar(__pyx_v_param)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3778 * elif paramtype == SCIP_PARAMTYPE_REAL: * return SCIPparamGetReal(param) * elif paramtype == SCIP_PARAMTYPE_CHAR: # <<<<<<<<<<<<<< * return chr(SCIPparamGetChar(param)) * elif paramtype == SCIP_PARAMTYPE_STRING: */ break; case SCIP_PARAMTYPE_STRING: /* "pyscipopt/scip.pyx":3781 * return chr(SCIPparamGetChar(param)) * elif paramtype == SCIP_PARAMTYPE_STRING: * return SCIPparamGetString(param) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_FromString(SCIPparamGetString(__pyx_v_param)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3780 * elif paramtype == SCIP_PARAMTYPE_CHAR: * return chr(SCIPparamGetChar(param)) * elif paramtype == SCIP_PARAMTYPE_STRING: # <<<<<<<<<<<<<< * return SCIPparamGetString(param) * */ break; default: break; } /* "pyscipopt/scip.pyx":3754 * * * def getParam(self, name): # <<<<<<<<<<<<<< * """Get the value of a parameter of type * int, bool, real, long, char or str. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyscipopt.scip.Model.getParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3784 * * * def readParams(self, file): # <<<<<<<<<<<<<< * """Read an external parameter file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_469readParams(PyObject *__pyx_v_self, PyObject *__pyx_v_file); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_468readParams[] = "Read an external parameter file.\n\n :param file: file to be read\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_469readParams(PyObject *__pyx_v_self, PyObject *__pyx_v_file) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readParams (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_468readParams(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_file)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_468readParams(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_file) { PyObject *__pyx_v_absfile = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readParams", 0); /* "pyscipopt/scip.pyx":3790 * * """ * absfile = str_conversion(abspath(file)) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreadParams(self._scip, absfile)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_abspath); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_file) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_file); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_absfile = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3791 * """ * absfile = str_conversion(abspath(file)) * PY_SCIP_CALL(SCIPreadParams(self._scip, absfile)) # <<<<<<<<<<<<<< * * def writeParams(self, filename='param.set', comments = True, onlychanged = True): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_absfile); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 3791, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreadParams(__pyx_v_self->_scip, __pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3784 * * * def readParams(self, file): # <<<<<<<<<<<<<< * """Read an external parameter file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.readParams", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_absfile); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3793 * PY_SCIP_CALL(SCIPreadParams(self._scip, absfile)) * * def writeParams(self, filename='param.set', comments = True, onlychanged = True): # <<<<<<<<<<<<<< * """Write parameter settings to an external file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_471writeParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_470writeParams[] = "Write parameter settings to an external file.\n\n :param filename: file to be written (Default value = 'param.set')\n :param comments: write parameter descriptions as comments? (Default value = True)\n :param onlychanged: write only modified parameters (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_471writeParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_comments = 0; PyObject *__pyx_v_onlychanged = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writeParams (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_comments,&__pyx_n_s_onlychanged,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)__pyx_kp_u_param_set); values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comments); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_onlychanged); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeParams") < 0)) __PYX_ERR(3, 3793, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_filename = values[0]; __pyx_v_comments = values[1]; __pyx_v_onlychanged = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("writeParams", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3793, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.writeParams", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_470writeParams(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_filename, __pyx_v_comments, __pyx_v_onlychanged); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_470writeParams(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_comments, PyObject *__pyx_v_onlychanged) { PyObject *__pyx_v_fn = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char *__pyx_t_4; SCIP_Bool __pyx_t_5; SCIP_Bool __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("writeParams", 0); /* "pyscipopt/scip.pyx":3801 * * """ * fn = str_conversion(filename) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPwriteParams(self._scip, fn, comments, onlychanged)) * print('wrote parameter settings to file ' + filename) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fn = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3802 * """ * fn = str_conversion(filename) * PY_SCIP_CALL(SCIPwriteParams(self._scip, fn, comments, onlychanged)) # <<<<<<<<<<<<<< * print('wrote parameter settings to file ' + filename) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3802, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_comments); if (unlikely((__pyx_t_5 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3802, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_onlychanged); if (unlikely((__pyx_t_6 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3802, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPwriteParams(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3803 * fn = str_conversion(filename) * PY_SCIP_CALL(SCIPwriteParams(self._scip, fn, comments, onlychanged)) * print('wrote parameter settings to file ' + filename) # <<<<<<<<<<<<<< * * def resetParam(self, name): */ __pyx_t_1 = PyNumber_Add(__pyx_kp_u_wrote_parameter_settings_to_file, __pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3793 * PY_SCIP_CALL(SCIPreadParams(self._scip, absfile)) * * def writeParams(self, filename='param.set', comments = True, onlychanged = True): # <<<<<<<<<<<<<< * """Write parameter settings to an external file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.writeParams", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fn); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3805 * print('wrote parameter settings to file ' + filename) * * def resetParam(self, name): # <<<<<<<<<<<<<< * """Reset parameter setting to its default value * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_473resetParam(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_472resetParam[] = "Reset parameter setting to its default value\n\n :param name: parameter to reset\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_473resetParam(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resetParam (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_472resetParam(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_472resetParam(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resetParam", 0); /* "pyscipopt/scip.pyx":3811 * * """ * n = str_conversion(name) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPresetParam(self._scip, n)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3812 * """ * n = str_conversion(name) * PY_SCIP_CALL(SCIPresetParam(self._scip, n)) # <<<<<<<<<<<<<< * * def resetParams(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_n); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3812, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPresetParam(__pyx_v_self->_scip, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3805 * print('wrote parameter settings to file ' + filename) * * def resetParam(self, name): # <<<<<<<<<<<<<< * """Reset parameter setting to its default value * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.resetParam", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3814 * PY_SCIP_CALL(SCIPresetParam(self._scip, n)) * * def resetParams(self): # <<<<<<<<<<<<<< * """Reset parameter settings to their default values""" * PY_SCIP_CALL(SCIPresetParams(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_475resetParams(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_474resetParams[] = "Reset parameter settings to their default values"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_475resetParams(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resetParams (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_474resetParams(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_474resetParams(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resetParams", 0); /* "pyscipopt/scip.pyx":3816 * def resetParams(self): * """Reset parameter settings to their default values""" * PY_SCIP_CALL(SCIPresetParams(self._scip)) # <<<<<<<<<<<<<< * * def setEmphasis(self, paraemphasis, quiet = True): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPresetParams(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3814 * PY_SCIP_CALL(SCIPresetParam(self._scip, n)) * * def resetParams(self): # <<<<<<<<<<<<<< * """Reset parameter settings to their default values""" * PY_SCIP_CALL(SCIPresetParams(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.resetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3818 * PY_SCIP_CALL(SCIPresetParams(self._scip)) * * def setEmphasis(self, paraemphasis, quiet = True): # <<<<<<<<<<<<<< * """Set emphasis settings * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_477setEmphasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_476setEmphasis[] = "Set emphasis settings\n\n :param paraemphasis: emphasis to set\n :param quiet: hide output? (Default value = True)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_477setEmphasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_paraemphasis = 0; PyObject *__pyx_v_quiet = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setEmphasis (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_paraemphasis,&__pyx_n_s_quiet,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paraemphasis)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_quiet); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEmphasis") < 0)) __PYX_ERR(3, 3818, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_paraemphasis = values[0]; __pyx_v_quiet = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setEmphasis", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3818, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setEmphasis", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_476setEmphasis(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_paraemphasis, __pyx_v_quiet); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_476setEmphasis(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_paraemphasis, PyObject *__pyx_v_quiet) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; SCIP_PARAMEMPHASIS __pyx_t_3; SCIP_Bool __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setEmphasis", 0); /* "pyscipopt/scip.pyx":3825 * * """ * PY_SCIP_CALL(SCIPsetEmphasis(self._scip, paraemphasis, quiet)) # <<<<<<<<<<<<<< * * def readProblem(self, file, extension = None): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = ((SCIP_PARAMEMPHASIS)__Pyx_PyInt_As_SCIP_PARAMEMPHASIS(__pyx_v_paraemphasis)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3825, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_quiet); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3825, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetEmphasis(__pyx_v_self->_scip, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3818 * PY_SCIP_CALL(SCIPresetParams(self._scip)) * * def setEmphasis(self, paraemphasis, quiet = True): # <<<<<<<<<<<<<< * """Set emphasis settings * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pyscipopt.scip.Model.setEmphasis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3827 * PY_SCIP_CALL(SCIPsetEmphasis(self._scip, paraemphasis, quiet)) * * def readProblem(self, file, extension = None): # <<<<<<<<<<<<<< * """Read a problem instance from an external file. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_479readProblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_478readProblem[] = "Read a problem instance from an external file.\n\n :param file: file to be read\n :param extension: specify file extension/type (Default value = None)\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_479readProblem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file = 0; PyObject *__pyx_v_extension = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readProblem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file,&__pyx_n_s_extension,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extension); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readProblem") < 0)) __PYX_ERR(3, 3827, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_file = values[0]; __pyx_v_extension = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("readProblem", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3827, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.readProblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_478readProblem(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_file, __pyx_v_extension); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_478readProblem(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_extension) { PyObject *__pyx_v_absfile = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; char *__pyx_t_8; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readProblem", 0); __Pyx_INCREF(__pyx_v_extension); /* "pyscipopt/scip.pyx":3834 * * """ * absfile = str_conversion(abspath(file)) # <<<<<<<<<<<<<< * if extension is None: * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, NULL)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_abspath); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_file) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_file); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_absfile = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3835 * """ * absfile = str_conversion(abspath(file)) * if extension is None: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, NULL)) * else: */ __pyx_t_6 = (__pyx_v_extension == Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { /* "pyscipopt/scip.pyx":3836 * absfile = str_conversion(abspath(file)) * if extension is None: * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, NULL)) # <<<<<<<<<<<<<< * else: * extension = str_conversion(extension) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_absfile); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 3836, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreadProb(__pyx_v_self->_scip, __pyx_t_8, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3835 * """ * absfile = str_conversion(abspath(file)) * if extension is None: # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, NULL)) * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3838 * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, NULL)) * else: * extension = str_conversion(extension) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, extension)) * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_extension) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_extension); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_extension, __pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3839 * else: * extension = str_conversion(extension) * PY_SCIP_CALL(SCIPreadProb(self._scip, absfile, extension)) # <<<<<<<<<<<<<< * * # Counting functions */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_absfile); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 3839, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_extension); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 3839, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPreadProb(__pyx_v_self->_scip, __pyx_t_8, __pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":3827 * PY_SCIP_CALL(SCIPsetEmphasis(self._scip, paraemphasis, quiet)) * * def readProblem(self, file, extension = None): # <<<<<<<<<<<<<< * """Read a problem instance from an external file. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.Model.readProblem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_absfile); __Pyx_XDECREF(__pyx_v_extension); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3843 * # Counting functions * * def count(self): # <<<<<<<<<<<<<< * """Counts the number of feasible points of problem.""" * PY_SCIP_CALL(SCIPcount(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_481count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_480count[] = "Counts the number of feasible points of problem."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_481count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("count (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_480count(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_480count(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("count", 0); /* "pyscipopt/scip.pyx":3845 * def count(self): * """Counts the number of feasible points of problem.""" * PY_SCIP_CALL(SCIPcount(self._scip)) # <<<<<<<<<<<<<< * * def getNCountedSols(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPcount(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3843 * # Counting functions * * def count(self): # <<<<<<<<<<<<<< * """Counts the number of feasible points of problem.""" * PY_SCIP_CALL(SCIPcount(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3847 * PY_SCIP_CALL(SCIPcount(self._scip)) * * def getNCountedSols(self): # <<<<<<<<<<<<<< * """Get number of feasible solution.""" * cdef SCIP_Bool valid */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_483getNCountedSols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_482getNCountedSols[] = "Get number of feasible solution."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_483getNCountedSols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNCountedSols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_482getNCountedSols(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_482getNCountedSols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_Bool __pyx_v_valid; SCIP_Longint __pyx_v_nsols; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNCountedSols", 0); /* "pyscipopt/scip.pyx":3852 * cdef SCIP_Longint nsols * * nsols = SCIPgetNCountedSols(self._scip, &valid) # <<<<<<<<<<<<<< * if not valid: * print('total number of solutions found is not valid!') */ __pyx_v_nsols = SCIPgetNCountedSols(__pyx_v_self->_scip, (&__pyx_v_valid)); /* "pyscipopt/scip.pyx":3853 * * nsols = SCIPgetNCountedSols(self._scip, &valid) * if not valid: # <<<<<<<<<<<<<< * print('total number of solutions found is not valid!') * return nsols */ __pyx_t_1 = ((!(__pyx_v_valid != 0)) != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3854 * nsols = SCIPgetNCountedSols(self._scip, &valid) * if not valid: * print('total number of solutions found is not valid!') # <<<<<<<<<<<<<< * return nsols * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3853 * * nsols = SCIPgetNCountedSols(self._scip, &valid) * if not valid: # <<<<<<<<<<<<<< * print('total number of solutions found is not valid!') * return nsols */ } /* "pyscipopt/scip.pyx":3855 * if not valid: * print('total number of solutions found is not valid!') * return nsols # <<<<<<<<<<<<<< * * def setParamsCountsols(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(__pyx_v_nsols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3847 * PY_SCIP_CALL(SCIPcount(self._scip)) * * def getNCountedSols(self): # <<<<<<<<<<<<<< * """Get number of feasible solution.""" * cdef SCIP_Bool valid */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getNCountedSols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3857 * return nsols * * def setParamsCountsols(self): # <<<<<<<<<<<<<< * """Sets SCIP parameters such that a valid counting process is possible.""" * PY_SCIP_CALL(SCIPsetParamsCountsols(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_485setParamsCountsols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_484setParamsCountsols[] = "Sets SCIP parameters such that a valid counting process is possible."; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_485setParamsCountsols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setParamsCountsols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_484setParamsCountsols(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_484setParamsCountsols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setParamsCountsols", 0); /* "pyscipopt/scip.pyx":3859 * def setParamsCountsols(self): * """Sets SCIP parameters such that a valid counting process is possible.""" * PY_SCIP_CALL(SCIPsetParamsCountsols(self._scip)) # <<<<<<<<<<<<<< * * def freeReoptSolve(self): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPsetParamsCountsols(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3857 * return nsols * * def setParamsCountsols(self): # <<<<<<<<<<<<<< * """Sets SCIP parameters such that a valid counting process is possible.""" * PY_SCIP_CALL(SCIPsetParamsCountsols(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.setParamsCountsols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3861 * PY_SCIP_CALL(SCIPsetParamsCountsols(self._scip)) * * def freeReoptSolve(self): # <<<<<<<<<<<<<< * """Frees all solution process data and prepares for reoptimization""" * PY_SCIP_CALL(SCIPfreeReoptSolve(self._scip)) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_487freeReoptSolve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_486freeReoptSolve[] = "Frees all solution process data and prepares for reoptimization"; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_487freeReoptSolve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freeReoptSolve (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_486freeReoptSolve(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_486freeReoptSolve(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freeReoptSolve", 0); /* "pyscipopt/scip.pyx":3863 * def freeReoptSolve(self): * """Frees all solution process data and prepares for reoptimization""" * PY_SCIP_CALL(SCIPfreeReoptSolve(self._scip)) # <<<<<<<<<<<<<< * * def chgReoptObjective(self, coeffs, sense = 'minimize'): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPfreeReoptSolve(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3861 * PY_SCIP_CALL(SCIPsetParamsCountsols(self._scip)) * * def freeReoptSolve(self): # <<<<<<<<<<<<<< * """Frees all solution process data and prepares for reoptimization""" * PY_SCIP_CALL(SCIPfreeReoptSolve(self._scip)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyscipopt.scip.Model.freeReoptSolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3865 * PY_SCIP_CALL(SCIPfreeReoptSolve(self._scip)) * * def chgReoptObjective(self, coeffs, sense = 'minimize'): # <<<<<<<<<<<<<< * """Establish the objective function as a linear expression. * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_489chgReoptObjective(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_488chgReoptObjective[] = "Establish the objective function as a linear expression.\n\n :param coeffs: the coefficients\n :param sense: the objective sense (Default value = 'minimize')\n\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_489chgReoptObjective(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_coeffs = 0; PyObject *__pyx_v_sense = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chgReoptObjective (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coeffs,&__pyx_n_s_sense,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)__pyx_n_u_minimize); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coeffs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sense); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chgReoptObjective") < 0)) __PYX_ERR(3, 3865, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_coeffs = values[0]; __pyx_v_sense = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chgReoptObjective", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3865, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.chgReoptObjective", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_488chgReoptObjective(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_coeffs, __pyx_v_sense); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_488chgReoptObjective(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_coeffs, PyObject *__pyx_v_sense) { SCIP_OBJSENSE __pyx_v_objsense; SCIP_VAR **__pyx_v__vars; int __pyx_v__nvars; SCIP_Real *__pyx_v__coeffs; int __pyx_v_i; PyObject *__pyx_v_term = NULL; PyObject *__pyx_v_coef = NULL; struct __pyx_obj_9pyscipopt_4scip_Variable *__pyx_v_var = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; SCIP_Real __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chgReoptObjective", 0); /* "pyscipopt/scip.pyx":3875 * cdef SCIP_OBJSENSE objsense * * if sense == "minimize": # <<<<<<<<<<<<<< * objsense = SCIP_OBJSENSE_MINIMIZE * elif sense == "maximize": */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_sense, __pyx_n_u_minimize, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3875, __pyx_L1_error) if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3876 * * if sense == "minimize": * objsense = SCIP_OBJSENSE_MINIMIZE # <<<<<<<<<<<<<< * elif sense == "maximize": * objsense = SCIP_OBJSENSE_MAXIMIZE */ __pyx_v_objsense = SCIP_OBJSENSE_MINIMIZE; /* "pyscipopt/scip.pyx":3875 * cdef SCIP_OBJSENSE objsense * * if sense == "minimize": # <<<<<<<<<<<<<< * objsense = SCIP_OBJSENSE_MINIMIZE * elif sense == "maximize": */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3877 * if sense == "minimize": * objsense = SCIP_OBJSENSE_MINIMIZE * elif sense == "maximize": # <<<<<<<<<<<<<< * objsense = SCIP_OBJSENSE_MAXIMIZE * else: */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_sense, __pyx_n_u_maximize, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3877, __pyx_L1_error) if (likely(__pyx_t_1)) { /* "pyscipopt/scip.pyx":3878 * objsense = SCIP_OBJSENSE_MINIMIZE * elif sense == "maximize": * objsense = SCIP_OBJSENSE_MAXIMIZE # <<<<<<<<<<<<<< * else: * raise Warning("unrecognized optimization sense: %s" % sense) */ __pyx_v_objsense = SCIP_OBJSENSE_MAXIMIZE; /* "pyscipopt/scip.pyx":3877 * if sense == "minimize": * objsense = SCIP_OBJSENSE_MINIMIZE * elif sense == "maximize": # <<<<<<<<<<<<<< * objsense = SCIP_OBJSENSE_MAXIMIZE * else: */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":3880 * objsense = SCIP_OBJSENSE_MAXIMIZE * else: * raise Warning("unrecognized optimization sense: %s" % sense) # <<<<<<<<<<<<<< * * assert isinstance(coeffs, Expr), "given coefficients are not Expr but %s" % coeffs.__class__.__name__ */ /*else*/ { __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unrecognized_optimization_sense, __pyx_v_sense); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_Warning, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3880, __pyx_L1_error) } __pyx_L3:; /* "pyscipopt/scip.pyx":3882 * raise Warning("unrecognized optimization sense: %s" % sense) * * assert isinstance(coeffs, Expr), "given coefficients are not Expr but %s" % coeffs.__class__.__name__ # <<<<<<<<<<<<<< * * if coeffs.degree() > 1: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_coeffs, __pyx_ptype_9pyscipopt_4scip_Expr); if (unlikely(!(__pyx_t_1 != 0))) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_coeffs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_given_coefficients_are_not_Expr, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 3882, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":3884 * assert isinstance(coeffs, Expr), "given coefficients are not Expr but %s" % coeffs.__class__.__name__ * * if coeffs.degree() > 1: # <<<<<<<<<<<<<< * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coeffs, __pyx_n_s_degree); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_1)) { /* "pyscipopt/scip.pyx":3885 * * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") # <<<<<<<<<<<<<< * if coeffs[CONST] != 0.0: * raise ValueError("Constant offsets in objective are not supported!") */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 3885, __pyx_L1_error) /* "pyscipopt/scip.pyx":3884 * assert isinstance(coeffs, Expr), "given coefficients are not Expr but %s" % coeffs.__class__.__name__ * * if coeffs.degree() > 1: # <<<<<<<<<<<<<< * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: */ } /* "pyscipopt/scip.pyx":3886 * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: # <<<<<<<<<<<<<< * raise ValueError("Constant offsets in objective are not supported!") * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONST); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_coeffs, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyFloat_NeObjC(__pyx_t_3, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_1)) { /* "pyscipopt/scip.pyx":3887 * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: * raise ValueError("Constant offsets in objective are not supported!") # <<<<<<<<<<<<<< * * cdef SCIP_VAR** _vars */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(3, 3887, __pyx_L1_error) /* "pyscipopt/scip.pyx":3886 * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: # <<<<<<<<<<<<<< * raise ValueError("Constant offsets in objective are not supported!") * */ } /* "pyscipopt/scip.pyx":3891 * cdef SCIP_VAR** _vars * cdef int _nvars * _vars = SCIPgetOrigVars(self._scip) # <<<<<<<<<<<<<< * _nvars = SCIPgetNOrigVars(self._scip) * _coeffs = <SCIP_Real*> malloc(_nvars * sizeof(SCIP_Real)) */ __pyx_v__vars = SCIPgetOrigVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3892 * cdef int _nvars * _vars = SCIPgetOrigVars(self._scip) * _nvars = SCIPgetNOrigVars(self._scip) # <<<<<<<<<<<<<< * _coeffs = <SCIP_Real*> malloc(_nvars * sizeof(SCIP_Real)) * */ __pyx_v__nvars = SCIPgetNOrigVars(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3893 * _vars = SCIPgetOrigVars(self._scip) * _nvars = SCIPgetNOrigVars(self._scip) * _coeffs = <SCIP_Real*> malloc(_nvars * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * * for i in range(_nvars): */ __pyx_v__coeffs = ((SCIP_Real *)malloc((__pyx_v__nvars * (sizeof(SCIP_Real))))); /* "pyscipopt/scip.pyx":3895 * _coeffs = <SCIP_Real*> malloc(_nvars * sizeof(SCIP_Real)) * * for i in range(_nvars): # <<<<<<<<<<<<<< * _coeffs[i] = 0.0 * */ __pyx_t_5 = __pyx_v__nvars; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pyscipopt/scip.pyx":3896 * * for i in range(_nvars): * _coeffs[i] = 0.0 # <<<<<<<<<<<<<< * * for term, coef in coeffs.terms.items(): */ (__pyx_v__coeffs[__pyx_v_i]) = 0.0; } /* "pyscipopt/scip.pyx":3898 * _coeffs[i] = 0.0 * * for term, coef in coeffs.terms.items(): # <<<<<<<<<<<<<< * # avoid CONST term of Expr * if term != CONST: */ __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_coeffs, __pyx_n_s_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(3, 3898, __pyx_L1_error) } __pyx_t_4 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_9, &__pyx_t_8, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_5); if (unlikely(__pyx_t_6 == 0)) break; if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(3, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3900 * for term, coef in coeffs.terms.items(): * # avoid CONST term of Expr * if term != CONST: # <<<<<<<<<<<<<< * assert len(term) == 1 * var = <Variable>term[0] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CONST); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_term, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 3900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3901 * # avoid CONST term of Expr * if term != CONST: * assert len(term) == 1 # <<<<<<<<<<<<<< * var = <Variable>term[0] * for i in range(_nvars): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_10 = PyObject_Length(__pyx_v_term); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3901, __pyx_L1_error) if (unlikely(!((__pyx_t_10 == 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 3901, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":3902 * if term != CONST: * assert len(term) == 1 * var = <Variable>term[0] # <<<<<<<<<<<<<< * for i in range(_nvars): * if _vars[i] == var.scip_var: */ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_term, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_var, ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3903 * assert len(term) == 1 * var = <Variable>term[0] * for i in range(_nvars): # <<<<<<<<<<<<<< * if _vars[i] == var.scip_var: * _coeffs[i] = coef */ __pyx_t_6 = __pyx_v__nvars; __pyx_t_7 = __pyx_t_6; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pyscipopt/scip.pyx":3904 * var = <Variable>term[0] * for i in range(_nvars): * if _vars[i] == var.scip_var: # <<<<<<<<<<<<<< * _coeffs[i] = coef * */ __pyx_t_1 = (((__pyx_v__vars[__pyx_v_i]) == __pyx_v_var->scip_var) != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3905 * for i in range(_nvars): * if _vars[i] == var.scip_var: * _coeffs[i] = coef # <<<<<<<<<<<<<< * * PY_SCIP_CALL(SCIPchgReoptObjective(self._scip, objsense, _vars, &_coeffs[0], _nvars)) */ __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_v_coef); if (unlikely((__pyx_t_12 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3905, __pyx_L1_error) (__pyx_v__coeffs[__pyx_v_i]) = __pyx_t_12; /* "pyscipopt/scip.pyx":3904 * var = <Variable>term[0] * for i in range(_nvars): * if _vars[i] == var.scip_var: # <<<<<<<<<<<<<< * _coeffs[i] = coef * */ } } /* "pyscipopt/scip.pyx":3900 * for term, coef in coeffs.terms.items(): * # avoid CONST term of Expr * if term != CONST: # <<<<<<<<<<<<<< * assert len(term) == 1 * var = <Variable>term[0] */ } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3907 * _coeffs[i] = coef * * PY_SCIP_CALL(SCIPchgReoptObjective(self._scip, objsense, _vars, &_coeffs[0], _nvars)) # <<<<<<<<<<<<<< * * free(_coeffs) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPchgReoptObjective(__pyx_v_self->_scip, __pyx_v_objsense, __pyx_v__vars, (&(__pyx_v__coeffs[0])), __pyx_v__nvars)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3909 * PY_SCIP_CALL(SCIPchgReoptObjective(self._scip, objsense, _vars, &_coeffs[0], _nvars)) * * free(_coeffs) # <<<<<<<<<<<<<< * * def getVariablePseudocost(self, variable): */ free(__pyx_v__coeffs); /* "pyscipopt/scip.pyx":3865 * PY_SCIP_CALL(SCIPfreeReoptSolve(self._scip)) * * def chgReoptObjective(self, coeffs, sense = 'minimize'): # <<<<<<<<<<<<<< * """Establish the objective function as a linear expression. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pyscipopt.scip.Model.chgReoptObjective", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_term); __Pyx_XDECREF(__pyx_v_coef); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3911 * free(_coeffs) * * def getVariablePseudocost(self, variable): # <<<<<<<<<<<<<< * cdef float ps_up, ps_down * cdef SCIP_VAR* scip_var = (<Variable>variable).scip_var */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_491getVariablePseudocost(PyObject *__pyx_v_self, PyObject *__pyx_v_variable); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_491getVariablePseudocost(PyObject *__pyx_v_self, PyObject *__pyx_v_variable) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVariablePseudocost (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_490getVariablePseudocost(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_variable)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_490getVariablePseudocost(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_variable) { float __pyx_v_ps_up; float __pyx_v_ps_down; SCIP_VAR *__pyx_v_scip_var; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP_VAR *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVariablePseudocost", 0); /* "pyscipopt/scip.pyx":3913 * def getVariablePseudocost(self, variable): * cdef float ps_up, ps_down * cdef SCIP_VAR* scip_var = (<Variable>variable).scip_var # <<<<<<<<<<<<<< * * ps_up = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_UPWARDS) */ __pyx_t_1 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_v_variable)->scip_var; __pyx_v_scip_var = __pyx_t_1; /* "pyscipopt/scip.pyx":3915 * cdef SCIP_VAR* scip_var = (<Variable>variable).scip_var * * ps_up = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_UPWARDS) # <<<<<<<<<<<<<< * ps_down = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_DOWNWARDS) * return ps_up * ps_down */ __pyx_v_ps_up = SCIPgetVarPseudocost(__pyx_v_self->_scip, __pyx_v_scip_var, SCIP_BRANCHDIR_UPWARDS); /* "pyscipopt/scip.pyx":3916 * * ps_up = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_UPWARDS) * ps_down = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_DOWNWARDS) # <<<<<<<<<<<<<< * return ps_up * ps_down * */ __pyx_v_ps_down = SCIPgetVarPseudocost(__pyx_v_self->_scip, __pyx_v_scip_var, SCIP_BRANCHDIR_DOWNWARDS); /* "pyscipopt/scip.pyx":3917 * ps_up = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_UPWARDS) * ps_down = SCIPgetVarPseudocost(self._scip, scip_var, SCIP_BRANCHDIR_DOWNWARDS) * return ps_up * ps_down # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble((__pyx_v_ps_up * __pyx_v_ps_down)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3911 * free(_coeffs) * * def getVariablePseudocost(self, variable): # <<<<<<<<<<<<<< * cdef float ps_up, ps_down * cdef SCIP_VAR* scip_var = (<Variable>variable).scip_var */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getVariablePseudocost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3920 * * * def includeNodesel(self, Nodesel nodesel, name, desc, stdpriority, memsavepriority): # <<<<<<<<<<<<<< * """Include a node selector. * :param Nodesel nodesel: node selector */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_493includeNodesel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9pyscipopt_4scip_5Model_492includeNodesel[] = "Include a node selector.\n :param Nodesel nodesel: node selector\n :param name: name of node selector\n :param desc: description of node selector\n :param stdpriority: priority of the node selector in standard mode\n :param memsavepriority: priority of the node selector in memory saving mode\n "; static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_493includeNodesel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_nodesel = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_stdpriority = 0; PyObject *__pyx_v_memsavepriority = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("includeNodesel (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nodesel,&__pyx_n_s_name,&__pyx_n_s_desc,&__pyx_n_s_stdpriority,&__pyx_n_s_memsavepriority,0}; PyObject* values[5] = {0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodesel)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeNodesel", 1, 5, 5, 1); __PYX_ERR(3, 3920, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeNodesel", 1, 5, 5, 2); __PYX_ERR(3, 3920, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stdpriority)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeNodesel", 1, 5, 5, 3); __PYX_ERR(3, 3920, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memsavepriority)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("includeNodesel", 1, 5, 5, 4); __PYX_ERR(3, 3920, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "includeNodesel") < 0)) __PYX_ERR(3, 3920, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); } __pyx_v_nodesel = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)values[0]); __pyx_v_name = values[1]; __pyx_v_desc = values[2]; __pyx_v_stdpriority = values[3]; __pyx_v_memsavepriority = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("includeNodesel", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3920, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.includeNodesel", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodesel), __pyx_ptype_9pyscipopt_4scip_Nodesel, 1, "nodesel", 0))) __PYX_ERR(3, 3920, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_492includeNodesel(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_nodesel, __pyx_v_name, __pyx_v_desc, __pyx_v_stdpriority, __pyx_v_memsavepriority); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_492includeNodesel(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v_nodesel, PyObject *__pyx_v_name, PyObject *__pyx_v_desc, PyObject *__pyx_v_stdpriority, PyObject *__pyx_v_memsavepriority) { PyObject *__pyx_v_nam = NULL; PyObject *__pyx_v_des = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("includeNodesel", 0); /* "pyscipopt/scip.pyx":3928 * :param memsavepriority: priority of the node selector in memory saving mode * """ * nam = str_conversion(name) # <<<<<<<<<<<<<< * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeNodesel(self._scip, nam, des, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nam = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3929 * """ * nam = str_conversion(name) * des = str_conversion(desc) # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPincludeNodesel(self._scip, nam, des, * stdpriority, memsavepriority, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_str_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_desc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_desc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_des = __pyx_t_1; __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3930 * nam = str_conversion(name) * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeNodesel(self._scip, nam, des, # <<<<<<<<<<<<<< * stdpriority, memsavepriority, * PyNodeselCopy, PyNodeselFree, PyNodeselInit, PyNodeselExit, */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 3930, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_des); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 3930, __pyx_L1_error) /* "pyscipopt/scip.pyx":3931 * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeNodesel(self._scip, nam, des, * stdpriority, memsavepriority, # <<<<<<<<<<<<<< * PyNodeselCopy, PyNodeselFree, PyNodeselInit, PyNodeselExit, * PyNodeselInitsol, PyNodeselExitsol, PyNodeselSelect, PyNodeselComp, */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_stdpriority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3931, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_memsavepriority); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3931, __pyx_L1_error) /* "pyscipopt/scip.pyx":3930 * nam = str_conversion(name) * des = str_conversion(desc) * PY_SCIP_CALL(SCIPincludeNodesel(self._scip, nam, des, # <<<<<<<<<<<<<< * stdpriority, memsavepriority, * PyNodeselCopy, PyNodeselFree, PyNodeselInit, PyNodeselExit, */ __pyx_t_3 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPincludeNodesel(__pyx_v_self->_scip, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_f_9pyscipopt_4scip_PyNodeselCopy, __pyx_f_9pyscipopt_4scip_PyNodeselFree, __pyx_f_9pyscipopt_4scip_PyNodeselInit, __pyx_f_9pyscipopt_4scip_PyNodeselExit, __pyx_f_9pyscipopt_4scip_PyNodeselInitsol, __pyx_f_9pyscipopt_4scip_PyNodeselExitsol, __pyx_f_9pyscipopt_4scip_PyNodeselSelect, __pyx_f_9pyscipopt_4scip_PyNodeselComp, ((SCIP_NODESELDATA *)__pyx_v_nodesel))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":3935 * PyNodeselInitsol, PyNodeselExitsol, PyNodeselSelect, PyNodeselComp, * <SCIP_NODESELDATA*> nodesel)) * nodesel.model = <Model>weakref.proxy(self) # <<<<<<<<<<<<<< * Py_INCREF(nodesel) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_proxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_nodesel->model); __Pyx_DECREF(((PyObject *)__pyx_v_nodesel->model)); __pyx_v_nodesel->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3936 * <SCIP_NODESELDATA*> nodesel)) * nodesel.model = <Model>weakref.proxy(self) * Py_INCREF(nodesel) # <<<<<<<<<<<<<< * * def getMapping(self): */ Py_INCREF(((PyObject *)__pyx_v_nodesel)); /* "pyscipopt/scip.pyx":3920 * * * def includeNodesel(self, Nodesel nodesel, name, desc, stdpriority, memsavepriority): # <<<<<<<<<<<<<< * """Include a node selector. * :param Nodesel nodesel: node selector */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.Model.includeNodesel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nam); __Pyx_XDECREF(__pyx_v_des); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3938 * Py_INCREF(nodesel) * * def getMapping(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef SCIP_COL** cols = SCIPgetLPCols(scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_495getMapping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_495getMapping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMapping (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_494getMapping(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_494getMapping(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP *__pyx_v_scip; SCIP_COL **__pyx_v_cols; int __pyx_v_ncols; int __pyx_v_i; int __pyx_v_col_i; SCIP_VAR *__pyx_v_scip_var; PyObject *__pyx_v_cands = 0; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_varname = NULL; PyObject *__pyx_v_vartype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getMapping", 0); /* "pyscipopt/scip.pyx":3939 * * def getMapping(self): * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * cdef SCIP_COL** cols = SCIPgetLPCols(scip) * cdef int ncols = SCIPgetNLPCols(scip) */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":3940 * def getMapping(self): * cdef SCIP* scip = self._scip * cdef SCIP_COL** cols = SCIPgetLPCols(scip) # <<<<<<<<<<<<<< * cdef int ncols = SCIPgetNLPCols(scip) * cdef int i, col_i */ __pyx_v_cols = SCIPgetLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":3941 * cdef SCIP* scip = self._scip * cdef SCIP_COL** cols = SCIPgetLPCols(scip) * cdef int ncols = SCIPgetNLPCols(scip) # <<<<<<<<<<<<<< * cdef int i, col_i * cdef SCIP_VAR* scip_var */ __pyx_v_ncols = SCIPgetNLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":3945 * cdef SCIP_VAR* scip_var * * cdef dict cands = {} # <<<<<<<<<<<<<< * * for i in range(ncols): */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cands = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3947 * cdef dict cands = {} * * for i in range(ncols): # <<<<<<<<<<<<<< * col_i = SCIPcolGetLPPos(cols[i]) * scip_var = SCIPcolGetVar(cols[i]) */ __pyx_t_3 = __pyx_v_ncols; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pyscipopt/scip.pyx":3948 * * for i in range(ncols): * col_i = SCIPcolGetLPPos(cols[i]) # <<<<<<<<<<<<<< * scip_var = SCIPcolGetVar(cols[i]) * var = Variable.create(scip_var) */ __pyx_v_col_i = SCIPcolGetLPPos((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":3949 * for i in range(ncols): * col_i = SCIPcolGetLPPos(cols[i]) * scip_var = SCIPcolGetVar(cols[i]) # <<<<<<<<<<<<<< * var = Variable.create(scip_var) * varname = var.name */ __pyx_v_scip_var = SCIPcolGetVar((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":3950 * col_i = SCIPcolGetLPPos(cols[i]) * scip_var = SCIPcolGetVar(cols[i]) * var = Variable.create(scip_var) # <<<<<<<<<<<<<< * varname = var.name * vartype = var.vtype() */ __pyx_t_2 = __pyx_f_9pyscipopt_4scip_8Variable_create(__pyx_v_scip_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3951 * scip_var = SCIPcolGetVar(cols[i]) * var = Variable.create(scip_var) * varname = var.name # <<<<<<<<<<<<<< * vartype = var.vtype() * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3952 * var = Variable.create(scip_var) * varname = var.name * vartype = var.vtype() # <<<<<<<<<<<<<< * * if vartype == 'BINARY': */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_vtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_vartype, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3954 * vartype = var.vtype() * * if vartype == 'BINARY': # <<<<<<<<<<<<<< * cands[col_i] = varname * */ __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_vartype, __pyx_n_u_BINARY, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 3954, __pyx_L1_error) if (__pyx_t_8) { /* "pyscipopt/scip.pyx":3955 * * if vartype == 'BINARY': * cands[col_i] = varname # <<<<<<<<<<<<<< * * return cands */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_col_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_cands, __pyx_t_2, __pyx_v_varname) < 0)) __PYX_ERR(3, 3955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3954 * vartype = var.vtype() * * if vartype == 'BINARY': # <<<<<<<<<<<<<< * cands[col_i] = varname * */ } } /* "pyscipopt/scip.pyx":3957 * cands[col_i] = varname * * return cands # <<<<<<<<<<<<<< * * def getTimeSol(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_cands); __pyx_r = __pyx_v_cands; goto __pyx_L0; /* "pyscipopt/scip.pyx":3938 * Py_INCREF(nodesel) * * def getMapping(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef SCIP_COL** cols = SCIPgetLPCols(scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pyscipopt.scip.Model.getMapping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cands); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_varname); __Pyx_XDECREF(__pyx_v_vartype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3959 * return cands * * def getTimeSol(self): # <<<<<<<<<<<<<< * # check if a better sol is found * cdef SCIP_SOL* sol = SCIPgetBestSol(self._scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_497getTimeSol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_497getTimeSol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTimeSol (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_496getTimeSol(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_496getTimeSol(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP_SOL *__pyx_v_sol; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_v_time = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTimeSol", 0); /* "pyscipopt/scip.pyx":3961 * def getTimeSol(self): * # check if a better sol is found * cdef SCIP_SOL* sol = SCIPgetBestSol(self._scip) # <<<<<<<<<<<<<< * if sol != NULL: * obj = SCIPgetSolOrigObj(self._scip, sol) */ __pyx_v_sol = SCIPgetBestSol(__pyx_v_self->_scip); /* "pyscipopt/scip.pyx":3962 * # check if a better sol is found * cdef SCIP_SOL* sol = SCIPgetBestSol(self._scip) * if sol != NULL: # <<<<<<<<<<<<<< * obj = SCIPgetSolOrigObj(self._scip, sol) * time = SCIPgetSolTime(self._scip, sol) */ __pyx_t_1 = ((__pyx_v_sol != NULL) != 0); if (__pyx_t_1) { /* "pyscipopt/scip.pyx":3963 * cdef SCIP_SOL* sol = SCIPgetBestSol(self._scip) * if sol != NULL: * obj = SCIPgetSolOrigObj(self._scip, sol) # <<<<<<<<<<<<<< * time = SCIPgetSolTime(self._scip, sol) * return (time, obj) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetSolOrigObj(__pyx_v_self->_scip, __pyx_v_sol)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_obj = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3964 * if sol != NULL: * obj = SCIPgetSolOrigObj(self._scip, sol) * time = SCIPgetSolTime(self._scip, sol) # <<<<<<<<<<<<<< * return (time, obj) * */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetSolTime(__pyx_v_self->_scip, __pyx_v_sol)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_time = __pyx_t_2; __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":3965 * obj = SCIPgetSolOrigObj(self._scip, sol) * time = SCIPgetSolTime(self._scip, sol) * return (time, obj) # <<<<<<<<<<<<<< * * def getNPrimalSols(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_time); __Pyx_GIVEREF(__pyx_v_time); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_time); __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_obj); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3962 * # check if a better sol is found * cdef SCIP_SOL* sol = SCIPgetBestSol(self._scip) * if sol != NULL: # <<<<<<<<<<<<<< * obj = SCIPgetSolOrigObj(self._scip, sol) * time = SCIPgetSolTime(self._scip, sol) */ } /* "pyscipopt/scip.pyx":3959 * return cands * * def getTimeSol(self): # <<<<<<<<<<<<<< * # check if a better sol is found * cdef SCIP_SOL* sol = SCIPgetBestSol(self._scip) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pyscipopt.scip.Model.getTimeSol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_time); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3967 * return (time, obj) * * def getNPrimalSols(self): # <<<<<<<<<<<<<< * return SCIPgetNSols(self._scip) * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_499getNPrimalSols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_499getNPrimalSols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getNPrimalSols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_498getNPrimalSols(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_498getNPrimalSols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getNPrimalSols", 0); /* "pyscipopt/scip.pyx":3968 * * def getNPrimalSols(self): * return SCIPgetNSols(self._scip) # <<<<<<<<<<<<<< * * def setup_ml_nodelsel(self, flag=0, indicator_arr=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SCIPgetNSols(__pyx_v_self->_scip)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3967 * return (time, obj) * * def getNPrimalSols(self): # <<<<<<<<<<<<<< * return SCIPgetNSols(self._scip) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.getNPrimalSols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3970 * return SCIPgetNSols(self._scip) * * def setup_ml_nodelsel(self, flag=0, indicator_arr=None): # <<<<<<<<<<<<<< * * # find nodesel strategy and setup its priority */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_501setup_ml_nodelsel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_501setup_ml_nodelsel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_flag = 0; CYTHON_UNUSED PyObject *__pyx_v_indicator_arr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setup_ml_nodelsel (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,&__pyx_n_s_indicator_arr,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_int_0); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indicator_arr); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setup_ml_nodelsel") < 0)) __PYX_ERR(3, 3970, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_flag = values[0]; __pyx_v_indicator_arr = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setup_ml_nodelsel", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3970, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setup_ml_nodelsel", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_500setup_ml_nodelsel(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_flag, __pyx_v_indicator_arr); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_500setup_ml_nodelsel(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_flag, CYTHON_UNUSED PyObject *__pyx_v_indicator_arr) { SCIP_NODESEL *__pyx_v_nodesel; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setup_ml_nodelsel", 0); /* "pyscipopt/scip.pyx":3973 * * # find nodesel strategy and setup its priority * cdef SCIP_NODESEL* nodesel = SCIPfindNodesel(self._scip, "nodeselml") # <<<<<<<<<<<<<< * assert(nodesel!=NULL) * SCIPsetNodeselStdPriority(self._scip, nodesel, 6666666) */ __pyx_v_nodesel = SCIPfindNodesel(__pyx_v_self->_scip, ((char const *)"nodeselml")); /* "pyscipopt/scip.pyx":3974 * # find nodesel strategy and setup its priority * cdef SCIP_NODESEL* nodesel = SCIPfindNodesel(self._scip, "nodeselml") * assert(nodesel!=NULL) # <<<<<<<<<<<<<< * SCIPsetNodeselStdPriority(self._scip, nodesel, 6666666) * # cdef SCIP_NODESELDATA* data = SCIPnodeselGetData(nodesel) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_nodesel != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 3974, __pyx_L1_error) } } #endif /* "pyscipopt/scip.pyx":3975 * cdef SCIP_NODESEL* nodesel = SCIPfindNodesel(self._scip, "nodeselml") * assert(nodesel!=NULL) * SCIPsetNodeselStdPriority(self._scip, nodesel, 6666666) # <<<<<<<<<<<<<< * # cdef SCIP_NODESELDATA* data = SCIPnodeselGetData(nodesel) * # data.flag = flag */ (void)(SCIPsetNodeselStdPriority(__pyx_v_self->_scip, __pyx_v_nodesel, 0x65B9AA)); /* "pyscipopt/scip.pyx":3970 * return SCIPgetNSols(self._scip) * * def setup_ml_nodelsel(self, flag=0, indicator_arr=None): # <<<<<<<<<<<<<< * * # find nodesel strategy and setup its priority */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.setup_ml_nodelsel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":3980 * * * def getState(self, prev_state = None): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef int i, j, k, col_i */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_503getState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_503getState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prev_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getState (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prev_state,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prev_state); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getState") < 0)) __PYX_ERR(3, 3980, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_prev_state = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getState", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3980, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getState", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_502getState(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_prev_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_502getState(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_prev_state) { SCIP *__pyx_v_scip; int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; int __pyx_v_col_i; SCIP_Real __pyx_v_prod; PyObject *__pyx_v_update = NULL; SCIP_COL **__pyx_v_cols; int __pyx_v_ncols; PyArrayObject *__pyx_v_col_types = 0; PyArrayObject *__pyx_v_col_coefs = 0; PyArrayObject *__pyx_v_col_lbs = 0; PyArrayObject *__pyx_v_col_ubs = 0; PyArrayObject *__pyx_v_col_basestats = 0; PyArrayObject *__pyx_v_col_redcosts = 0; PyArrayObject *__pyx_v_col_ages = 0; PyArrayObject *__pyx_v_col_solvals = 0; PyArrayObject *__pyx_v_col_solfracs = 0; PyArrayObject *__pyx_v_col_sol_is_at_lb = 0; PyArrayObject *__pyx_v_col_sol_is_at_ub = 0; PyArrayObject *__pyx_v_col_incvals = 0; PyArrayObject *__pyx_v_col_avgincvals = 0; SCIP_SOL *__pyx_v_sol; SCIP_VAR *__pyx_v_var; SCIP_Real __pyx_v_lb; SCIP_Real __pyx_v_ub; SCIP_Real __pyx_v_solval; int __pyx_v_nrows; SCIP_ROW **__pyx_v_rows; PyArrayObject *__pyx_v_row_lhss = 0; PyArrayObject *__pyx_v_row_rhss = 0; PyArrayObject *__pyx_v_row_nnzrs = 0; PyArrayObject *__pyx_v_row_dualsols = 0; PyArrayObject *__pyx_v_row_basestats = 0; PyArrayObject *__pyx_v_row_ages = 0; PyArrayObject *__pyx_v_row_activities = 0; PyArrayObject *__pyx_v_row_objcossims = 0; PyArrayObject *__pyx_v_row_norms = 0; PyArrayObject *__pyx_v_row_is_at_lhs = 0; PyArrayObject *__pyx_v_row_is_at_rhs = 0; PyObject *__pyx_v_row_is_local = NULL; PyObject *__pyx_v_row_is_modifiable = NULL; PyObject *__pyx_v_row_is_removable = NULL; int __pyx_v_nnzrs; SCIP_Real __pyx_v_activity; SCIP_Real __pyx_v_lhs; SCIP_Real __pyx_v_rhs; SCIP_Real __pyx_v_cst; PyArrayObject *__pyx_v_coef_colidxs = 0; PyArrayObject *__pyx_v_coef_rowidxs = 0; PyArrayObject *__pyx_v_coef_vals = 0; SCIP_COL **__pyx_v_row_cols; SCIP_Real *__pyx_v_row_vals; __Pyx_LocalBuf_ND __pyx_pybuffernd_coef_colidxs; __Pyx_Buffer __pyx_pybuffer_coef_colidxs; __Pyx_LocalBuf_ND __pyx_pybuffernd_coef_rowidxs; __Pyx_Buffer __pyx_pybuffer_coef_rowidxs; __Pyx_LocalBuf_ND __pyx_pybuffernd_coef_vals; __Pyx_Buffer __pyx_pybuffer_coef_vals; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ages; __Pyx_Buffer __pyx_pybuffer_col_ages; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_avgincvals; __Pyx_Buffer __pyx_pybuffer_col_avgincvals; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_basestats; __Pyx_Buffer __pyx_pybuffer_col_basestats; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coefs; __Pyx_Buffer __pyx_pybuffer_col_coefs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_incvals; __Pyx_Buffer __pyx_pybuffer_col_incvals; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_lbs; __Pyx_Buffer __pyx_pybuffer_col_lbs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_redcosts; __Pyx_Buffer __pyx_pybuffer_col_redcosts; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_sol_is_at_lb; __Pyx_Buffer __pyx_pybuffer_col_sol_is_at_lb; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_sol_is_at_ub; __Pyx_Buffer __pyx_pybuffer_col_sol_is_at_ub; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_solfracs; __Pyx_Buffer __pyx_pybuffer_col_solfracs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_solvals; __Pyx_Buffer __pyx_pybuffer_col_solvals; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_types; __Pyx_Buffer __pyx_pybuffer_col_types; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ubs; __Pyx_Buffer __pyx_pybuffer_col_ubs; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_activities; __Pyx_Buffer __pyx_pybuffer_row_activities; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_ages; __Pyx_Buffer __pyx_pybuffer_row_ages; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_basestats; __Pyx_Buffer __pyx_pybuffer_row_basestats; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_dualsols; __Pyx_Buffer __pyx_pybuffer_row_dualsols; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_is_at_lhs; __Pyx_Buffer __pyx_pybuffer_row_is_at_lhs; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_is_at_rhs; __Pyx_Buffer __pyx_pybuffer_row_is_at_rhs; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_lhss; __Pyx_Buffer __pyx_pybuffer_row_lhss; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_nnzrs; __Pyx_Buffer __pyx_pybuffer_row_nnzrs; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_norms; __Pyx_Buffer __pyx_pybuffer_row_norms; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_objcossims; __Pyx_Buffer __pyx_pybuffer_row_objcossims; __Pyx_LocalBuf_ND __pyx_pybuffernd_row_rhss; __Pyx_Buffer __pyx_pybuffer_row_rhss; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; PyArrayObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; PyArrayObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; PyArrayObject *__pyx_t_22 = NULL; PyArrayObject *__pyx_t_23 = NULL; PyArrayObject *__pyx_t_24 = NULL; int __pyx_t_25; int __pyx_t_26; Py_ssize_t __pyx_t_27; int __pyx_t_28; int __pyx_t_29; PyArrayObject *__pyx_t_30 = NULL; PyArrayObject *__pyx_t_31 = NULL; PyArrayObject *__pyx_t_32 = NULL; PyArrayObject *__pyx_t_33 = NULL; PyArrayObject *__pyx_t_34 = NULL; PyArrayObject *__pyx_t_35 = NULL; PyArrayObject *__pyx_t_36 = NULL; PyArrayObject *__pyx_t_37 = NULL; PyArrayObject *__pyx_t_38 = NULL; PyArrayObject *__pyx_t_39 = NULL; PyArrayObject *__pyx_t_40 = NULL; SCIP_Real __pyx_t_41; double __pyx_t_42; PyArrayObject *__pyx_t_43 = NULL; PyArrayObject *__pyx_t_44 = NULL; PyArrayObject *__pyx_t_45 = NULL; __pyx_t_5numpy_int32_t __pyx_t_46; __pyx_t_5numpy_int32_t __pyx_t_47; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getState", 0); __pyx_pybuffer_col_types.pybuffer.buf = NULL; __pyx_pybuffer_col_types.refcount = 0; __pyx_pybuffernd_col_types.data = NULL; __pyx_pybuffernd_col_types.rcbuffer = &__pyx_pybuffer_col_types; __pyx_pybuffer_col_coefs.pybuffer.buf = NULL; __pyx_pybuffer_col_coefs.refcount = 0; __pyx_pybuffernd_col_coefs.data = NULL; __pyx_pybuffernd_col_coefs.rcbuffer = &__pyx_pybuffer_col_coefs; __pyx_pybuffer_col_lbs.pybuffer.buf = NULL; __pyx_pybuffer_col_lbs.refcount = 0; __pyx_pybuffernd_col_lbs.data = NULL; __pyx_pybuffernd_col_lbs.rcbuffer = &__pyx_pybuffer_col_lbs; __pyx_pybuffer_col_ubs.pybuffer.buf = NULL; __pyx_pybuffer_col_ubs.refcount = 0; __pyx_pybuffernd_col_ubs.data = NULL; __pyx_pybuffernd_col_ubs.rcbuffer = &__pyx_pybuffer_col_ubs; __pyx_pybuffer_col_basestats.pybuffer.buf = NULL; __pyx_pybuffer_col_basestats.refcount = 0; __pyx_pybuffernd_col_basestats.data = NULL; __pyx_pybuffernd_col_basestats.rcbuffer = &__pyx_pybuffer_col_basestats; __pyx_pybuffer_col_redcosts.pybuffer.buf = NULL; __pyx_pybuffer_col_redcosts.refcount = 0; __pyx_pybuffernd_col_redcosts.data = NULL; __pyx_pybuffernd_col_redcosts.rcbuffer = &__pyx_pybuffer_col_redcosts; __pyx_pybuffer_col_ages.pybuffer.buf = NULL; __pyx_pybuffer_col_ages.refcount = 0; __pyx_pybuffernd_col_ages.data = NULL; __pyx_pybuffernd_col_ages.rcbuffer = &__pyx_pybuffer_col_ages; __pyx_pybuffer_col_solvals.pybuffer.buf = NULL; __pyx_pybuffer_col_solvals.refcount = 0; __pyx_pybuffernd_col_solvals.data = NULL; __pyx_pybuffernd_col_solvals.rcbuffer = &__pyx_pybuffer_col_solvals; __pyx_pybuffer_col_solfracs.pybuffer.buf = NULL; __pyx_pybuffer_col_solfracs.refcount = 0; __pyx_pybuffernd_col_solfracs.data = NULL; __pyx_pybuffernd_col_solfracs.rcbuffer = &__pyx_pybuffer_col_solfracs; __pyx_pybuffer_col_sol_is_at_lb.pybuffer.buf = NULL; __pyx_pybuffer_col_sol_is_at_lb.refcount = 0; __pyx_pybuffernd_col_sol_is_at_lb.data = NULL; __pyx_pybuffernd_col_sol_is_at_lb.rcbuffer = &__pyx_pybuffer_col_sol_is_at_lb; __pyx_pybuffer_col_sol_is_at_ub.pybuffer.buf = NULL; __pyx_pybuffer_col_sol_is_at_ub.refcount = 0; __pyx_pybuffernd_col_sol_is_at_ub.data = NULL; __pyx_pybuffernd_col_sol_is_at_ub.rcbuffer = &__pyx_pybuffer_col_sol_is_at_ub; __pyx_pybuffer_col_incvals.pybuffer.buf = NULL; __pyx_pybuffer_col_incvals.refcount = 0; __pyx_pybuffernd_col_incvals.data = NULL; __pyx_pybuffernd_col_incvals.rcbuffer = &__pyx_pybuffer_col_incvals; __pyx_pybuffer_col_avgincvals.pybuffer.buf = NULL; __pyx_pybuffer_col_avgincvals.refcount = 0; __pyx_pybuffernd_col_avgincvals.data = NULL; __pyx_pybuffernd_col_avgincvals.rcbuffer = &__pyx_pybuffer_col_avgincvals; __pyx_pybuffer_row_lhss.pybuffer.buf = NULL; __pyx_pybuffer_row_lhss.refcount = 0; __pyx_pybuffernd_row_lhss.data = NULL; __pyx_pybuffernd_row_lhss.rcbuffer = &__pyx_pybuffer_row_lhss; __pyx_pybuffer_row_rhss.pybuffer.buf = NULL; __pyx_pybuffer_row_rhss.refcount = 0; __pyx_pybuffernd_row_rhss.data = NULL; __pyx_pybuffernd_row_rhss.rcbuffer = &__pyx_pybuffer_row_rhss; __pyx_pybuffer_row_nnzrs.pybuffer.buf = NULL; __pyx_pybuffer_row_nnzrs.refcount = 0; __pyx_pybuffernd_row_nnzrs.data = NULL; __pyx_pybuffernd_row_nnzrs.rcbuffer = &__pyx_pybuffer_row_nnzrs; __pyx_pybuffer_row_dualsols.pybuffer.buf = NULL; __pyx_pybuffer_row_dualsols.refcount = 0; __pyx_pybuffernd_row_dualsols.data = NULL; __pyx_pybuffernd_row_dualsols.rcbuffer = &__pyx_pybuffer_row_dualsols; __pyx_pybuffer_row_basestats.pybuffer.buf = NULL; __pyx_pybuffer_row_basestats.refcount = 0; __pyx_pybuffernd_row_basestats.data = NULL; __pyx_pybuffernd_row_basestats.rcbuffer = &__pyx_pybuffer_row_basestats; __pyx_pybuffer_row_ages.pybuffer.buf = NULL; __pyx_pybuffer_row_ages.refcount = 0; __pyx_pybuffernd_row_ages.data = NULL; __pyx_pybuffernd_row_ages.rcbuffer = &__pyx_pybuffer_row_ages; __pyx_pybuffer_row_activities.pybuffer.buf = NULL; __pyx_pybuffer_row_activities.refcount = 0; __pyx_pybuffernd_row_activities.data = NULL; __pyx_pybuffernd_row_activities.rcbuffer = &__pyx_pybuffer_row_activities; __pyx_pybuffer_row_objcossims.pybuffer.buf = NULL; __pyx_pybuffer_row_objcossims.refcount = 0; __pyx_pybuffernd_row_objcossims.data = NULL; __pyx_pybuffernd_row_objcossims.rcbuffer = &__pyx_pybuffer_row_objcossims; __pyx_pybuffer_row_norms.pybuffer.buf = NULL; __pyx_pybuffer_row_norms.refcount = 0; __pyx_pybuffernd_row_norms.data = NULL; __pyx_pybuffernd_row_norms.rcbuffer = &__pyx_pybuffer_row_norms; __pyx_pybuffer_row_is_at_lhs.pybuffer.buf = NULL; __pyx_pybuffer_row_is_at_lhs.refcount = 0; __pyx_pybuffernd_row_is_at_lhs.data = NULL; __pyx_pybuffernd_row_is_at_lhs.rcbuffer = &__pyx_pybuffer_row_is_at_lhs; __pyx_pybuffer_row_is_at_rhs.pybuffer.buf = NULL; __pyx_pybuffer_row_is_at_rhs.refcount = 0; __pyx_pybuffernd_row_is_at_rhs.data = NULL; __pyx_pybuffernd_row_is_at_rhs.rcbuffer = &__pyx_pybuffer_row_is_at_rhs; __pyx_pybuffer_coef_colidxs.pybuffer.buf = NULL; __pyx_pybuffer_coef_colidxs.refcount = 0; __pyx_pybuffernd_coef_colidxs.data = NULL; __pyx_pybuffernd_coef_colidxs.rcbuffer = &__pyx_pybuffer_coef_colidxs; __pyx_pybuffer_coef_rowidxs.pybuffer.buf = NULL; __pyx_pybuffer_coef_rowidxs.refcount = 0; __pyx_pybuffernd_coef_rowidxs.data = NULL; __pyx_pybuffernd_coef_rowidxs.rcbuffer = &__pyx_pybuffer_coef_rowidxs; __pyx_pybuffer_coef_vals.pybuffer.buf = NULL; __pyx_pybuffer_coef_vals.refcount = 0; __pyx_pybuffernd_coef_vals.data = NULL; __pyx_pybuffernd_coef_vals.rcbuffer = &__pyx_pybuffer_coef_vals; /* "pyscipopt/scip.pyx":3981 * * def getState(self, prev_state = None): * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * cdef int i, j, k, col_i * cdef SCIP_Real sim, prod */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":3985 * cdef SCIP_Real sim, prod * * update = prev_state is not None # <<<<<<<<<<<<<< * * # COLUMNS */ __pyx_t_2 = (__pyx_v_prev_state != Py_None); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_update = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":3988 * * # COLUMNS * cdef SCIP_COL** cols = SCIPgetLPCols(scip) # <<<<<<<<<<<<<< * cdef int ncols = SCIPgetNLPCols(scip) * */ __pyx_v_cols = SCIPgetLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":3989 * # COLUMNS * cdef SCIP_COL** cols = SCIPgetLPCols(scip) * cdef int ncols = SCIPgetNLPCols(scip) # <<<<<<<<<<<<<< * * cdef np.ndarray[np.int32_t, ndim=1] col_types */ __pyx_v_ncols = SCIPgetNLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":4005 * cdef np.ndarray[np.float32_t, ndim=1] col_avgincvals * * if not update: # <<<<<<<<<<<<<< * col_types = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4005, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_2) != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":4006 * * if not update: * col_types = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4006, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_types, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_types.diminfo[0].strides = __pyx_pybuffernd_col_types.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_types.diminfo[0].shape = __pyx_pybuffernd_col_types.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4006, __pyx_L1_error) } __pyx_t_8 = 0; __pyx_v_col_types = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4007 * if not update: * col_types = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4007, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coefs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coefs.diminfo[0].strides = __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coefs.diminfo[0].shape = __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4007, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_col_coefs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4008 * col_types = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) * col_basestats = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4008, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_lbs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_lbs.diminfo[0].strides = __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_lbs.diminfo[0].shape = __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4008, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_col_lbs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4009 * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_basestats = np.empty(shape=(ncols, ), dtype=np.int32) * col_redcosts = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4009, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ubs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ubs.diminfo[0].strides = __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ubs.diminfo[0].shape = __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4009, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_col_ubs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4010 * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) * col_basestats = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_redcosts = np.empty(shape=(ncols, ), dtype=np.float32) * col_ages = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4010, __pyx_L1_error) __pyx_t_16 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_basestats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_basestats.diminfo[0].strides = __pyx_pybuffernd_col_basestats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_basestats.diminfo[0].shape = __pyx_pybuffernd_col_basestats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4010, __pyx_L1_error) } __pyx_t_16 = 0; __pyx_v_col_basestats = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4011 * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) * col_basestats = np.empty(shape=(ncols, ), dtype=np.int32) * col_redcosts = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ages = np.empty(shape=(ncols, ), dtype=np.int32) * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4011, __pyx_L1_error) __pyx_t_17 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_redcosts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_redcosts.diminfo[0].strides = __pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_redcosts.diminfo[0].shape = __pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4011, __pyx_L1_error) } __pyx_t_17 = 0; __pyx_v_col_redcosts = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4012 * col_basestats = np.empty(shape=(ncols, ), dtype=np.int32) * col_redcosts = np.empty(shape=(ncols, ), dtype=np.float32) * col_ages = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_solfracs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4012, __pyx_L1_error) __pyx_t_18 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ages, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_ages.diminfo[0].strides = __pyx_pybuffernd_col_ages.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ages.diminfo[0].shape = __pyx_pybuffernd_col_ages.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4012, __pyx_L1_error) } __pyx_t_18 = 0; __pyx_v_col_ages = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4013 * col_redcosts = np.empty(shape=(ncols, ), dtype=np.float32) * col_ages = np.empty(shape=(ncols, ), dtype=np.int32) * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_solfracs = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_is_at_lb = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4013, __pyx_L1_error) __pyx_t_19 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_solvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_solvals.diminfo[0].strides = __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_solvals.diminfo[0].shape = __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4013, __pyx_L1_error) } __pyx_t_19 = 0; __pyx_v_col_solvals = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4014 * col_ages = np.empty(shape=(ncols, ), dtype=np.int32) * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_solfracs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_sol_is_at_lb = np.empty(shape=(ncols, ), dtype=np.int32) * col_sol_is_at_ub = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4014, __pyx_L1_error) __pyx_t_20 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_solfracs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_solfracs.diminfo[0].strides = __pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_solfracs.diminfo[0].shape = __pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4014, __pyx_L1_error) } __pyx_t_20 = 0; __pyx_v_col_solfracs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4015 * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_solfracs = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_is_at_lb = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_sol_is_at_ub = np.empty(shape=(ncols, ), dtype=np.int32) * col_incvals = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4015, __pyx_L1_error) __pyx_t_21 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_is_at_lb, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].strides = __pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].shape = __pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4015, __pyx_L1_error) } __pyx_t_21 = 0; __pyx_v_col_sol_is_at_lb = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4016 * col_solfracs = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_is_at_lb = np.empty(shape=(ncols, ), dtype=np.int32) * col_sol_is_at_ub = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_incvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_avgincvals = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4016, __pyx_L1_error) __pyx_t_22 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_is_at_ub, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].strides = __pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].shape = __pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4016, __pyx_L1_error) } __pyx_t_22 = 0; __pyx_v_col_sol_is_at_ub = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4017 * col_sol_is_at_lb = np.empty(shape=(ncols, ), dtype=np.int32) * col_sol_is_at_ub = np.empty(shape=(ncols, ), dtype=np.int32) * col_incvals = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_avgincvals = np.empty(shape=(ncols, ), dtype=np.float32) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4017, __pyx_L1_error) __pyx_t_23 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_incvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_incvals.diminfo[0].strides = __pyx_pybuffernd_col_incvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_incvals.diminfo[0].shape = __pyx_pybuffernd_col_incvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4017, __pyx_L1_error) } __pyx_t_23 = 0; __pyx_v_col_incvals = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4018 * col_sol_is_at_ub = np.empty(shape=(ncols, ), dtype=np.int32) * col_incvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_avgincvals = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * else: * col_types = prev_state['col']['types'] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4018, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_avgincvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_avgincvals.diminfo[0].strides = __pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_avgincvals.diminfo[0].shape = __pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4018, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_col_avgincvals = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4005 * cdef np.ndarray[np.float32_t, ndim=1] col_avgincvals * * if not update: # <<<<<<<<<<<<<< * col_types = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) */ goto __pyx_L3; } /* "pyscipopt/scip.pyx":4020 * col_avgincvals = np.empty(shape=(ncols, ), dtype=np.float32) * else: * col_types = prev_state['col']['types'] # <<<<<<<<<<<<<< * col_coefs = prev_state['col']['coefs'] * col_lbs = prev_state['col']['lbs'] */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4020, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_types, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_types.diminfo[0].strides = __pyx_pybuffernd_col_types.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_types.diminfo[0].shape = __pyx_pybuffernd_col_types.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4020, __pyx_L1_error) } __pyx_t_8 = 0; __pyx_v_col_types = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4021 * else: * col_types = prev_state['col']['types'] * col_coefs = prev_state['col']['coefs'] # <<<<<<<<<<<<<< * col_lbs = prev_state['col']['lbs'] * col_ubs = prev_state['col']['ubs'] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_coefs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4021, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coefs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_coefs.diminfo[0].strides = __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coefs.diminfo[0].shape = __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4021, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_col_coefs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4022 * col_types = prev_state['col']['types'] * col_coefs = prev_state['col']['coefs'] * col_lbs = prev_state['col']['lbs'] # <<<<<<<<<<<<<< * col_ubs = prev_state['col']['ubs'] * col_basestats = prev_state['col']['basestats'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_lbs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4022, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_lbs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_lbs.diminfo[0].strides = __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_lbs.diminfo[0].shape = __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4022, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_col_lbs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4023 * col_coefs = prev_state['col']['coefs'] * col_lbs = prev_state['col']['lbs'] * col_ubs = prev_state['col']['ubs'] # <<<<<<<<<<<<<< * col_basestats = prev_state['col']['basestats'] * col_redcosts = prev_state['col']['redcosts'] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_ubs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4023, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ubs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_ubs.diminfo[0].strides = __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ubs.diminfo[0].shape = __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4023, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_col_ubs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4024 * col_lbs = prev_state['col']['lbs'] * col_ubs = prev_state['col']['ubs'] * col_basestats = prev_state['col']['basestats'] # <<<<<<<<<<<<<< * col_redcosts = prev_state['col']['redcosts'] * col_ages = prev_state['col']['ages'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_basestats); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4024, __pyx_L1_error) __pyx_t_16 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_basestats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_basestats.diminfo[0].strides = __pyx_pybuffernd_col_basestats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_basestats.diminfo[0].shape = __pyx_pybuffernd_col_basestats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4024, __pyx_L1_error) } __pyx_t_16 = 0; __pyx_v_col_basestats = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4025 * col_ubs = prev_state['col']['ubs'] * col_basestats = prev_state['col']['basestats'] * col_redcosts = prev_state['col']['redcosts'] # <<<<<<<<<<<<<< * col_ages = prev_state['col']['ages'] * col_solvals = prev_state['col']['solvals'] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_redcosts); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4025, __pyx_L1_error) __pyx_t_17 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_redcosts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_redcosts.diminfo[0].strides = __pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_redcosts.diminfo[0].shape = __pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4025, __pyx_L1_error) } __pyx_t_17 = 0; __pyx_v_col_redcosts = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4026 * col_basestats = prev_state['col']['basestats'] * col_redcosts = prev_state['col']['redcosts'] * col_ages = prev_state['col']['ages'] # <<<<<<<<<<<<<< * col_solvals = prev_state['col']['solvals'] * col_solfracs = prev_state['col']['solfracs'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_ages); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4026, __pyx_L1_error) __pyx_t_18 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ages, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ages.diminfo[0].strides = __pyx_pybuffernd_col_ages.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ages.diminfo[0].shape = __pyx_pybuffernd_col_ages.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4026, __pyx_L1_error) } __pyx_t_18 = 0; __pyx_v_col_ages = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4027 * col_redcosts = prev_state['col']['redcosts'] * col_ages = prev_state['col']['ages'] * col_solvals = prev_state['col']['solvals'] # <<<<<<<<<<<<<< * col_solfracs = prev_state['col']['solfracs'] * col_sol_is_at_lb = prev_state['col']['sol_is_at_lb'] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_solvals); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4027, __pyx_L1_error) __pyx_t_19 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_solvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_solvals.diminfo[0].strides = __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_solvals.diminfo[0].shape = __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4027, __pyx_L1_error) } __pyx_t_19 = 0; __pyx_v_col_solvals = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4028 * col_ages = prev_state['col']['ages'] * col_solvals = prev_state['col']['solvals'] * col_solfracs = prev_state['col']['solfracs'] # <<<<<<<<<<<<<< * col_sol_is_at_lb = prev_state['col']['sol_is_at_lb'] * col_sol_is_at_ub = prev_state['col']['sol_is_at_ub'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_solfracs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4028, __pyx_L1_error) __pyx_t_20 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_solfracs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_solfracs.diminfo[0].strides = __pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_solfracs.diminfo[0].shape = __pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4028, __pyx_L1_error) } __pyx_t_20 = 0; __pyx_v_col_solfracs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4029 * col_solvals = prev_state['col']['solvals'] * col_solfracs = prev_state['col']['solfracs'] * col_sol_is_at_lb = prev_state['col']['sol_is_at_lb'] # <<<<<<<<<<<<<< * col_sol_is_at_ub = prev_state['col']['sol_is_at_ub'] * col_incvals = prev_state['col']['incvals'] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_sol_is_at_lb); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4029, __pyx_L1_error) __pyx_t_21 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_is_at_lb, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].strides = __pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].shape = __pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4029, __pyx_L1_error) } __pyx_t_21 = 0; __pyx_v_col_sol_is_at_lb = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4030 * col_solfracs = prev_state['col']['solfracs'] * col_sol_is_at_lb = prev_state['col']['sol_is_at_lb'] * col_sol_is_at_ub = prev_state['col']['sol_is_at_ub'] # <<<<<<<<<<<<<< * col_incvals = prev_state['col']['incvals'] * col_avgincvals = prev_state['col']['avgincvals'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_sol_is_at_ub); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4030, __pyx_L1_error) __pyx_t_22 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_is_at_ub, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].strides = __pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].shape = __pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4030, __pyx_L1_error) } __pyx_t_22 = 0; __pyx_v_col_sol_is_at_ub = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4031 * col_sol_is_at_lb = prev_state['col']['sol_is_at_lb'] * col_sol_is_at_ub = prev_state['col']['sol_is_at_ub'] * col_incvals = prev_state['col']['incvals'] # <<<<<<<<<<<<<< * col_avgincvals = prev_state['col']['avgincvals'] * */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_incvals); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4031, __pyx_L1_error) __pyx_t_23 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_incvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_col_incvals.diminfo[0].strides = __pyx_pybuffernd_col_incvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_incvals.diminfo[0].shape = __pyx_pybuffernd_col_incvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4031, __pyx_L1_error) } __pyx_t_23 = 0; __pyx_v_col_incvals = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4032 * col_sol_is_at_ub = prev_state['col']['sol_is_at_ub'] * col_incvals = prev_state['col']['incvals'] * col_avgincvals = prev_state['col']['avgincvals'] # <<<<<<<<<<<<<< * * cdef SCIP_SOL* sol = SCIPgetBestSol(scip) */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_avgincvals); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4032, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_avgincvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_avgincvals.diminfo[0].strides = __pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_avgincvals.diminfo[0].shape = __pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4032, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_col_avgincvals = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pyscipopt/scip.pyx":4034 * col_avgincvals = prev_state['col']['avgincvals'] * * cdef SCIP_SOL* sol = SCIPgetBestSol(scip) # <<<<<<<<<<<<<< * cdef SCIP_VAR* var * cdef SCIP_Real lb, ub, solval */ __pyx_v_sol = SCIPgetBestSol(__pyx_v_scip); /* "pyscipopt/scip.pyx":4037 * cdef SCIP_VAR* var * cdef SCIP_Real lb, ub, solval * for i in range(ncols): # <<<<<<<<<<<<<< * col_i = SCIPcolGetLPPos(cols[i]) * var = SCIPcolGetVar(cols[i]) */ __pyx_t_9 = __pyx_v_ncols; __pyx_t_25 = __pyx_t_9; for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_25; __pyx_t_26+=1) { __pyx_v_i = __pyx_t_26; /* "pyscipopt/scip.pyx":4038 * cdef SCIP_Real lb, ub, solval * for i in range(ncols): * col_i = SCIPcolGetLPPos(cols[i]) # <<<<<<<<<<<<<< * var = SCIPcolGetVar(cols[i]) * */ __pyx_v_col_i = SCIPcolGetLPPos((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4039 * for i in range(ncols): * col_i = SCIPcolGetLPPos(cols[i]) * var = SCIPcolGetVar(cols[i]) # <<<<<<<<<<<<<< * * lb = SCIPcolGetLb(cols[i]) */ __pyx_v_var = SCIPcolGetVar((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4041 * var = SCIPcolGetVar(cols[i]) * * lb = SCIPcolGetLb(cols[i]) # <<<<<<<<<<<<<< * ub = SCIPcolGetUb(cols[i]) * solval = SCIPcolGetPrimsol(cols[i]) */ __pyx_v_lb = SCIPcolGetLb((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4042 * * lb = SCIPcolGetLb(cols[i]) * ub = SCIPcolGetUb(cols[i]) # <<<<<<<<<<<<<< * solval = SCIPcolGetPrimsol(cols[i]) * */ __pyx_v_ub = SCIPcolGetUb((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4043 * lb = SCIPcolGetLb(cols[i]) * ub = SCIPcolGetUb(cols[i]) * solval = SCIPcolGetPrimsol(cols[i]) # <<<<<<<<<<<<<< * * if not update: */ __pyx_v_solval = SCIPcolGetPrimsol((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4045 * solval = SCIPcolGetPrimsol(cols[i]) * * if not update: # <<<<<<<<<<<<<< * # Variable type * col_types[col_i] = SCIPvarGetType(var) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 4045, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_4) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4047 * if not update: * # Variable type * col_types[col_i] = SCIPvarGetType(var) # <<<<<<<<<<<<<< * * # Objective coefficient */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_types.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_types.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4047, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_types.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_types.diminfo[0].strides) = SCIPvarGetType(__pyx_v_var); /* "pyscipopt/scip.pyx":4050 * * # Objective coefficient * col_coefs[col_i] = SCIPcolGetObj(cols[i]) # <<<<<<<<<<<<<< * * # Lower bound */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_coefs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_coefs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4050, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_coefs.diminfo[0].strides) = SCIPcolGetObj((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4045 * solval = SCIPcolGetPrimsol(cols[i]) * * if not update: # <<<<<<<<<<<<<< * # Variable type * col_types[col_i] = SCIPvarGetType(var) */ } /* "pyscipopt/scip.pyx":4053 * * # Lower bound * if SCIPisInfinity(scip, REALABS(lb)): # <<<<<<<<<<<<<< * col_lbs[col_i] = NAN * else: */ __pyx_t_2 = (SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_lb)) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4054 * # Lower bound * if SCIPisInfinity(scip, REALABS(lb)): * col_lbs[col_i] = NAN # <<<<<<<<<<<<<< * else: * col_lbs[col_i] = lb */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_lbs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_lbs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4054, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_lbs.diminfo[0].strides) = NPY_NAN; /* "pyscipopt/scip.pyx":4053 * * # Lower bound * if SCIPisInfinity(scip, REALABS(lb)): # <<<<<<<<<<<<<< * col_lbs[col_i] = NAN * else: */ goto __pyx_L7; } /* "pyscipopt/scip.pyx":4056 * col_lbs[col_i] = NAN * else: * col_lbs[col_i] = lb # <<<<<<<<<<<<<< * * # Upper bound */ /*else*/ { __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_lbs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_lbs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4056, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_lbs.diminfo[0].strides) = __pyx_v_lb; } __pyx_L7:; /* "pyscipopt/scip.pyx":4059 * * # Upper bound * if SCIPisInfinity(scip, REALABS(ub)): # <<<<<<<<<<<<<< * col_ubs[col_i] = NAN * else: */ __pyx_t_2 = (SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_ub)) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4060 * # Upper bound * if SCIPisInfinity(scip, REALABS(ub)): * col_ubs[col_i] = NAN # <<<<<<<<<<<<<< * else: * col_ubs[col_i] = ub */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_ubs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_ubs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4060, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_ubs.diminfo[0].strides) = NPY_NAN; /* "pyscipopt/scip.pyx":4059 * * # Upper bound * if SCIPisInfinity(scip, REALABS(ub)): # <<<<<<<<<<<<<< * col_ubs[col_i] = NAN * else: */ goto __pyx_L8; } /* "pyscipopt/scip.pyx":4062 * col_ubs[col_i] = NAN * else: * col_ubs[col_i] = ub # <<<<<<<<<<<<<< * * # Basis status */ /*else*/ { __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_ubs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_ubs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4062, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_ubs.diminfo[0].strides) = __pyx_v_ub; } __pyx_L8:; /* "pyscipopt/scip.pyx":4065 * * # Basis status * col_basestats[col_i] = SCIPcolGetBasisStatus(cols[i]) # <<<<<<<<<<<<<< * * # Reduced cost */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_basestats.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_basestats.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4065, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_basestats.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_basestats.diminfo[0].strides) = SCIPcolGetBasisStatus((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4068 * * # Reduced cost * col_redcosts[col_i] = SCIPgetColRedcost(scip, cols[i]) # <<<<<<<<<<<<<< * * # Age */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_redcosts.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_redcosts.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4068, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_redcosts.diminfo[0].strides) = SCIPgetColRedcost(__pyx_v_scip, (__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4071 * * # Age * col_ages[col_i] = cols[i].age # <<<<<<<<<<<<<< * * # LP solution value */ __pyx_t_28 = (__pyx_v_cols[__pyx_v_i])->age; __pyx_t_27 = __pyx_v_col_i; __pyx_t_29 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_ages.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_29 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_ages.diminfo[0].shape)) __pyx_t_29 = 0; if (unlikely(__pyx_t_29 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_29); __PYX_ERR(3, 4071, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_ages.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_ages.diminfo[0].strides) = __pyx_t_28; /* "pyscipopt/scip.pyx":4074 * * # LP solution value * col_solvals[col_i] = solval # <<<<<<<<<<<<<< * col_solfracs[col_i] = SCIPfeasFrac(scip, solval) * col_sol_is_at_lb[col_i] = SCIPisEQ(scip, solval, lb) */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_solvals.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_solvals.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4074, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_solvals.diminfo[0].strides) = __pyx_v_solval; /* "pyscipopt/scip.pyx":4075 * # LP solution value * col_solvals[col_i] = solval * col_solfracs[col_i] = SCIPfeasFrac(scip, solval) # <<<<<<<<<<<<<< * col_sol_is_at_lb[col_i] = SCIPisEQ(scip, solval, lb) * col_sol_is_at_ub[col_i] = SCIPisEQ(scip, solval, ub) */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_solfracs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_solfracs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4075, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_solfracs.diminfo[0].strides) = SCIPfeasFrac(__pyx_v_scip, __pyx_v_solval); /* "pyscipopt/scip.pyx":4076 * col_solvals[col_i] = solval * col_solfracs[col_i] = SCIPfeasFrac(scip, solval) * col_sol_is_at_lb[col_i] = SCIPisEQ(scip, solval, lb) # <<<<<<<<<<<<<< * col_sol_is_at_ub[col_i] = SCIPisEQ(scip, solval, ub) * */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4076, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_sol_is_at_lb.diminfo[0].strides) = SCIPisEQ(__pyx_v_scip, __pyx_v_solval, __pyx_v_lb); /* "pyscipopt/scip.pyx":4077 * col_solfracs[col_i] = SCIPfeasFrac(scip, solval) * col_sol_is_at_lb[col_i] = SCIPisEQ(scip, solval, lb) * col_sol_is_at_ub[col_i] = SCIPisEQ(scip, solval, ub) # <<<<<<<<<<<<<< * * # Incumbent solution value */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4077, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_sol_is_at_ub.diminfo[0].strides) = SCIPisEQ(__pyx_v_scip, __pyx_v_solval, __pyx_v_ub); /* "pyscipopt/scip.pyx":4080 * * # Incumbent solution value * if sol is NULL: # <<<<<<<<<<<<<< * col_incvals[col_i] = NAN * col_avgincvals[col_i] = NAN */ __pyx_t_2 = ((__pyx_v_sol == NULL) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4081 * # Incumbent solution value * if sol is NULL: * col_incvals[col_i] = NAN # <<<<<<<<<<<<<< * col_avgincvals[col_i] = NAN * else: */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_incvals.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_incvals.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4081, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_incvals.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_incvals.diminfo[0].strides) = NPY_NAN; /* "pyscipopt/scip.pyx":4082 * if sol is NULL: * col_incvals[col_i] = NAN * col_avgincvals[col_i] = NAN # <<<<<<<<<<<<<< * else: * col_incvals[col_i] = SCIPgetSolVal(scip, sol, var) */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_avgincvals.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_avgincvals.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4082, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_avgincvals.diminfo[0].strides) = NPY_NAN; /* "pyscipopt/scip.pyx":4080 * * # Incumbent solution value * if sol is NULL: # <<<<<<<<<<<<<< * col_incvals[col_i] = NAN * col_avgincvals[col_i] = NAN */ goto __pyx_L9; } /* "pyscipopt/scip.pyx":4084 * col_avgincvals[col_i] = NAN * else: * col_incvals[col_i] = SCIPgetSolVal(scip, sol, var) # <<<<<<<<<<<<<< * col_avgincvals[col_i] = SCIPvarGetAvgSol(var) * */ /*else*/ { __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_incvals.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_incvals.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4084, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_incvals.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_incvals.diminfo[0].strides) = SCIPgetSolVal(__pyx_v_scip, __pyx_v_sol, __pyx_v_var); /* "pyscipopt/scip.pyx":4085 * else: * col_incvals[col_i] = SCIPgetSolVal(scip, sol, var) * col_avgincvals[col_i] = SCIPvarGetAvgSol(var) # <<<<<<<<<<<<<< * * */ __pyx_t_27 = __pyx_v_col_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_col_avgincvals.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_col_avgincvals.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4085, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_col_avgincvals.diminfo[0].strides) = SCIPvarGetAvgSol(__pyx_v_var); } __pyx_L9:; } /* "pyscipopt/scip.pyx":4089 * * # ROWS * cdef int nrows = SCIPgetNLPRows(scip) # <<<<<<<<<<<<<< * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) * */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4090 * # ROWS * cdef int nrows = SCIPgetNLPRows(scip) * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) # <<<<<<<<<<<<<< * * cdef np.ndarray[np.float32_t, ndim=1] row_lhss */ __pyx_v_rows = SCIPgetLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4104 * cdef np.ndarray[np.int32_t, ndim=1] row_is_at_rhs * * if not update: # <<<<<<<<<<<<<< * row_lhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_rhss = np.empty(shape=(nrows, ), dtype=np.float32) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4104, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_2) != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":4105 * * if not update: * row_lhss = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * row_rhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4105, __pyx_L1_error) __pyx_t_30 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_lhss, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_lhss.diminfo[0].strides = __pyx_pybuffernd_row_lhss.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_lhss.diminfo[0].shape = __pyx_pybuffernd_row_lhss.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4105, __pyx_L1_error) } __pyx_t_30 = 0; __pyx_v_row_lhss = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4106 * if not update: * row_lhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_rhss = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * row_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) * row_dualsols = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4106, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_rhss, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_rhss.diminfo[0].strides = __pyx_pybuffernd_row_rhss.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_rhss.diminfo[0].shape = __pyx_pybuffernd_row_rhss.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4106, __pyx_L1_error) } __pyx_t_31 = 0; __pyx_v_row_rhss = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4107 * row_lhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_rhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_dualsols = np.empty(shape=(nrows, ), dtype=np.float32) * row_basestats = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4107, __pyx_L1_error) __pyx_t_32 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_nnzrs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_nnzrs.diminfo[0].strides = __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_nnzrs.diminfo[0].shape = __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4107, __pyx_L1_error) } __pyx_t_32 = 0; __pyx_v_row_nnzrs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4108 * row_rhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) * row_dualsols = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * row_basestats = np.empty(shape=(nrows, ), dtype=np.int32) * row_ages = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4108, __pyx_L1_error) __pyx_t_33 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_dualsols, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_dualsols.diminfo[0].strides = __pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_dualsols.diminfo[0].shape = __pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4108, __pyx_L1_error) } __pyx_t_33 = 0; __pyx_v_row_dualsols = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4109 * row_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) * row_dualsols = np.empty(shape=(nrows, ), dtype=np.float32) * row_basestats = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_ages = np.empty(shape=(nrows, ), dtype=np.int32) * row_activities = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4109, __pyx_L1_error) __pyx_t_34 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_basestats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_basestats.diminfo[0].strides = __pyx_pybuffernd_row_basestats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_basestats.diminfo[0].shape = __pyx_pybuffernd_row_basestats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4109, __pyx_L1_error) } __pyx_t_34 = 0; __pyx_v_row_basestats = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4110 * row_dualsols = np.empty(shape=(nrows, ), dtype=np.float32) * row_basestats = np.empty(shape=(nrows, ), dtype=np.int32) * row_ages = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_activities = np.empty(shape=(nrows, ), dtype=np.float32) * row_objcossims = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4110, __pyx_L1_error) __pyx_t_35 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer, (PyObject*)__pyx_t_35, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_ages, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_ages.diminfo[0].strides = __pyx_pybuffernd_row_ages.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_ages.diminfo[0].shape = __pyx_pybuffernd_row_ages.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4110, __pyx_L1_error) } __pyx_t_35 = 0; __pyx_v_row_ages = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4111 * row_basestats = np.empty(shape=(nrows, ), dtype=np.int32) * row_ages = np.empty(shape=(nrows, ), dtype=np.int32) * row_activities = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * row_objcossims = np.empty(shape=(nrows, ), dtype=np.float32) * row_norms = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4111, __pyx_L1_error) __pyx_t_36 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer, (PyObject*)__pyx_t_36, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_activities, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_activities.diminfo[0].strides = __pyx_pybuffernd_row_activities.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_activities.diminfo[0].shape = __pyx_pybuffernd_row_activities.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4111, __pyx_L1_error) } __pyx_t_36 = 0; __pyx_v_row_activities = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4112 * row_ages = np.empty(shape=(nrows, ), dtype=np.int32) * row_activities = np.empty(shape=(nrows, ), dtype=np.float32) * row_objcossims = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * row_norms = np.empty(shape=(nrows, ), dtype=np.float32) * row_is_at_lhs = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4112, __pyx_L1_error) __pyx_t_37 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer, (PyObject*)__pyx_t_37, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_objcossims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_objcossims.diminfo[0].strides = __pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_objcossims.diminfo[0].shape = __pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4112, __pyx_L1_error) } __pyx_t_37 = 0; __pyx_v_row_objcossims = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4113 * row_activities = np.empty(shape=(nrows, ), dtype=np.float32) * row_objcossims = np.empty(shape=(nrows, ), dtype=np.float32) * row_norms = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * row_is_at_lhs = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_at_rhs = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4113, __pyx_L1_error) __pyx_t_38 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer, (PyObject*)__pyx_t_38, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_norms, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_norms.diminfo[0].strides = __pyx_pybuffernd_row_norms.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_norms.diminfo[0].shape = __pyx_pybuffernd_row_norms.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4113, __pyx_L1_error) } __pyx_t_38 = 0; __pyx_v_row_norms = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4114 * row_objcossims = np.empty(shape=(nrows, ), dtype=np.float32) * row_norms = np.empty(shape=(nrows, ), dtype=np.float32) * row_is_at_lhs = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_is_at_rhs = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_local = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4114, __pyx_L1_error) __pyx_t_39 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer, (PyObject*)__pyx_t_39, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_is_at_lhs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_is_at_lhs.diminfo[0].strides = __pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_is_at_lhs.diminfo[0].shape = __pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4114, __pyx_L1_error) } __pyx_t_39 = 0; __pyx_v_row_is_at_lhs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4115 * row_norms = np.empty(shape=(nrows, ), dtype=np.float32) * row_is_at_lhs = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_at_rhs = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_is_local = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_modifiable = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4115, __pyx_L1_error) __pyx_t_40 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer, (PyObject*)__pyx_t_40, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_is_at_rhs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_is_at_rhs.diminfo[0].strides = __pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_is_at_rhs.diminfo[0].shape = __pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4115, __pyx_L1_error) } __pyx_t_40 = 0; __pyx_v_row_is_at_rhs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4116 * row_is_at_lhs = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_at_rhs = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_local = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_is_modifiable = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_removable = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_row_is_local = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4117 * row_is_at_rhs = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_local = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_modifiable = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * row_is_removable = np.empty(shape=(nrows, ), dtype=np.int32) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_row_is_modifiable = __pyx_t_5; __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4118 * row_is_local = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_modifiable = np.empty(shape=(nrows, ), dtype=np.int32) * row_is_removable = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * else: * row_lhss = prev_state['row']['lhss'] */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_row_is_removable = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4104 * cdef np.ndarray[np.int32_t, ndim=1] row_is_at_rhs * * if not update: # <<<<<<<<<<<<<< * row_lhss = np.empty(shape=(nrows, ), dtype=np.float32) * row_rhss = np.empty(shape=(nrows, ), dtype=np.float32) */ goto __pyx_L10; } /* "pyscipopt/scip.pyx":4120 * row_is_removable = np.empty(shape=(nrows, ), dtype=np.int32) * else: * row_lhss = prev_state['row']['lhss'] # <<<<<<<<<<<<<< * row_rhss = prev_state['row']['rhss'] * row_nnzrs = prev_state['row']['nnzrs'] */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_lhss); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4120, __pyx_L1_error) __pyx_t_30 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_lhss, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_lhss.diminfo[0].strides = __pyx_pybuffernd_row_lhss.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_lhss.diminfo[0].shape = __pyx_pybuffernd_row_lhss.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4120, __pyx_L1_error) } __pyx_t_30 = 0; __pyx_v_row_lhss = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4121 * else: * row_lhss = prev_state['row']['lhss'] * row_rhss = prev_state['row']['rhss'] # <<<<<<<<<<<<<< * row_nnzrs = prev_state['row']['nnzrs'] * row_dualsols = prev_state['row']['dualsols'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_rhss); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4121, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_rhss, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_rhss.diminfo[0].strides = __pyx_pybuffernd_row_rhss.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_rhss.diminfo[0].shape = __pyx_pybuffernd_row_rhss.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4121, __pyx_L1_error) } __pyx_t_31 = 0; __pyx_v_row_rhss = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4122 * row_lhss = prev_state['row']['lhss'] * row_rhss = prev_state['row']['rhss'] * row_nnzrs = prev_state['row']['nnzrs'] # <<<<<<<<<<<<<< * row_dualsols = prev_state['row']['dualsols'] * row_basestats = prev_state['row']['basestats'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_nnzrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4122, __pyx_L1_error) __pyx_t_32 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_nnzrs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_nnzrs.diminfo[0].strides = __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_nnzrs.diminfo[0].shape = __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4122, __pyx_L1_error) } __pyx_t_32 = 0; __pyx_v_row_nnzrs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4123 * row_rhss = prev_state['row']['rhss'] * row_nnzrs = prev_state['row']['nnzrs'] * row_dualsols = prev_state['row']['dualsols'] # <<<<<<<<<<<<<< * row_basestats = prev_state['row']['basestats'] * row_ages = prev_state['row']['ages'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_dualsols); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4123, __pyx_L1_error) __pyx_t_33 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_dualsols, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_dualsols.diminfo[0].strides = __pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_dualsols.diminfo[0].shape = __pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4123, __pyx_L1_error) } __pyx_t_33 = 0; __pyx_v_row_dualsols = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4124 * row_nnzrs = prev_state['row']['nnzrs'] * row_dualsols = prev_state['row']['dualsols'] * row_basestats = prev_state['row']['basestats'] # <<<<<<<<<<<<<< * row_ages = prev_state['row']['ages'] * row_activities = prev_state['row']['activities'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_basestats); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4124, __pyx_L1_error) __pyx_t_34 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_basestats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_basestats.diminfo[0].strides = __pyx_pybuffernd_row_basestats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_basestats.diminfo[0].shape = __pyx_pybuffernd_row_basestats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4124, __pyx_L1_error) } __pyx_t_34 = 0; __pyx_v_row_basestats = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4125 * row_dualsols = prev_state['row']['dualsols'] * row_basestats = prev_state['row']['basestats'] * row_ages = prev_state['row']['ages'] # <<<<<<<<<<<<<< * row_activities = prev_state['row']['activities'] * row_objcossims = prev_state['row']['objcossims'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_ages); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4125, __pyx_L1_error) __pyx_t_35 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer, (PyObject*)__pyx_t_35, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_ages, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_ages.diminfo[0].strides = __pyx_pybuffernd_row_ages.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_ages.diminfo[0].shape = __pyx_pybuffernd_row_ages.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4125, __pyx_L1_error) } __pyx_t_35 = 0; __pyx_v_row_ages = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4126 * row_basestats = prev_state['row']['basestats'] * row_ages = prev_state['row']['ages'] * row_activities = prev_state['row']['activities'] # <<<<<<<<<<<<<< * row_objcossims = prev_state['row']['objcossims'] * row_norms = prev_state['row']['norms'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_activities); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4126, __pyx_L1_error) __pyx_t_36 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer, (PyObject*)__pyx_t_36, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_activities, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_activities.diminfo[0].strides = __pyx_pybuffernd_row_activities.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_activities.diminfo[0].shape = __pyx_pybuffernd_row_activities.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4126, __pyx_L1_error) } __pyx_t_36 = 0; __pyx_v_row_activities = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4127 * row_ages = prev_state['row']['ages'] * row_activities = prev_state['row']['activities'] * row_objcossims = prev_state['row']['objcossims'] # <<<<<<<<<<<<<< * row_norms = prev_state['row']['norms'] * row_is_at_lhs = prev_state['row']['is_at_lhs'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_objcossims); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4127, __pyx_L1_error) __pyx_t_37 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer, (PyObject*)__pyx_t_37, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_objcossims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_objcossims.diminfo[0].strides = __pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_objcossims.diminfo[0].shape = __pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4127, __pyx_L1_error) } __pyx_t_37 = 0; __pyx_v_row_objcossims = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4128 * row_activities = prev_state['row']['activities'] * row_objcossims = prev_state['row']['objcossims'] * row_norms = prev_state['row']['norms'] # <<<<<<<<<<<<<< * row_is_at_lhs = prev_state['row']['is_at_lhs'] * row_is_at_rhs = prev_state['row']['is_at_rhs'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_norms); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4128, __pyx_L1_error) __pyx_t_38 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer, (PyObject*)__pyx_t_38, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_norms, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_norms.diminfo[0].strides = __pyx_pybuffernd_row_norms.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_norms.diminfo[0].shape = __pyx_pybuffernd_row_norms.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4128, __pyx_L1_error) } __pyx_t_38 = 0; __pyx_v_row_norms = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4129 * row_objcossims = prev_state['row']['objcossims'] * row_norms = prev_state['row']['norms'] * row_is_at_lhs = prev_state['row']['is_at_lhs'] # <<<<<<<<<<<<<< * row_is_at_rhs = prev_state['row']['is_at_rhs'] * row_is_local = prev_state['row']['is_local'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_is_at_lhs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4129, __pyx_L1_error) __pyx_t_39 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer, (PyObject*)__pyx_t_39, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_is_at_lhs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_row_is_at_lhs.diminfo[0].strides = __pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_is_at_lhs.diminfo[0].shape = __pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4129, __pyx_L1_error) } __pyx_t_39 = 0; __pyx_v_row_is_at_lhs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4130 * row_norms = prev_state['row']['norms'] * row_is_at_lhs = prev_state['row']['is_at_lhs'] * row_is_at_rhs = prev_state['row']['is_at_rhs'] # <<<<<<<<<<<<<< * row_is_local = prev_state['row']['is_local'] * row_is_modifiable = prev_state['row']['is_modifiable'] */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_is_at_rhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4130, __pyx_L1_error) __pyx_t_40 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer, (PyObject*)__pyx_t_40, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_is_at_rhs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_row_is_at_rhs.diminfo[0].strides = __pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_is_at_rhs.diminfo[0].shape = __pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4130, __pyx_L1_error) } __pyx_t_40 = 0; __pyx_v_row_is_at_rhs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4131 * row_is_at_lhs = prev_state['row']['is_at_lhs'] * row_is_at_rhs = prev_state['row']['is_at_rhs'] * row_is_local = prev_state['row']['is_local'] # <<<<<<<<<<<<<< * row_is_modifiable = prev_state['row']['is_modifiable'] * row_is_removable = prev_state['row']['is_removable'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_is_local); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_row_is_local = __pyx_t_6; __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4132 * row_is_at_rhs = prev_state['row']['is_at_rhs'] * row_is_local = prev_state['row']['is_local'] * row_is_modifiable = prev_state['row']['is_modifiable'] # <<<<<<<<<<<<<< * row_is_removable = prev_state['row']['is_removable'] * */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_is_modifiable); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_row_is_modifiable = __pyx_t_5; __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4133 * row_is_local = prev_state['row']['is_local'] * row_is_modifiable = prev_state['row']['is_modifiable'] * row_is_removable = prev_state['row']['is_removable'] # <<<<<<<<<<<<<< * * cdef int nnzrs = 0 */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_is_removable); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_row_is_removable = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L10:; /* "pyscipopt/scip.pyx":4135 * row_is_removable = prev_state['row']['is_removable'] * * cdef int nnzrs = 0 # <<<<<<<<<<<<<< * cdef SCIP_Real activity, lhs, rhs, cst * for i in range(nrows): */ __pyx_v_nnzrs = 0; /* "pyscipopt/scip.pyx":4137 * cdef int nnzrs = 0 * cdef SCIP_Real activity, lhs, rhs, cst * for i in range(nrows): # <<<<<<<<<<<<<< * * # lhs <= activity + cst <= rhs */ __pyx_t_9 = __pyx_v_nrows; __pyx_t_25 = __pyx_t_9; for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_25; __pyx_t_26+=1) { __pyx_v_i = __pyx_t_26; /* "pyscipopt/scip.pyx":4140 * * # lhs <= activity + cst <= rhs * lhs = SCIProwGetLhs(rows[i]) # <<<<<<<<<<<<<< * rhs = SCIProwGetRhs(rows[i]) * cst = SCIProwGetConstant(rows[i]) */ __pyx_v_lhs = SCIProwGetLhs((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4141 * # lhs <= activity + cst <= rhs * lhs = SCIProwGetLhs(rows[i]) * rhs = SCIProwGetRhs(rows[i]) # <<<<<<<<<<<<<< * cst = SCIProwGetConstant(rows[i]) * activity = SCIPgetRowLPActivity(scip, rows[i]) # cst is part of activity */ __pyx_v_rhs = SCIProwGetRhs((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4142 * lhs = SCIProwGetLhs(rows[i]) * rhs = SCIProwGetRhs(rows[i]) * cst = SCIProwGetConstant(rows[i]) # <<<<<<<<<<<<<< * activity = SCIPgetRowLPActivity(scip, rows[i]) # cst is part of activity * */ __pyx_v_cst = SCIProwGetConstant((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4143 * rhs = SCIProwGetRhs(rows[i]) * cst = SCIProwGetConstant(rows[i]) * activity = SCIPgetRowLPActivity(scip, rows[i]) # cst is part of activity # <<<<<<<<<<<<<< * * if not update: */ __pyx_v_activity = SCIPgetRowLPActivity(__pyx_v_scip, (__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4145 * activity = SCIPgetRowLPActivity(scip, rows[i]) # cst is part of activity * * if not update: # <<<<<<<<<<<<<< * # number of coefficients * row_nnzrs[i] = SCIProwGetNLPNonz(rows[i]) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 4145, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_4) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4147 * if not update: * # number of coefficients * row_nnzrs[i] = SCIProwGetNLPNonz(rows[i]) # <<<<<<<<<<<<<< * nnzrs += row_nnzrs[i] * */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_nnzrs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4147, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_nnzrs.diminfo[0].strides) = SCIProwGetNLPNonz((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4148 * # number of coefficients * row_nnzrs[i] = SCIProwGetNLPNonz(rows[i]) * nnzrs += row_nnzrs[i] # <<<<<<<<<<<<<< * * # left-hand-side */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_nnzrs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4148, __pyx_L1_error) } __pyx_v_nnzrs = (__pyx_v_nnzrs + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_nnzrs.diminfo[0].strides))); /* "pyscipopt/scip.pyx":4151 * * # left-hand-side * if SCIPisInfinity(scip, REALABS(lhs)): # <<<<<<<<<<<<<< * row_lhss[i] = NAN * else: */ __pyx_t_2 = (SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_lhs)) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4152 * # left-hand-side * if SCIPisInfinity(scip, REALABS(lhs)): * row_lhss[i] = NAN # <<<<<<<<<<<<<< * else: * row_lhss[i] = lhs - cst */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_lhss.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_lhss.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4152, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_lhss.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_lhss.diminfo[0].strides) = NPY_NAN; /* "pyscipopt/scip.pyx":4151 * * # left-hand-side * if SCIPisInfinity(scip, REALABS(lhs)): # <<<<<<<<<<<<<< * row_lhss[i] = NAN * else: */ goto __pyx_L14; } /* "pyscipopt/scip.pyx":4154 * row_lhss[i] = NAN * else: * row_lhss[i] = lhs - cst # <<<<<<<<<<<<<< * * # right-hand-side */ /*else*/ { __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_lhss.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_lhss.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4154, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_lhss.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_lhss.diminfo[0].strides) = (__pyx_v_lhs - __pyx_v_cst); } __pyx_L14:; /* "pyscipopt/scip.pyx":4157 * * # right-hand-side * if SCIPisInfinity(scip, REALABS(rhs)): # <<<<<<<<<<<<<< * row_rhss[i] = NAN * else: */ __pyx_t_2 = (SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_rhs)) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4158 * # right-hand-side * if SCIPisInfinity(scip, REALABS(rhs)): * row_rhss[i] = NAN # <<<<<<<<<<<<<< * else: * row_rhss[i] = rhs - cst */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_rhss.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_rhss.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4158, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_rhss.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_rhss.diminfo[0].strides) = NPY_NAN; /* "pyscipopt/scip.pyx":4157 * * # right-hand-side * if SCIPisInfinity(scip, REALABS(rhs)): # <<<<<<<<<<<<<< * row_rhss[i] = NAN * else: */ goto __pyx_L15; } /* "pyscipopt/scip.pyx":4160 * row_rhss[i] = NAN * else: * row_rhss[i] = rhs - cst # <<<<<<<<<<<<<< * * # row properties */ /*else*/ { __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_rhss.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_rhss.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4160, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_rhss.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_rhss.diminfo[0].strides) = (__pyx_v_rhs - __pyx_v_cst); } __pyx_L15:; /* "pyscipopt/scip.pyx":4163 * * # row properties * row_is_local[i] = SCIProwIsLocal(rows[i]) # <<<<<<<<<<<<<< * row_is_modifiable[i] = SCIProwIsModifiable(rows[i]) * row_is_removable[i] = SCIProwIsRemovable(rows[i]) */ __pyx_t_6 = __Pyx_PyBool_FromLong(SCIProwIsLocal((__pyx_v_rows[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_row_is_local, __pyx_v_i, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 4163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4164 * # row properties * row_is_local[i] = SCIProwIsLocal(rows[i]) * row_is_modifiable[i] = SCIProwIsModifiable(rows[i]) # <<<<<<<<<<<<<< * row_is_removable[i] = SCIProwIsRemovable(rows[i]) * */ __pyx_t_6 = __Pyx_PyBool_FromLong(SCIProwIsModifiable((__pyx_v_rows[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_row_is_modifiable, __pyx_v_i, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 4164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4165 * row_is_local[i] = SCIProwIsLocal(rows[i]) * row_is_modifiable[i] = SCIProwIsModifiable(rows[i]) * row_is_removable[i] = SCIProwIsRemovable(rows[i]) # <<<<<<<<<<<<<< * * # Objective cosine similarity - inspired from SCIProwGetObjParallelism() */ __pyx_t_6 = __Pyx_PyBool_FromLong(SCIProwIsRemovable((__pyx_v_rows[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_row_is_removable, __pyx_v_i, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 4165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4168 * * # Objective cosine similarity - inspired from SCIProwGetObjParallelism() * SCIPlpRecalculateObjSqrNorm(scip.set, scip.lp) # <<<<<<<<<<<<<< * prod = rows[i].sqrnorm * scip.lp.objsqrnorm * row_objcossims[i] = rows[i].objprod / SQRT(prod) if SCIPisPositive(scip, prod) else 0.0 */ SCIPlpRecalculateObjSqrNorm(__pyx_v_scip->set, __pyx_v_scip->lp); /* "pyscipopt/scip.pyx":4169 * # Objective cosine similarity - inspired from SCIProwGetObjParallelism() * SCIPlpRecalculateObjSqrNorm(scip.set, scip.lp) * prod = rows[i].sqrnorm * scip.lp.objsqrnorm # <<<<<<<<<<<<<< * row_objcossims[i] = rows[i].objprod / SQRT(prod) if SCIPisPositive(scip, prod) else 0.0 * */ __pyx_v_prod = ((__pyx_v_rows[__pyx_v_i])->sqrnorm * __pyx_v_scip->lp->objsqrnorm); /* "pyscipopt/scip.pyx":4170 * SCIPlpRecalculateObjSqrNorm(scip.set, scip.lp) * prod = rows[i].sqrnorm * scip.lp.objsqrnorm * row_objcossims[i] = rows[i].objprod / SQRT(prod) if SCIPisPositive(scip, prod) else 0.0 # <<<<<<<<<<<<<< * * # L2 norm */ if ((SCIPisPositive(__pyx_v_scip, __pyx_v_prod) != 0)) { __pyx_t_42 = sqrt(__pyx_v_prod); if (unlikely(__pyx_t_42 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4170, __pyx_L1_error) } __pyx_t_41 = ((__pyx_v_rows[__pyx_v_i])->objprod / ((SCIP_Real)__pyx_t_42)); } else { __pyx_t_41 = 0.0; } __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_objcossims.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_objcossims.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4170, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_objcossims.diminfo[0].strides) = __pyx_t_41; /* "pyscipopt/scip.pyx":4173 * * # L2 norm * row_norms[i] = SCIProwGetNorm(rows[i]) # cst ? # <<<<<<<<<<<<<< * * # Dual solution */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_norms.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_norms.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4173, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_norms.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_norms.diminfo[0].strides) = SCIProwGetNorm((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4145 * activity = SCIPgetRowLPActivity(scip, rows[i]) # cst is part of activity * * if not update: # <<<<<<<<<<<<<< * # number of coefficients * row_nnzrs[i] = SCIProwGetNLPNonz(rows[i]) */ } /* "pyscipopt/scip.pyx":4176 * * # Dual solution * row_dualsols[i] = SCIProwGetDualsol(rows[i]) # <<<<<<<<<<<<<< * * # Basis status */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_dualsols.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_dualsols.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4176, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_dualsols.diminfo[0].strides) = SCIProwGetDualsol((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4179 * * # Basis status * row_basestats[i] = SCIProwGetBasisStatus(rows[i]) # <<<<<<<<<<<<<< * * # Age */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_basestats.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_basestats.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4179, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_basestats.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_basestats.diminfo[0].strides) = SCIProwGetBasisStatus((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4182 * * # Age * row_ages[i] = SCIProwGetAge(rows[i]) # <<<<<<<<<<<<<< * * # Activity */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_ages.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_ages.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4182, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_ages.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_ages.diminfo[0].strides) = SCIProwGetAge((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4185 * * # Activity * row_activities[i] = activity - cst # <<<<<<<<<<<<<< * * # Is tight */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_activities.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_activities.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4185, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_row_activities.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_activities.diminfo[0].strides) = (__pyx_v_activity - __pyx_v_cst); /* "pyscipopt/scip.pyx":4188 * * # Is tight * row_is_at_lhs[i] = SCIPisEQ(scip, activity, lhs) # <<<<<<<<<<<<<< * row_is_at_rhs[i] = SCIPisEQ(scip, activity, rhs) * */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_is_at_lhs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_is_at_lhs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4188, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_is_at_lhs.diminfo[0].strides) = SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_lhs); /* "pyscipopt/scip.pyx":4189 * # Is tight * row_is_at_lhs[i] = SCIPisEQ(scip, activity, lhs) * row_is_at_rhs[i] = SCIPisEQ(scip, activity, rhs) # <<<<<<<<<<<<<< * * */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_is_at_rhs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_is_at_rhs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4189, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_is_at_rhs.diminfo[0].strides) = SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_rhs); } /* "pyscipopt/scip.pyx":4197 * * # Row coefficients * if not update: # <<<<<<<<<<<<<< * coef_colidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) * coef_rowidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4197, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_2) != 0); if (__pyx_t_4) { /* "pyscipopt/scip.pyx":4198 * # Row coefficients * if not update: * coef_colidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) # <<<<<<<<<<<<<< * coef_rowidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) * coef_vals = np.empty(shape=(nnzrs, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nnzrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4198, __pyx_L1_error) __pyx_t_43 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer, (PyObject*)__pyx_t_43, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_coef_colidxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_coef_colidxs.diminfo[0].strides = __pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_coef_colidxs.diminfo[0].shape = __pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4198, __pyx_L1_error) } __pyx_t_43 = 0; __pyx_v_coef_colidxs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4199 * if not update: * coef_colidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) * coef_rowidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) # <<<<<<<<<<<<<< * coef_vals = np.empty(shape=(nnzrs, ), dtype=np.float32) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nnzrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4199, __pyx_L1_error) __pyx_t_44 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer, (PyObject*)__pyx_t_44, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_coef_rowidxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_coef_rowidxs.diminfo[0].strides = __pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_coef_rowidxs.diminfo[0].shape = __pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4199, __pyx_L1_error) } __pyx_t_44 = 0; __pyx_v_coef_rowidxs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4200 * coef_colidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) * coef_rowidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) * coef_vals = np.empty(shape=(nnzrs, ), dtype=np.float32) # <<<<<<<<<<<<<< * else: * coef_colidxs = prev_state['nzrcoef']['colidxs'] */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nnzrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4200, __pyx_L1_error) __pyx_t_45 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer, (PyObject*)__pyx_t_45, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_coef_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_coef_vals.diminfo[0].strides = __pyx_pybuffernd_coef_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_coef_vals.diminfo[0].shape = __pyx_pybuffernd_coef_vals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4200, __pyx_L1_error) } __pyx_t_45 = 0; __pyx_v_coef_vals = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4197 * * # Row coefficients * if not update: # <<<<<<<<<<<<<< * coef_colidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) * coef_rowidxs = np.empty(shape=(nnzrs, ), dtype=np.int32) */ goto __pyx_L16; } /* "pyscipopt/scip.pyx":4202 * coef_vals = np.empty(shape=(nnzrs, ), dtype=np.float32) * else: * coef_colidxs = prev_state['nzrcoef']['colidxs'] # <<<<<<<<<<<<<< * coef_rowidxs = prev_state['nzrcoef']['rowidxs'] * coef_vals = prev_state['nzrcoef']['vals'] */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_nzrcoef); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_colidxs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4202, __pyx_L1_error) __pyx_t_43 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer, (PyObject*)__pyx_t_43, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_coef_colidxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_coef_colidxs.diminfo[0].strides = __pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_coef_colidxs.diminfo[0].shape = __pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4202, __pyx_L1_error) } __pyx_t_43 = 0; __pyx_v_coef_colidxs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4203 * else: * coef_colidxs = prev_state['nzrcoef']['colidxs'] * coef_rowidxs = prev_state['nzrcoef']['rowidxs'] # <<<<<<<<<<<<<< * coef_vals = prev_state['nzrcoef']['vals'] * */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_nzrcoef); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_rowidxs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4203, __pyx_L1_error) __pyx_t_44 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer, (PyObject*)__pyx_t_44, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_coef_rowidxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; } __pyx_pybuffernd_coef_rowidxs.diminfo[0].strides = __pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_coef_rowidxs.diminfo[0].shape = __pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4203, __pyx_L1_error) } __pyx_t_44 = 0; __pyx_v_coef_rowidxs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4204 * coef_colidxs = prev_state['nzrcoef']['colidxs'] * coef_rowidxs = prev_state['nzrcoef']['rowidxs'] * coef_vals = prev_state['nzrcoef']['vals'] # <<<<<<<<<<<<<< * * cdef SCIP_COL ** row_cols */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_prev_state, __pyx_n_u_nzrcoef); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_vals); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4204, __pyx_L1_error) __pyx_t_45 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer, (PyObject*)__pyx_t_45, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_coef_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0; } __pyx_pybuffernd_coef_vals.diminfo[0].strides = __pyx_pybuffernd_coef_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_coef_vals.diminfo[0].shape = __pyx_pybuffernd_coef_vals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(3, 4204, __pyx_L1_error) } __pyx_t_45 = 0; __pyx_v_coef_vals = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L16:; /* "pyscipopt/scip.pyx":4209 * cdef SCIP_Real * row_vals * * if not update: # <<<<<<<<<<<<<< * j = 0 * for i in range(nrows): */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 4209, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_4) != 0); if (__pyx_t_2) { /* "pyscipopt/scip.pyx":4210 * * if not update: * j = 0 # <<<<<<<<<<<<<< * for i in range(nrows): * */ __pyx_v_j = 0; /* "pyscipopt/scip.pyx":4211 * if not update: * j = 0 * for i in range(nrows): # <<<<<<<<<<<<<< * * # coefficient indexes and values */ __pyx_t_9 = __pyx_v_nrows; __pyx_t_25 = __pyx_t_9; for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_25; __pyx_t_26+=1) { __pyx_v_i = __pyx_t_26; /* "pyscipopt/scip.pyx":4214 * * # coefficient indexes and values * row_cols = SCIProwGetCols(rows[i]) # <<<<<<<<<<<<<< * row_vals = SCIProwGetVals(rows[i]) * for k in range(row_nnzrs[i]): */ __pyx_v_row_cols = SCIProwGetCols((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4215 * # coefficient indexes and values * row_cols = SCIProwGetCols(rows[i]) * row_vals = SCIProwGetVals(rows[i]) # <<<<<<<<<<<<<< * for k in range(row_nnzrs[i]): * coef_colidxs[j+k] = SCIPcolGetLPPos(row_cols[k]) */ __pyx_v_row_vals = SCIProwGetVals((__pyx_v_rows[__pyx_v_i])); /* "pyscipopt/scip.pyx":4216 * row_cols = SCIProwGetCols(rows[i]) * row_vals = SCIProwGetVals(rows[i]) * for k in range(row_nnzrs[i]): # <<<<<<<<<<<<<< * coef_colidxs[j+k] = SCIPcolGetLPPos(row_cols[k]) * coef_rowidxs[j+k] = i */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_nnzrs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4216, __pyx_L1_error) } __pyx_t_46 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_nnzrs.diminfo[0].strides)); __pyx_t_47 = __pyx_t_46; for (__pyx_t_28 = 0; __pyx_t_28 < __pyx_t_47; __pyx_t_28+=1) { __pyx_v_k = __pyx_t_28; /* "pyscipopt/scip.pyx":4217 * row_vals = SCIProwGetVals(rows[i]) * for k in range(row_nnzrs[i]): * coef_colidxs[j+k] = SCIPcolGetLPPos(row_cols[k]) # <<<<<<<<<<<<<< * coef_rowidxs[j+k] = i * coef_vals[j+k] = row_vals[k] */ __pyx_t_27 = (__pyx_v_j + __pyx_v_k); __pyx_t_29 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_coef_colidxs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_29 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_coef_colidxs.diminfo[0].shape)) __pyx_t_29 = 0; if (unlikely(__pyx_t_29 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_29); __PYX_ERR(3, 4217, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_coef_colidxs.diminfo[0].strides) = SCIPcolGetLPPos((__pyx_v_row_cols[__pyx_v_k])); /* "pyscipopt/scip.pyx":4218 * for k in range(row_nnzrs[i]): * coef_colidxs[j+k] = SCIPcolGetLPPos(row_cols[k]) * coef_rowidxs[j+k] = i # <<<<<<<<<<<<<< * coef_vals[j+k] = row_vals[k] * */ __pyx_t_27 = (__pyx_v_j + __pyx_v_k); __pyx_t_29 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_coef_rowidxs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_29 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_coef_rowidxs.diminfo[0].shape)) __pyx_t_29 = 0; if (unlikely(__pyx_t_29 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_29); __PYX_ERR(3, 4218, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_coef_rowidxs.diminfo[0].strides) = __pyx_v_i; /* "pyscipopt/scip.pyx":4219 * coef_colidxs[j+k] = SCIPcolGetLPPos(row_cols[k]) * coef_rowidxs[j+k] = i * coef_vals[j+k] = row_vals[k] # <<<<<<<<<<<<<< * * j += row_nnzrs[i] */ __pyx_t_27 = (__pyx_v_j + __pyx_v_k); __pyx_t_29 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_coef_vals.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_29 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_coef_vals.diminfo[0].shape)) __pyx_t_29 = 0; if (unlikely(__pyx_t_29 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_29); __PYX_ERR(3, 4219, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_coef_vals.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_coef_vals.diminfo[0].strides) = (__pyx_v_row_vals[__pyx_v_k]); } /* "pyscipopt/scip.pyx":4221 * coef_vals[j+k] = row_vals[k] * * j += row_nnzrs[i] # <<<<<<<<<<<<<< * * */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_row_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_row_nnzrs.diminfo[0].shape)) __pyx_t_28 = 0; if (unlikely(__pyx_t_28 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_28); __PYX_ERR(3, 4221, __pyx_L1_error) } __pyx_v_j = (__pyx_v_j + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_row_nnzrs.diminfo[0].strides))); } /* "pyscipopt/scip.pyx":4209 * cdef SCIP_Real * row_vals * * if not update: # <<<<<<<<<<<<<< * j = 0 * for i in range(nrows): */ } /* "pyscipopt/scip.pyx":4224 * * * return { # <<<<<<<<<<<<<< * 'col': { * 'types': col_types, */ __Pyx_XDECREF(__pyx_r); /* "pyscipopt/scip.pyx":4225 * * return { * 'col': { # <<<<<<<<<<<<<< * 'types': col_types, * 'coefs': col_coefs, */ __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "pyscipopt/scip.pyx":4226 * return { * 'col': { * 'types': col_types, # <<<<<<<<<<<<<< * 'coefs': col_coefs, * 'lbs': col_lbs, */ __pyx_t_6 = __Pyx_PyDict_NewPresized(13); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_types, ((PyObject *)__pyx_v_col_types)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4227 * 'col': { * 'types': col_types, * 'coefs': col_coefs, # <<<<<<<<<<<<<< * 'lbs': col_lbs, * 'ubs': col_ubs, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_coefs, ((PyObject *)__pyx_v_col_coefs)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4228 * 'types': col_types, * 'coefs': col_coefs, * 'lbs': col_lbs, # <<<<<<<<<<<<<< * 'ubs': col_ubs, * 'basestats': col_basestats, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_lbs, ((PyObject *)__pyx_v_col_lbs)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4229 * 'coefs': col_coefs, * 'lbs': col_lbs, * 'ubs': col_ubs, # <<<<<<<<<<<<<< * 'basestats': col_basestats, * 'redcosts': col_redcosts, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_ubs, ((PyObject *)__pyx_v_col_ubs)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4230 * 'lbs': col_lbs, * 'ubs': col_ubs, * 'basestats': col_basestats, # <<<<<<<<<<<<<< * 'redcosts': col_redcosts, * 'ages': col_ages, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_basestats, ((PyObject *)__pyx_v_col_basestats)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4231 * 'ubs': col_ubs, * 'basestats': col_basestats, * 'redcosts': col_redcosts, # <<<<<<<<<<<<<< * 'ages': col_ages, * 'solvals': col_solvals, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_redcosts, ((PyObject *)__pyx_v_col_redcosts)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4232 * 'basestats': col_basestats, * 'redcosts': col_redcosts, * 'ages': col_ages, # <<<<<<<<<<<<<< * 'solvals': col_solvals, * 'solfracs': col_solfracs, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_ages, ((PyObject *)__pyx_v_col_ages)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4233 * 'redcosts': col_redcosts, * 'ages': col_ages, * 'solvals': col_solvals, # <<<<<<<<<<<<<< * 'solfracs': col_solfracs, * 'sol_is_at_lb': col_sol_is_at_lb, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_solvals, ((PyObject *)__pyx_v_col_solvals)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4234 * 'ages': col_ages, * 'solvals': col_solvals, * 'solfracs': col_solfracs, # <<<<<<<<<<<<<< * 'sol_is_at_lb': col_sol_is_at_lb, * 'sol_is_at_ub': col_sol_is_at_ub, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_solfracs, ((PyObject *)__pyx_v_col_solfracs)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4235 * 'solvals': col_solvals, * 'solfracs': col_solfracs, * 'sol_is_at_lb': col_sol_is_at_lb, # <<<<<<<<<<<<<< * 'sol_is_at_ub': col_sol_is_at_ub, * 'incvals': col_incvals, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_sol_is_at_lb, ((PyObject *)__pyx_v_col_sol_is_at_lb)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4236 * 'solfracs': col_solfracs, * 'sol_is_at_lb': col_sol_is_at_lb, * 'sol_is_at_ub': col_sol_is_at_ub, # <<<<<<<<<<<<<< * 'incvals': col_incvals, * 'avgincvals': col_avgincvals, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_sol_is_at_ub, ((PyObject *)__pyx_v_col_sol_is_at_ub)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4237 * 'sol_is_at_lb': col_sol_is_at_lb, * 'sol_is_at_ub': col_sol_is_at_ub, * 'incvals': col_incvals, # <<<<<<<<<<<<<< * 'avgincvals': col_avgincvals, * }, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_incvals, ((PyObject *)__pyx_v_col_incvals)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) /* "pyscipopt/scip.pyx":4238 * 'sol_is_at_ub': col_sol_is_at_ub, * 'incvals': col_incvals, * 'avgincvals': col_avgincvals, # <<<<<<<<<<<<<< * }, * 'row': { */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_avgincvals, ((PyObject *)__pyx_v_col_avgincvals)) < 0) __PYX_ERR(3, 4226, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_col, __pyx_t_6) < 0) __PYX_ERR(3, 4225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4241 * }, * 'row': { * 'lhss': row_lhss, # <<<<<<<<<<<<<< * 'rhss': row_rhss, * 'nnzrs': row_nnzrs, */ __pyx_t_6 = __Pyx_PyDict_NewPresized(14); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_lhss, ((PyObject *)__pyx_v_row_lhss)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4242 * 'row': { * 'lhss': row_lhss, * 'rhss': row_rhss, # <<<<<<<<<<<<<< * 'nnzrs': row_nnzrs, * 'dualsols': row_dualsols, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_rhss, ((PyObject *)__pyx_v_row_rhss)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4243 * 'lhss': row_lhss, * 'rhss': row_rhss, * 'nnzrs': row_nnzrs, # <<<<<<<<<<<<<< * 'dualsols': row_dualsols, * 'basestats': row_basestats, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_nnzrs, ((PyObject *)__pyx_v_row_nnzrs)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4244 * 'rhss': row_rhss, * 'nnzrs': row_nnzrs, * 'dualsols': row_dualsols, # <<<<<<<<<<<<<< * 'basestats': row_basestats, * 'ages': row_ages, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_dualsols, ((PyObject *)__pyx_v_row_dualsols)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4245 * 'nnzrs': row_nnzrs, * 'dualsols': row_dualsols, * 'basestats': row_basestats, # <<<<<<<<<<<<<< * 'ages': row_ages, * 'activities': row_activities, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_basestats, ((PyObject *)__pyx_v_row_basestats)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4246 * 'dualsols': row_dualsols, * 'basestats': row_basestats, * 'ages': row_ages, # <<<<<<<<<<<<<< * 'activities': row_activities, * 'objcossims': row_objcossims, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_ages, ((PyObject *)__pyx_v_row_ages)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4247 * 'basestats': row_basestats, * 'ages': row_ages, * 'activities': row_activities, # <<<<<<<<<<<<<< * 'objcossims': row_objcossims, * 'norms': row_norms, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_activities, ((PyObject *)__pyx_v_row_activities)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4248 * 'ages': row_ages, * 'activities': row_activities, * 'objcossims': row_objcossims, # <<<<<<<<<<<<<< * 'norms': row_norms, * 'is_at_lhs': row_is_at_lhs, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_objcossims, ((PyObject *)__pyx_v_row_objcossims)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4249 * 'activities': row_activities, * 'objcossims': row_objcossims, * 'norms': row_norms, # <<<<<<<<<<<<<< * 'is_at_lhs': row_is_at_lhs, * 'is_at_rhs': row_is_at_rhs, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_norms, ((PyObject *)__pyx_v_row_norms)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4250 * 'objcossims': row_objcossims, * 'norms': row_norms, * 'is_at_lhs': row_is_at_lhs, # <<<<<<<<<<<<<< * 'is_at_rhs': row_is_at_rhs, * 'is_local': row_is_local, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_is_at_lhs, ((PyObject *)__pyx_v_row_is_at_lhs)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4251 * 'norms': row_norms, * 'is_at_lhs': row_is_at_lhs, * 'is_at_rhs': row_is_at_rhs, # <<<<<<<<<<<<<< * 'is_local': row_is_local, * 'is_modifiable': row_is_modifiable, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_is_at_rhs, ((PyObject *)__pyx_v_row_is_at_rhs)) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4252 * 'is_at_lhs': row_is_at_lhs, * 'is_at_rhs': row_is_at_rhs, * 'is_local': row_is_local, # <<<<<<<<<<<<<< * 'is_modifiable': row_is_modifiable, * 'is_removable': row_is_removable, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_is_local, __pyx_v_row_is_local) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4253 * 'is_at_rhs': row_is_at_rhs, * 'is_local': row_is_local, * 'is_modifiable': row_is_modifiable, # <<<<<<<<<<<<<< * 'is_removable': row_is_removable, * }, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_is_modifiable, __pyx_v_row_is_modifiable) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) /* "pyscipopt/scip.pyx":4254 * 'is_local': row_is_local, * 'is_modifiable': row_is_modifiable, * 'is_removable': row_is_removable, # <<<<<<<<<<<<<< * }, * 'nzrcoef': { */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_is_removable, __pyx_v_row_is_removable) < 0) __PYX_ERR(3, 4241, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_row, __pyx_t_6) < 0) __PYX_ERR(3, 4225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4257 * }, * 'nzrcoef': { * 'colidxs': coef_colidxs, # <<<<<<<<<<<<<< * 'rowidxs': coef_rowidxs, * 'vals': coef_vals, */ __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_colidxs, ((PyObject *)__pyx_v_coef_colidxs)) < 0) __PYX_ERR(3, 4257, __pyx_L1_error) /* "pyscipopt/scip.pyx":4258 * 'nzrcoef': { * 'colidxs': coef_colidxs, * 'rowidxs': coef_rowidxs, # <<<<<<<<<<<<<< * 'vals': coef_vals, * }, */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_rowidxs, ((PyObject *)__pyx_v_coef_rowidxs)) < 0) __PYX_ERR(3, 4257, __pyx_L1_error) /* "pyscipopt/scip.pyx":4259 * 'colidxs': coef_colidxs, * 'rowidxs': coef_rowidxs, * 'vals': coef_vals, # <<<<<<<<<<<<<< * }, * 'stats': { */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_vals, ((PyObject *)__pyx_v_coef_vals)) < 0) __PYX_ERR(3, 4257, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_nzrcoef, __pyx_t_6) < 0) __PYX_ERR(3, 4225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":4262 * }, * 'stats': { * 'nlps': SCIPgetNLPs(scip), # <<<<<<<<<<<<<< * }, * } */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_nlps, __pyx_t_3) < 0) __PYX_ERR(3, 4262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_stats, __pyx_t_6) < 0) __PYX_ERR(3, 4225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":3980 * * * def getState(self, prev_state = None): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef int i, j, k, col_i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getState", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_colidxs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_rowidxs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_coef_vals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ages.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_avgincvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_basestats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_incvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_redcosts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_lb.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_is_at_ub.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solfracs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_types.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_activities.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ages.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_basestats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_dualsols.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_lhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_is_at_rhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_lhss.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_norms.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_objcossims.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_rhss.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_update); __Pyx_XDECREF((PyObject *)__pyx_v_col_types); __Pyx_XDECREF((PyObject *)__pyx_v_col_coefs); __Pyx_XDECREF((PyObject *)__pyx_v_col_lbs); __Pyx_XDECREF((PyObject *)__pyx_v_col_ubs); __Pyx_XDECREF((PyObject *)__pyx_v_col_basestats); __Pyx_XDECREF((PyObject *)__pyx_v_col_redcosts); __Pyx_XDECREF((PyObject *)__pyx_v_col_ages); __Pyx_XDECREF((PyObject *)__pyx_v_col_solvals); __Pyx_XDECREF((PyObject *)__pyx_v_col_solfracs); __Pyx_XDECREF((PyObject *)__pyx_v_col_sol_is_at_lb); __Pyx_XDECREF((PyObject *)__pyx_v_col_sol_is_at_ub); __Pyx_XDECREF((PyObject *)__pyx_v_col_incvals); __Pyx_XDECREF((PyObject *)__pyx_v_col_avgincvals); __Pyx_XDECREF((PyObject *)__pyx_v_row_lhss); __Pyx_XDECREF((PyObject *)__pyx_v_row_rhss); __Pyx_XDECREF((PyObject *)__pyx_v_row_nnzrs); __Pyx_XDECREF((PyObject *)__pyx_v_row_dualsols); __Pyx_XDECREF((PyObject *)__pyx_v_row_basestats); __Pyx_XDECREF((PyObject *)__pyx_v_row_ages); __Pyx_XDECREF((PyObject *)__pyx_v_row_activities); __Pyx_XDECREF((PyObject *)__pyx_v_row_objcossims); __Pyx_XDECREF((PyObject *)__pyx_v_row_norms); __Pyx_XDECREF((PyObject *)__pyx_v_row_is_at_lhs); __Pyx_XDECREF((PyObject *)__pyx_v_row_is_at_rhs); __Pyx_XDECREF(__pyx_v_row_is_local); __Pyx_XDECREF(__pyx_v_row_is_modifiable); __Pyx_XDECREF(__pyx_v_row_is_removable); __Pyx_XDECREF((PyObject *)__pyx_v_coef_colidxs); __Pyx_XDECREF((PyObject *)__pyx_v_coef_rowidxs); __Pyx_XDECREF((PyObject *)__pyx_v_coef_vals); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":4266 * } * * def getDingStateRows(self): # <<<<<<<<<<<<<< * # basic features * cdef np.ndarray[np.int32_t, ndim=1] cons_is_singleton */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_505getDingStateRows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_505getDingStateRows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDingStateRows (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_504getDingStateRows(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_504getDingStateRows(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyArrayObject *__pyx_v_cons_is_singleton = 0; PyArrayObject *__pyx_v_cons_is_aggregation = 0; PyArrayObject *__pyx_v_cons_is_precedence = 0; PyArrayObject *__pyx_v_cons_is_knapsack = 0; PyArrayObject *__pyx_v_cons_is_logicor = 0; PyArrayObject *__pyx_v_cons_is_general_linear = 0; PyArrayObject *__pyx_v_cons_is_AND = 0; PyArrayObject *__pyx_v_cons_is_OR = 0; PyArrayObject *__pyx_v_cons_is_XOR = 0; PyArrayObject *__pyx_v_cons_is_linking = 0; PyArrayObject *__pyx_v_cons_is_cardinality = 0; PyArrayObject *__pyx_v_cons_is_variable_bound = 0; PyArrayObject *__pyx_v_cons_lhs = 0; PyArrayObject *__pyx_v_cons_rhs = 0; PyArrayObject *__pyx_v_cons_nnzrs = 0; PyArrayObject *__pyx_v_cons_npos = 0; PyArrayObject *__pyx_v_cons_nneg = 0; PyArrayObject *__pyx_v_cons_dual_sol = 0; PyArrayObject *__pyx_v_cons_basis_status = 0; PyArrayObject *__pyx_v_cons_sum_abs = 0; PyArrayObject *__pyx_v_cons_sum_pos = 0; PyArrayObject *__pyx_v_cons_sum_neg = 0; PyArrayObject *__pyx_v_cons_coef_mean = 0; PyArrayObject *__pyx_v_cons_coef_stdev = 0; PyArrayObject *__pyx_v_cons_coef_min = 0; PyArrayObject *__pyx_v_cons_coef_max = 0; SCIP *__pyx_v_scip; int __pyx_v_nrows; int __pyx_v_row_i; int __pyx_v_nnzrs; int __pyx_v_npos; int __pyx_v_nneg; float __pyx_v_lhs; float __pyx_v_rhs; float __pyx_v_abs_sum_norm; float __pyx_v_pos_sum_norm; float __pyx_v_neg_sum_norm; float __pyx_v_mean; float __pyx_v_stdev; float __pyx_v_min1; float __pyx_v_max1; SCIP_ROW **__pyx_v_rows; SCIP_ROW *__pyx_v_row; PyObject *__pyx_v_consname = NULL; SCIP_Real *__pyx_v_vals; int __pyx_v_i; SCIP_BASESTAT __pyx_v_stat; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_basis_status; __Pyx_Buffer __pyx_pybuffer_cons_basis_status; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_coef_max; __Pyx_Buffer __pyx_pybuffer_cons_coef_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_coef_mean; __Pyx_Buffer __pyx_pybuffer_cons_coef_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_coef_min; __Pyx_Buffer __pyx_pybuffer_cons_coef_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_coef_stdev; __Pyx_Buffer __pyx_pybuffer_cons_coef_stdev; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_dual_sol; __Pyx_Buffer __pyx_pybuffer_cons_dual_sol; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_AND; __Pyx_Buffer __pyx_pybuffer_cons_is_AND; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_OR; __Pyx_Buffer __pyx_pybuffer_cons_is_OR; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_XOR; __Pyx_Buffer __pyx_pybuffer_cons_is_XOR; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_aggregation; __Pyx_Buffer __pyx_pybuffer_cons_is_aggregation; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_cardinality; __Pyx_Buffer __pyx_pybuffer_cons_is_cardinality; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_general_linear; __Pyx_Buffer __pyx_pybuffer_cons_is_general_linear; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_knapsack; __Pyx_Buffer __pyx_pybuffer_cons_is_knapsack; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_linking; __Pyx_Buffer __pyx_pybuffer_cons_is_linking; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_logicor; __Pyx_Buffer __pyx_pybuffer_cons_is_logicor; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_precedence; __Pyx_Buffer __pyx_pybuffer_cons_is_precedence; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_singleton; __Pyx_Buffer __pyx_pybuffer_cons_is_singleton; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_is_variable_bound; __Pyx_Buffer __pyx_pybuffer_cons_is_variable_bound; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_lhs; __Pyx_Buffer __pyx_pybuffer_cons_lhs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_nneg; __Pyx_Buffer __pyx_pybuffer_cons_nneg; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_nnzrs; __Pyx_Buffer __pyx_pybuffer_cons_nnzrs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_npos; __Pyx_Buffer __pyx_pybuffer_cons_npos; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_rhs; __Pyx_Buffer __pyx_pybuffer_cons_rhs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_sum_abs; __Pyx_Buffer __pyx_pybuffer_cons_sum_abs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_sum_neg; __Pyx_Buffer __pyx_pybuffer_cons_sum_neg; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_sum_pos; __Pyx_Buffer __pyx_pybuffer_cons_sum_pos; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; PyArrayObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; PyArrayObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; PyArrayObject *__pyx_t_22 = NULL; PyArrayObject *__pyx_t_23 = NULL; PyArrayObject *__pyx_t_24 = NULL; PyArrayObject *__pyx_t_25 = NULL; PyArrayObject *__pyx_t_26 = NULL; PyArrayObject *__pyx_t_27 = NULL; PyArrayObject *__pyx_t_28 = NULL; PyArrayObject *__pyx_t_29 = NULL; PyArrayObject *__pyx_t_30 = NULL; PyArrayObject *__pyx_t_31 = NULL; PyArrayObject *__pyx_t_32 = NULL; PyArrayObject *__pyx_t_33 = NULL; PyArrayObject *__pyx_t_34 = NULL; PyArrayObject *__pyx_t_35 = NULL; int __pyx_t_36; int __pyx_t_37; __pyx_t_5numpy_int32_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_t_40; int __pyx_t_41; int __pyx_t_42; int __pyx_t_43; int __pyx_t_44; SCIP_Real __pyx_t_45; float __pyx_t_46; SCIP_Real __pyx_t_47; double __pyx_t_48; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDingStateRows", 0); __pyx_pybuffer_cons_is_singleton.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_singleton.refcount = 0; __pyx_pybuffernd_cons_is_singleton.data = NULL; __pyx_pybuffernd_cons_is_singleton.rcbuffer = &__pyx_pybuffer_cons_is_singleton; __pyx_pybuffer_cons_is_aggregation.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_aggregation.refcount = 0; __pyx_pybuffernd_cons_is_aggregation.data = NULL; __pyx_pybuffernd_cons_is_aggregation.rcbuffer = &__pyx_pybuffer_cons_is_aggregation; __pyx_pybuffer_cons_is_precedence.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_precedence.refcount = 0; __pyx_pybuffernd_cons_is_precedence.data = NULL; __pyx_pybuffernd_cons_is_precedence.rcbuffer = &__pyx_pybuffer_cons_is_precedence; __pyx_pybuffer_cons_is_knapsack.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_knapsack.refcount = 0; __pyx_pybuffernd_cons_is_knapsack.data = NULL; __pyx_pybuffernd_cons_is_knapsack.rcbuffer = &__pyx_pybuffer_cons_is_knapsack; __pyx_pybuffer_cons_is_logicor.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_logicor.refcount = 0; __pyx_pybuffernd_cons_is_logicor.data = NULL; __pyx_pybuffernd_cons_is_logicor.rcbuffer = &__pyx_pybuffer_cons_is_logicor; __pyx_pybuffer_cons_is_general_linear.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_general_linear.refcount = 0; __pyx_pybuffernd_cons_is_general_linear.data = NULL; __pyx_pybuffernd_cons_is_general_linear.rcbuffer = &__pyx_pybuffer_cons_is_general_linear; __pyx_pybuffer_cons_is_AND.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_AND.refcount = 0; __pyx_pybuffernd_cons_is_AND.data = NULL; __pyx_pybuffernd_cons_is_AND.rcbuffer = &__pyx_pybuffer_cons_is_AND; __pyx_pybuffer_cons_is_OR.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_OR.refcount = 0; __pyx_pybuffernd_cons_is_OR.data = NULL; __pyx_pybuffernd_cons_is_OR.rcbuffer = &__pyx_pybuffer_cons_is_OR; __pyx_pybuffer_cons_is_XOR.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_XOR.refcount = 0; __pyx_pybuffernd_cons_is_XOR.data = NULL; __pyx_pybuffernd_cons_is_XOR.rcbuffer = &__pyx_pybuffer_cons_is_XOR; __pyx_pybuffer_cons_is_linking.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_linking.refcount = 0; __pyx_pybuffernd_cons_is_linking.data = NULL; __pyx_pybuffernd_cons_is_linking.rcbuffer = &__pyx_pybuffer_cons_is_linking; __pyx_pybuffer_cons_is_cardinality.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_cardinality.refcount = 0; __pyx_pybuffernd_cons_is_cardinality.data = NULL; __pyx_pybuffernd_cons_is_cardinality.rcbuffer = &__pyx_pybuffer_cons_is_cardinality; __pyx_pybuffer_cons_is_variable_bound.pybuffer.buf = NULL; __pyx_pybuffer_cons_is_variable_bound.refcount = 0; __pyx_pybuffernd_cons_is_variable_bound.data = NULL; __pyx_pybuffernd_cons_is_variable_bound.rcbuffer = &__pyx_pybuffer_cons_is_variable_bound; __pyx_pybuffer_cons_lhs.pybuffer.buf = NULL; __pyx_pybuffer_cons_lhs.refcount = 0; __pyx_pybuffernd_cons_lhs.data = NULL; __pyx_pybuffernd_cons_lhs.rcbuffer = &__pyx_pybuffer_cons_lhs; __pyx_pybuffer_cons_rhs.pybuffer.buf = NULL; __pyx_pybuffer_cons_rhs.refcount = 0; __pyx_pybuffernd_cons_rhs.data = NULL; __pyx_pybuffernd_cons_rhs.rcbuffer = &__pyx_pybuffer_cons_rhs; __pyx_pybuffer_cons_nnzrs.pybuffer.buf = NULL; __pyx_pybuffer_cons_nnzrs.refcount = 0; __pyx_pybuffernd_cons_nnzrs.data = NULL; __pyx_pybuffernd_cons_nnzrs.rcbuffer = &__pyx_pybuffer_cons_nnzrs; __pyx_pybuffer_cons_npos.pybuffer.buf = NULL; __pyx_pybuffer_cons_npos.refcount = 0; __pyx_pybuffernd_cons_npos.data = NULL; __pyx_pybuffernd_cons_npos.rcbuffer = &__pyx_pybuffer_cons_npos; __pyx_pybuffer_cons_nneg.pybuffer.buf = NULL; __pyx_pybuffer_cons_nneg.refcount = 0; __pyx_pybuffernd_cons_nneg.data = NULL; __pyx_pybuffernd_cons_nneg.rcbuffer = &__pyx_pybuffer_cons_nneg; __pyx_pybuffer_cons_dual_sol.pybuffer.buf = NULL; __pyx_pybuffer_cons_dual_sol.refcount = 0; __pyx_pybuffernd_cons_dual_sol.data = NULL; __pyx_pybuffernd_cons_dual_sol.rcbuffer = &__pyx_pybuffer_cons_dual_sol; __pyx_pybuffer_cons_basis_status.pybuffer.buf = NULL; __pyx_pybuffer_cons_basis_status.refcount = 0; __pyx_pybuffernd_cons_basis_status.data = NULL; __pyx_pybuffernd_cons_basis_status.rcbuffer = &__pyx_pybuffer_cons_basis_status; __pyx_pybuffer_cons_sum_abs.pybuffer.buf = NULL; __pyx_pybuffer_cons_sum_abs.refcount = 0; __pyx_pybuffernd_cons_sum_abs.data = NULL; __pyx_pybuffernd_cons_sum_abs.rcbuffer = &__pyx_pybuffer_cons_sum_abs; __pyx_pybuffer_cons_sum_pos.pybuffer.buf = NULL; __pyx_pybuffer_cons_sum_pos.refcount = 0; __pyx_pybuffernd_cons_sum_pos.data = NULL; __pyx_pybuffernd_cons_sum_pos.rcbuffer = &__pyx_pybuffer_cons_sum_pos; __pyx_pybuffer_cons_sum_neg.pybuffer.buf = NULL; __pyx_pybuffer_cons_sum_neg.refcount = 0; __pyx_pybuffernd_cons_sum_neg.data = NULL; __pyx_pybuffernd_cons_sum_neg.rcbuffer = &__pyx_pybuffer_cons_sum_neg; __pyx_pybuffer_cons_coef_mean.pybuffer.buf = NULL; __pyx_pybuffer_cons_coef_mean.refcount = 0; __pyx_pybuffernd_cons_coef_mean.data = NULL; __pyx_pybuffernd_cons_coef_mean.rcbuffer = &__pyx_pybuffer_cons_coef_mean; __pyx_pybuffer_cons_coef_stdev.pybuffer.buf = NULL; __pyx_pybuffer_cons_coef_stdev.refcount = 0; __pyx_pybuffernd_cons_coef_stdev.data = NULL; __pyx_pybuffernd_cons_coef_stdev.rcbuffer = &__pyx_pybuffer_cons_coef_stdev; __pyx_pybuffer_cons_coef_min.pybuffer.buf = NULL; __pyx_pybuffer_cons_coef_min.refcount = 0; __pyx_pybuffernd_cons_coef_min.data = NULL; __pyx_pybuffernd_cons_coef_min.rcbuffer = &__pyx_pybuffer_cons_coef_min; __pyx_pybuffer_cons_coef_max.pybuffer.buf = NULL; __pyx_pybuffer_cons_coef_max.refcount = 0; __pyx_pybuffernd_cons_coef_max.data = NULL; __pyx_pybuffernd_cons_coef_max.rcbuffer = &__pyx_pybuffer_cons_coef_max; /* "pyscipopt/scip.pyx":4299 * cdef np.ndarray[np.float32_t, ndim=1] cons_coef_max * * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * cdef int nrows = SCIPgetNLPRows(scip) * */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":4300 * * cdef SCIP* scip = self._scip * cdef int nrows = SCIPgetNLPRows(scip) # <<<<<<<<<<<<<< * * # basic features */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4303 * * # basic features * cons_is_singleton = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_aggregation = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_precedence = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4303, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_singleton, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_is_singleton.diminfo[0].strides = __pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_singleton.diminfo[0].shape = __pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4303, __pyx_L1_error) } __pyx_t_6 = 0; __pyx_v_cons_is_singleton = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4304 * # basic features * cons_is_singleton = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_aggregation = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_precedence = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_knapsack = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4304, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_aggregation, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_is_aggregation.diminfo[0].strides = __pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_aggregation.diminfo[0].shape = __pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4304, __pyx_L1_error) } __pyx_t_11 = 0; __pyx_v_cons_is_aggregation = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4305 * cons_is_singleton = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_aggregation = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_precedence = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_knapsack = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_logicor = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4305, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_precedence, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_is_precedence.diminfo[0].strides = __pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_precedence.diminfo[0].shape = __pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4305, __pyx_L1_error) } __pyx_t_12 = 0; __pyx_v_cons_is_precedence = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4306 * cons_is_aggregation = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_precedence = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_knapsack = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_logicor = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_general_linear = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4306, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_knapsack, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_is_knapsack.diminfo[0].strides = __pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_knapsack.diminfo[0].shape = __pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4306, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_cons_is_knapsack = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4307 * cons_is_precedence = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_knapsack = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_logicor = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_general_linear = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_AND = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4307, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_logicor, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_is_logicor.diminfo[0].strides = __pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_logicor.diminfo[0].shape = __pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4307, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_cons_is_logicor = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4308 * cons_is_knapsack = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_logicor = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_general_linear = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_AND = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_OR = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4308, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_general_linear, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_is_general_linear.diminfo[0].strides = __pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_general_linear.diminfo[0].shape = __pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4308, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_cons_is_general_linear = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4309 * cons_is_logicor = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_general_linear = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_AND = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_OR = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_XOR = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4309, __pyx_L1_error) __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_AND, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_is_AND.diminfo[0].strides = __pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_AND.diminfo[0].shape = __pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4309, __pyx_L1_error) } __pyx_t_16 = 0; __pyx_v_cons_is_AND = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4310 * cons_is_general_linear = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_AND = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_OR = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_XOR = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_linking = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4310, __pyx_L1_error) __pyx_t_17 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_OR, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_is_OR.diminfo[0].strides = __pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_OR.diminfo[0].shape = __pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4310, __pyx_L1_error) } __pyx_t_17 = 0; __pyx_v_cons_is_OR = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4311 * cons_is_AND = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_OR = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_XOR = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_linking = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_cardinality = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4311, __pyx_L1_error) __pyx_t_18 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_XOR, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_is_XOR.diminfo[0].strides = __pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_XOR.diminfo[0].shape = __pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4311, __pyx_L1_error) } __pyx_t_18 = 0; __pyx_v_cons_is_XOR = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4312 * cons_is_OR = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_XOR = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_linking = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_cardinality = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_variable_bound = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4312, __pyx_L1_error) __pyx_t_19 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_linking, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_is_linking.diminfo[0].strides = __pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_linking.diminfo[0].shape = __pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4312, __pyx_L1_error) } __pyx_t_19 = 0; __pyx_v_cons_is_linking = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4313 * cons_is_XOR = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_linking = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_cardinality = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_is_variable_bound = np.empty(shape=(nrows, ), dtype=np.int32) * cons_lhs = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4313, __pyx_L1_error) __pyx_t_20 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_cardinality, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_is_cardinality.diminfo[0].strides = __pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_cardinality.diminfo[0].shape = __pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4313, __pyx_L1_error) } __pyx_t_20 = 0; __pyx_v_cons_is_cardinality = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4314 * cons_is_linking = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_cardinality = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_variable_bound = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_lhs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_rhs = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4314, __pyx_L1_error) __pyx_t_21 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_is_variable_bound, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_is_variable_bound.diminfo[0].strides = __pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_is_variable_bound.diminfo[0].shape = __pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4314, __pyx_L1_error) } __pyx_t_21 = 0; __pyx_v_cons_is_variable_bound = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4315 * cons_is_cardinality = np.empty(shape=(nrows, ), dtype=np.int32) * cons_is_variable_bound = np.empty(shape=(nrows, ), dtype=np.int32) * cons_lhs = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_rhs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4315, __pyx_L1_error) __pyx_t_22 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_lhs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_lhs.diminfo[0].strides = __pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_lhs.diminfo[0].shape = __pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4315, __pyx_L1_error) } __pyx_t_22 = 0; __pyx_v_cons_lhs = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4316 * cons_is_variable_bound = np.empty(shape=(nrows, ), dtype=np.int32) * cons_lhs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_rhs = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) * cons_npos = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4316, __pyx_L1_error) __pyx_t_23 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_rhs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_rhs.diminfo[0].strides = __pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_rhs.diminfo[0].shape = __pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4316, __pyx_L1_error) } __pyx_t_23 = 0; __pyx_v_cons_rhs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4317 * cons_lhs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_rhs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_npos = np.empty(shape=(nrows, ), dtype=np.int32) * cons_nneg = np.empty(shape=(nrows, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4317, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_nnzrs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_nnzrs.diminfo[0].strides = __pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_nnzrs.diminfo[0].shape = __pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4317, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_cons_nnzrs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4318 * cons_rhs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) * cons_npos = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * cons_nneg = np.empty(shape=(nrows, ), dtype=np.int32) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4318, __pyx_L1_error) __pyx_t_25 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_npos.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_npos.rcbuffer->pybuffer, (PyObject*)__pyx_t_25, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_npos.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_npos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_npos.diminfo[0].strides = __pyx_pybuffernd_cons_npos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_npos.diminfo[0].shape = __pyx_pybuffernd_cons_npos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4318, __pyx_L1_error) } __pyx_t_25 = 0; __pyx_v_cons_npos = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4319 * cons_nnzrs = np.empty(shape=(nrows, ), dtype=np.int32) * cons_npos = np.empty(shape=(nrows, ), dtype=np.int32) * cons_nneg = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * * # lp features */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4319, __pyx_L1_error) __pyx_t_26 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_nneg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_nneg.diminfo[0].strides = __pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_nneg.diminfo[0].shape = __pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4319, __pyx_L1_error) } __pyx_t_26 = 0; __pyx_v_cons_nneg = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4322 * * # lp features * cons_dual_sol = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_basis_status = np.empty(shape=(nrows, ), dtype=np.int32) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4322, __pyx_L1_error) __pyx_t_27 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_dual_sol, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_dual_sol.diminfo[0].strides = __pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_dual_sol.diminfo[0].shape = __pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4322, __pyx_L1_error) } __pyx_t_27 = 0; __pyx_v_cons_dual_sol = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4323 * # lp features * cons_dual_sol = np.empty(shape=(nrows, ), dtype=np.float32) * cons_basis_status = np.empty(shape=(nrows, ), dtype=np.int32) # <<<<<<<<<<<<<< * * # structural features */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4323, __pyx_L1_error) __pyx_t_28 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_basis_status, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_basis_status.diminfo[0].strides = __pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_basis_status.diminfo[0].shape = __pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4323, __pyx_L1_error) } __pyx_t_28 = 0; __pyx_v_cons_basis_status = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4326 * * # structural features * cons_sum_abs = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_sum_pos = np.empty(shape=(nrows, ), dtype=np.float32) * cons_sum_neg = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4326, __pyx_L1_error) __pyx_t_29 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_sum_abs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_sum_abs.diminfo[0].strides = __pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_sum_abs.diminfo[0].shape = __pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4326, __pyx_L1_error) } __pyx_t_29 = 0; __pyx_v_cons_sum_abs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4327 * # structural features * cons_sum_abs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_sum_pos = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_sum_neg = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_mean = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4327, __pyx_L1_error) __pyx_t_30 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_sum_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_sum_pos.diminfo[0].strides = __pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_sum_pos.diminfo[0].shape = __pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4327, __pyx_L1_error) } __pyx_t_30 = 0; __pyx_v_cons_sum_pos = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4328 * cons_sum_abs = np.empty(shape=(nrows, ), dtype=np.float32) * cons_sum_pos = np.empty(shape=(nrows, ), dtype=np.float32) * cons_sum_neg = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_coef_mean = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_stdev = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4328, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_sum_neg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_sum_neg.diminfo[0].strides = __pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_sum_neg.diminfo[0].shape = __pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4328, __pyx_L1_error) } __pyx_t_31 = 0; __pyx_v_cons_sum_neg = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4329 * cons_sum_pos = np.empty(shape=(nrows, ), dtype=np.float32) * cons_sum_neg = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_mean = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_coef_stdev = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_min = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4329, __pyx_L1_error) __pyx_t_32 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_coef_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_coef_mean.diminfo[0].strides = __pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_coef_mean.diminfo[0].shape = __pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4329, __pyx_L1_error) } __pyx_t_32 = 0; __pyx_v_cons_coef_mean = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4330 * cons_sum_neg = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_mean = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_stdev = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_coef_min = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_max = np.empty(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4330, __pyx_L1_error) __pyx_t_33 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_coef_stdev, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_coef_stdev.diminfo[0].strides = __pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_coef_stdev.diminfo[0].shape = __pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4330, __pyx_L1_error) } __pyx_t_33 = 0; __pyx_v_cons_coef_stdev = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4331 * cons_coef_mean = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_stdev = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_min = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_coef_max = np.empty(shape=(nrows, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4331, __pyx_L1_error) __pyx_t_34 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_coef_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_coef_min.diminfo[0].strides = __pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_coef_min.diminfo[0].shape = __pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4331, __pyx_L1_error) } __pyx_t_34 = 0; __pyx_v_cons_coef_min = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4332 * cons_coef_stdev = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_min = np.empty(shape=(nrows, ), dtype=np.float32) * cons_coef_max = np.empty(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * * # COLUMNS */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4332, __pyx_L1_error) __pyx_t_35 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_35, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_coef_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_coef_max.diminfo[0].strides = __pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_coef_max.diminfo[0].shape = __pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4332, __pyx_L1_error) } __pyx_t_35 = 0; __pyx_v_cons_coef_max = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4337 * cdef int row_i, nnzrs, npos, nneg * cdef float lhs, rhs, abs_sum_norm, pos_sum_norm, neg_sum_norm, mean, stdev, min1, max1 * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) # <<<<<<<<<<<<<< * * for row_i in range(nrows): */ __pyx_v_rows = SCIPgetLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4339 * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) * * for row_i in range(nrows): # <<<<<<<<<<<<<< * row = rows[row_i] * nnzrs = SCIProwGetNNonz(row) */ __pyx_t_7 = __pyx_v_nrows; __pyx_t_36 = __pyx_t_7; for (__pyx_t_37 = 0; __pyx_t_37 < __pyx_t_36; __pyx_t_37+=1) { __pyx_v_row_i = __pyx_t_37; /* "pyscipopt/scip.pyx":4340 * * for row_i in range(nrows): * row = rows[row_i] # <<<<<<<<<<<<<< * nnzrs = SCIProwGetNNonz(row) * lhs = SCIProwGetLhs(row); rhs = SCIProwGetRhs(row) */ __pyx_v_row = (__pyx_v_rows[__pyx_v_row_i]); /* "pyscipopt/scip.pyx":4341 * for row_i in range(nrows): * row = rows[row_i] * nnzrs = SCIProwGetNNonz(row) # <<<<<<<<<<<<<< * lhs = SCIProwGetLhs(row); rhs = SCIProwGetRhs(row) * consname = bytes(SCIPconshdlrGetName(SCIProwGetOriginCons(row))).decode('UTF-8') */ __pyx_v_nnzrs = SCIProwGetNNonz(__pyx_v_row); /* "pyscipopt/scip.pyx":4342 * row = rows[row_i] * nnzrs = SCIProwGetNNonz(row) * lhs = SCIProwGetLhs(row); rhs = SCIProwGetRhs(row) # <<<<<<<<<<<<<< * consname = bytes(SCIPconshdlrGetName(SCIProwGetOriginCons(row))).decode('UTF-8') * */ __pyx_v_lhs = SCIProwGetLhs(__pyx_v_row); __pyx_v_rhs = SCIProwGetRhs(__pyx_v_row); /* "pyscipopt/scip.pyx":4343 * nnzrs = SCIProwGetNNonz(row) * lhs = SCIProwGetLhs(row); rhs = SCIProwGetRhs(row) * consname = bytes(SCIPconshdlrGetName(SCIProwGetOriginCons(row))).decode('UTF-8') # <<<<<<<<<<<<<< * * cons_is_singleton[row_i] = 1 if nnzrs == 1 else 0 */ __pyx_t_3 = __Pyx_PyBytes_FromString(SCIPconshdlrGetName(SCIProwGetOriginCons(__pyx_v_row))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_consname, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4345 * consname = bytes(SCIPconshdlrGetName(SCIProwGetOriginCons(row))).decode('UTF-8') * * cons_is_singleton[row_i] = 1 if nnzrs == 1 else 0 # <<<<<<<<<<<<<< * cons_is_aggregation[row_i] = 1 if lhs == rhs and nnzrs > 1 else 0 * cons_is_precedence[row_i] = 1 if consname == 'cumulative' else 0 */ if (((__pyx_v_nnzrs == 1) != 0)) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_singleton.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_singleton.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4345, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_singleton.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4346 * * cons_is_singleton[row_i] = 1 if nnzrs == 1 else 0 * cons_is_aggregation[row_i] = 1 if lhs == rhs and nnzrs > 1 else 0 # <<<<<<<<<<<<<< * cons_is_precedence[row_i] = 1 if consname == 'cumulative' else 0 * cons_is_knapsack[row_i] = 1 if consname == 'knapsack' else 0 */ __pyx_t_42 = ((__pyx_v_lhs == __pyx_v_rhs) != 0); if (__pyx_t_42) { } else { __pyx_t_41 = __pyx_t_42; goto __pyx_L5_bool_binop_done; } __pyx_t_42 = ((__pyx_v_nnzrs > 1) != 0); __pyx_t_41 = __pyx_t_42; __pyx_L5_bool_binop_done:; if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_aggregation.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_aggregation.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4346, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_aggregation.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4347 * cons_is_singleton[row_i] = 1 if nnzrs == 1 else 0 * cons_is_aggregation[row_i] = 1 if lhs == rhs and nnzrs > 1 else 0 * cons_is_precedence[row_i] = 1 if consname == 'cumulative' else 0 # <<<<<<<<<<<<<< * cons_is_knapsack[row_i] = 1 if consname == 'knapsack' else 0 * cons_is_logicor[row_i] = 1 if consname == 'logicor' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_cumulative, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4347, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_precedence.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_precedence.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4347, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_precedence.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4348 * cons_is_aggregation[row_i] = 1 if lhs == rhs and nnzrs > 1 else 0 * cons_is_precedence[row_i] = 1 if consname == 'cumulative' else 0 * cons_is_knapsack[row_i] = 1 if consname == 'knapsack' else 0 # <<<<<<<<<<<<<< * cons_is_logicor[row_i] = 1 if consname == 'logicor' else 0 * cons_is_general_linear[row_i] = 1 if consname == 'linear' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_knapsack, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4348, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_knapsack.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_knapsack.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4348, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_knapsack.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4349 * cons_is_precedence[row_i] = 1 if consname == 'cumulative' else 0 * cons_is_knapsack[row_i] = 1 if consname == 'knapsack' else 0 * cons_is_logicor[row_i] = 1 if consname == 'logicor' else 0 # <<<<<<<<<<<<<< * cons_is_general_linear[row_i] = 1 if consname == 'linear' else 0 * cons_is_AND[row_i] = 1 if consname == 'and' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_logicor, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4349, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_logicor.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_logicor.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4349, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_logicor.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4350 * cons_is_knapsack[row_i] = 1 if consname == 'knapsack' else 0 * cons_is_logicor[row_i] = 1 if consname == 'logicor' else 0 * cons_is_general_linear[row_i] = 1 if consname == 'linear' else 0 # <<<<<<<<<<<<<< * cons_is_AND[row_i] = 1 if consname == 'and' else 0 * cons_is_OR[row_i] = 1 if consname == 'or' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_linear, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4350, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_general_linear.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_general_linear.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4350, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_general_linear.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4351 * cons_is_logicor[row_i] = 1 if consname == 'logicor' else 0 * cons_is_general_linear[row_i] = 1 if consname == 'linear' else 0 * cons_is_AND[row_i] = 1 if consname == 'and' else 0 # <<<<<<<<<<<<<< * cons_is_OR[row_i] = 1 if consname == 'or' else 0 * cons_is_XOR[row_i] = 1 if consname == 'xor' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_and, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4351, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_AND.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_AND.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4351, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_AND.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4352 * cons_is_general_linear[row_i] = 1 if consname == 'linear' else 0 * cons_is_AND[row_i] = 1 if consname == 'and' else 0 * cons_is_OR[row_i] = 1 if consname == 'or' else 0 # <<<<<<<<<<<<<< * cons_is_XOR[row_i] = 1 if consname == 'xor' else 0 * cons_is_linking[row_i] = 1 if consname == 'linking' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_or, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4352, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_OR.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_OR.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4352, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_OR.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4353 * cons_is_AND[row_i] = 1 if consname == 'and' else 0 * cons_is_OR[row_i] = 1 if consname == 'or' else 0 * cons_is_XOR[row_i] = 1 if consname == 'xor' else 0 # <<<<<<<<<<<<<< * cons_is_linking[row_i] = 1 if consname == 'linking' else 0 * cons_is_cardinality[row_i] = 1 if consname == 'cardinality' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_xor, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4353, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_XOR.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_XOR.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4353, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_XOR.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4354 * cons_is_OR[row_i] = 1 if consname == 'or' else 0 * cons_is_XOR[row_i] = 1 if consname == 'xor' else 0 * cons_is_linking[row_i] = 1 if consname == 'linking' else 0 # <<<<<<<<<<<<<< * cons_is_cardinality[row_i] = 1 if consname == 'cardinality' else 0 * cons_is_variable_bound[row_i] = 1 if consname == 'varbound' else 0 */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_linking, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4354, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_linking.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_linking.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4354, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_linking.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4355 * cons_is_XOR[row_i] = 1 if consname == 'xor' else 0 * cons_is_linking[row_i] = 1 if consname == 'linking' else 0 * cons_is_cardinality[row_i] = 1 if consname == 'cardinality' else 0 # <<<<<<<<<<<<<< * cons_is_variable_bound[row_i] = 1 if consname == 'varbound' else 0 * cons_lhs[row_i] = lhs */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_cardinality, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4355, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_cardinality.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_cardinality.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4355, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_cardinality.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4356 * cons_is_linking[row_i] = 1 if consname == 'linking' else 0 * cons_is_cardinality[row_i] = 1 if consname == 'cardinality' else 0 * cons_is_variable_bound[row_i] = 1 if consname == 'varbound' else 0 # <<<<<<<<<<<<<< * cons_lhs[row_i] = lhs * cons_rhs[row_i] = rhs */ __pyx_t_41 = (__Pyx_PyUnicode_Equals(__pyx_v_consname, __pyx_n_u_varbound, Py_EQ)); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(3, 4356, __pyx_L1_error) if (__pyx_t_41) { __pyx_t_38 = 1; } else { __pyx_t_38 = 0; } __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_is_variable_bound.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_is_variable_bound.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4356, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_is_variable_bound.diminfo[0].strides) = __pyx_t_38; /* "pyscipopt/scip.pyx":4357 * cons_is_cardinality[row_i] = 1 if consname == 'cardinality' else 0 * cons_is_variable_bound[row_i] = 1 if consname == 'varbound' else 0 * cons_lhs[row_i] = lhs # <<<<<<<<<<<<<< * cons_rhs[row_i] = rhs * cons_nnzrs[row_i] = nnzrs */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_lhs.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_lhs.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4357, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_lhs.diminfo[0].strides) = __pyx_v_lhs; /* "pyscipopt/scip.pyx":4358 * cons_is_variable_bound[row_i] = 1 if consname == 'varbound' else 0 * cons_lhs[row_i] = lhs * cons_rhs[row_i] = rhs # <<<<<<<<<<<<<< * cons_nnzrs[row_i] = nnzrs * */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_rhs.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_rhs.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4358, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_rhs.diminfo[0].strides) = __pyx_v_rhs; /* "pyscipopt/scip.pyx":4359 * cons_lhs[row_i] = lhs * cons_rhs[row_i] = rhs * cons_nnzrs[row_i] = nnzrs # <<<<<<<<<<<<<< * * */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_nnzrs.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4359, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_nnzrs.diminfo[0].strides) = __pyx_v_nnzrs; /* "pyscipopt/scip.pyx":4362 * * * vals = SCIProwGetVals(row) # <<<<<<<<<<<<<< * npos = 0; nneg = 0; abs_sum_norm = 0; pos_sum_norm = 0; neg_sum_norm = 0 * mean = 0; stdev = 0; min1 = 0; max1 = 0 */ __pyx_v_vals = SCIProwGetVals(__pyx_v_row); /* "pyscipopt/scip.pyx":4363 * * vals = SCIProwGetVals(row) * npos = 0; nneg = 0; abs_sum_norm = 0; pos_sum_norm = 0; neg_sum_norm = 0 # <<<<<<<<<<<<<< * mean = 0; stdev = 0; min1 = 0; max1 = 0 * for i in range(nnzrs): */ __pyx_v_npos = 0; __pyx_v_nneg = 0; __pyx_v_abs_sum_norm = 0.0; __pyx_v_pos_sum_norm = 0.0; __pyx_v_neg_sum_norm = 0.0; /* "pyscipopt/scip.pyx":4364 * vals = SCIProwGetVals(row) * npos = 0; nneg = 0; abs_sum_norm = 0; pos_sum_norm = 0; neg_sum_norm = 0 * mean = 0; stdev = 0; min1 = 0; max1 = 0 # <<<<<<<<<<<<<< * for i in range(nnzrs): * abs_sum_norm += REALABS(vals[i]) */ __pyx_v_mean = 0.0; __pyx_v_stdev = 0.0; __pyx_v_min1 = 0.0; __pyx_v_max1 = 0.0; /* "pyscipopt/scip.pyx":4365 * npos = 0; nneg = 0; abs_sum_norm = 0; pos_sum_norm = 0; neg_sum_norm = 0 * mean = 0; stdev = 0; min1 = 0; max1 = 0 * for i in range(nnzrs): # <<<<<<<<<<<<<< * abs_sum_norm += REALABS(vals[i]) * min1 = min(min1, vals[i]) */ __pyx_t_40 = __pyx_v_nnzrs; __pyx_t_43 = __pyx_t_40; for (__pyx_t_44 = 0; __pyx_t_44 < __pyx_t_43; __pyx_t_44+=1) { __pyx_v_i = __pyx_t_44; /* "pyscipopt/scip.pyx":4366 * mean = 0; stdev = 0; min1 = 0; max1 = 0 * for i in range(nnzrs): * abs_sum_norm += REALABS(vals[i]) # <<<<<<<<<<<<<< * min1 = min(min1, vals[i]) * max1 = max(max1, vals[i]) */ __pyx_v_abs_sum_norm = (__pyx_v_abs_sum_norm + REALABS((__pyx_v_vals[__pyx_v_i]))); /* "pyscipopt/scip.pyx":4367 * for i in range(nnzrs): * abs_sum_norm += REALABS(vals[i]) * min1 = min(min1, vals[i]) # <<<<<<<<<<<<<< * max1 = max(max1, vals[i]) * if vals[i] > 0: */ __pyx_t_45 = (__pyx_v_vals[__pyx_v_i]); __pyx_t_46 = __pyx_v_min1; if (((__pyx_t_45 < __pyx_t_46) != 0)) { __pyx_t_47 = __pyx_t_45; } else { __pyx_t_47 = __pyx_t_46; } __pyx_v_min1 = __pyx_t_47; /* "pyscipopt/scip.pyx":4368 * abs_sum_norm += REALABS(vals[i]) * min1 = min(min1, vals[i]) * max1 = max(max1, vals[i]) # <<<<<<<<<<<<<< * if vals[i] > 0: * npos += 1 */ __pyx_t_47 = (__pyx_v_vals[__pyx_v_i]); __pyx_t_46 = __pyx_v_max1; if (((__pyx_t_47 > __pyx_t_46) != 0)) { __pyx_t_45 = __pyx_t_47; } else { __pyx_t_45 = __pyx_t_46; } __pyx_v_max1 = __pyx_t_45; /* "pyscipopt/scip.pyx":4369 * min1 = min(min1, vals[i]) * max1 = max(max1, vals[i]) * if vals[i] > 0: # <<<<<<<<<<<<<< * npos += 1 * pos_sum_norm += vals[i] */ __pyx_t_41 = (((__pyx_v_vals[__pyx_v_i]) > 0.0) != 0); if (__pyx_t_41) { /* "pyscipopt/scip.pyx":4370 * max1 = max(max1, vals[i]) * if vals[i] > 0: * npos += 1 # <<<<<<<<<<<<<< * pos_sum_norm += vals[i] * else: */ __pyx_v_npos = (__pyx_v_npos + 1); /* "pyscipopt/scip.pyx":4371 * if vals[i] > 0: * npos += 1 * pos_sum_norm += vals[i] # <<<<<<<<<<<<<< * else: * nneg += 1 */ __pyx_v_pos_sum_norm = (__pyx_v_pos_sum_norm + (__pyx_v_vals[__pyx_v_i])); /* "pyscipopt/scip.pyx":4369 * min1 = min(min1, vals[i]) * max1 = max(max1, vals[i]) * if vals[i] > 0: # <<<<<<<<<<<<<< * npos += 1 * pos_sum_norm += vals[i] */ goto __pyx_L9; } /* "pyscipopt/scip.pyx":4373 * pos_sum_norm += vals[i] * else: * nneg += 1 # <<<<<<<<<<<<<< * neg_sum_norm += -vals[i] * */ /*else*/ { __pyx_v_nneg = (__pyx_v_nneg + 1); /* "pyscipopt/scip.pyx":4374 * else: * nneg += 1 * neg_sum_norm += -vals[i] # <<<<<<<<<<<<<< * * mean = abs_sum_norm / nnzrs if nnzrs != 0 else 0 */ __pyx_v_neg_sum_norm = (__pyx_v_neg_sum_norm + (-(__pyx_v_vals[__pyx_v_i]))); } __pyx_L9:; } /* "pyscipopt/scip.pyx":4376 * neg_sum_norm += -vals[i] * * mean = abs_sum_norm / nnzrs if nnzrs != 0 else 0 # <<<<<<<<<<<<<< * * for i in range(nnzrs): */ if (((__pyx_v_nnzrs != 0) != 0)) { if (unlikely(__pyx_v_nnzrs == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4376, __pyx_L1_error) } __pyx_t_46 = (__pyx_v_abs_sum_norm / ((float)__pyx_v_nnzrs)); } else { __pyx_t_46 = 0.0; } __pyx_v_mean = __pyx_t_46; /* "pyscipopt/scip.pyx":4378 * mean = abs_sum_norm / nnzrs if nnzrs != 0 else 0 * * for i in range(nnzrs): # <<<<<<<<<<<<<< * stdev += (vals[i] - mean) ** 2 * stdev = SQRT(stdev / nnzrs) if nnzrs != 0 else 0 */ __pyx_t_40 = __pyx_v_nnzrs; __pyx_t_43 = __pyx_t_40; for (__pyx_t_44 = 0; __pyx_t_44 < __pyx_t_43; __pyx_t_44+=1) { __pyx_v_i = __pyx_t_44; /* "pyscipopt/scip.pyx":4379 * * for i in range(nnzrs): * stdev += (vals[i] - mean) ** 2 # <<<<<<<<<<<<<< * stdev = SQRT(stdev / nnzrs) if nnzrs != 0 else 0 * */ __pyx_v_stdev = (__pyx_v_stdev + pow(((__pyx_v_vals[__pyx_v_i]) - __pyx_v_mean), 2.0)); } /* "pyscipopt/scip.pyx":4380 * for i in range(nnzrs): * stdev += (vals[i] - mean) ** 2 * stdev = SQRT(stdev / nnzrs) if nnzrs != 0 else 0 # <<<<<<<<<<<<<< * * cons_npos[row_i] = npos */ if (((__pyx_v_nnzrs != 0) != 0)) { if (unlikely(__pyx_v_nnzrs == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4380, __pyx_L1_error) } __pyx_t_48 = sqrt((__pyx_v_stdev / ((float)__pyx_v_nnzrs))); } else { __pyx_t_48 = 0.0; } __pyx_v_stdev = __pyx_t_48; /* "pyscipopt/scip.pyx":4382 * stdev = SQRT(stdev / nnzrs) if nnzrs != 0 else 0 * * cons_npos[row_i] = npos # <<<<<<<<<<<<<< * cons_nneg[row_i] = nneg * cons_sum_abs[row_i] = abs_sum_norm */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_npos.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_npos.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4382, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_npos.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_npos.diminfo[0].strides) = __pyx_v_npos; /* "pyscipopt/scip.pyx":4383 * * cons_npos[row_i] = npos * cons_nneg[row_i] = nneg # <<<<<<<<<<<<<< * cons_sum_abs[row_i] = abs_sum_norm * cons_sum_pos[row_i] = pos_sum_norm */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_nneg.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_nneg.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4383, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_nneg.diminfo[0].strides) = __pyx_v_nneg; /* "pyscipopt/scip.pyx":4384 * cons_npos[row_i] = npos * cons_nneg[row_i] = nneg * cons_sum_abs[row_i] = abs_sum_norm # <<<<<<<<<<<<<< * cons_sum_pos[row_i] = pos_sum_norm * cons_sum_neg[row_i] = neg_sum_norm */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_sum_abs.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_sum_abs.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4384, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_sum_abs.diminfo[0].strides) = __pyx_v_abs_sum_norm; /* "pyscipopt/scip.pyx":4385 * cons_nneg[row_i] = nneg * cons_sum_abs[row_i] = abs_sum_norm * cons_sum_pos[row_i] = pos_sum_norm # <<<<<<<<<<<<<< * cons_sum_neg[row_i] = neg_sum_norm * cons_coef_mean[row_i] = mean */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_sum_pos.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_sum_pos.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4385, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_sum_pos.diminfo[0].strides) = __pyx_v_pos_sum_norm; /* "pyscipopt/scip.pyx":4386 * cons_sum_abs[row_i] = abs_sum_norm * cons_sum_pos[row_i] = pos_sum_norm * cons_sum_neg[row_i] = neg_sum_norm # <<<<<<<<<<<<<< * cons_coef_mean[row_i] = mean * cons_coef_stdev[row_i] = stdev */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_sum_neg.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_sum_neg.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4386, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_sum_neg.diminfo[0].strides) = __pyx_v_neg_sum_norm; /* "pyscipopt/scip.pyx":4387 * cons_sum_pos[row_i] = pos_sum_norm * cons_sum_neg[row_i] = neg_sum_norm * cons_coef_mean[row_i] = mean # <<<<<<<<<<<<<< * cons_coef_stdev[row_i] = stdev * cons_coef_min[row_i] = min1 */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_coef_mean.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_coef_mean.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4387, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_coef_mean.diminfo[0].strides) = __pyx_v_mean; /* "pyscipopt/scip.pyx":4388 * cons_sum_neg[row_i] = neg_sum_norm * cons_coef_mean[row_i] = mean * cons_coef_stdev[row_i] = stdev # <<<<<<<<<<<<<< * cons_coef_min[row_i] = min1 * cons_coef_max[row_i] = max1 */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_coef_stdev.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_coef_stdev.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4388, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_coef_stdev.diminfo[0].strides) = __pyx_v_stdev; /* "pyscipopt/scip.pyx":4389 * cons_coef_mean[row_i] = mean * cons_coef_stdev[row_i] = stdev * cons_coef_min[row_i] = min1 # <<<<<<<<<<<<<< * cons_coef_max[row_i] = max1 * */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_coef_min.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_coef_min.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4389, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_coef_min.diminfo[0].strides) = __pyx_v_min1; /* "pyscipopt/scip.pyx":4390 * cons_coef_stdev[row_i] = stdev * cons_coef_min[row_i] = min1 * cons_coef_max[row_i] = max1 # <<<<<<<<<<<<<< * * cons_dual_sol[row_i] = SCIProwGetDualsol(row) */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_coef_max.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_coef_max.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4390, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_coef_max.diminfo[0].strides) = __pyx_v_max1; /* "pyscipopt/scip.pyx":4392 * cons_coef_max[row_i] = max1 * * cons_dual_sol[row_i] = SCIProwGetDualsol(row) # <<<<<<<<<<<<<< * stat = SCIProwGetBasisStatus(row) * if stat == SCIP_BASESTAT_LOWER: */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_dual_sol.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_dual_sol.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4392, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_dual_sol.diminfo[0].strides) = SCIProwGetDualsol(__pyx_v_row); /* "pyscipopt/scip.pyx":4393 * * cons_dual_sol[row_i] = SCIProwGetDualsol(row) * stat = SCIProwGetBasisStatus(row) # <<<<<<<<<<<<<< * if stat == SCIP_BASESTAT_LOWER: * cons_basis_status[row_i] = 0 */ __pyx_v_stat = SCIProwGetBasisStatus(__pyx_v_row); /* "pyscipopt/scip.pyx":4394 * cons_dual_sol[row_i] = SCIProwGetDualsol(row) * stat = SCIProwGetBasisStatus(row) * if stat == SCIP_BASESTAT_LOWER: # <<<<<<<<<<<<<< * cons_basis_status[row_i] = 0 * elif stat == SCIP_BASESTAT_BASIC: */ switch (__pyx_v_stat) { case SCIP_BASESTAT_LOWER: /* "pyscipopt/scip.pyx":4395 * stat = SCIProwGetBasisStatus(row) * if stat == SCIP_BASESTAT_LOWER: * cons_basis_status[row_i] = 0 # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_BASIC: * cons_basis_status[row_i] = 1 */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_basis_status.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_basis_status.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4395, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_basis_status.diminfo[0].strides) = 0; /* "pyscipopt/scip.pyx":4394 * cons_dual_sol[row_i] = SCIProwGetDualsol(row) * stat = SCIProwGetBasisStatus(row) * if stat == SCIP_BASESTAT_LOWER: # <<<<<<<<<<<<<< * cons_basis_status[row_i] = 0 * elif stat == SCIP_BASESTAT_BASIC: */ break; case SCIP_BASESTAT_BASIC: /* "pyscipopt/scip.pyx":4397 * cons_basis_status[row_i] = 0 * elif stat == SCIP_BASESTAT_BASIC: * cons_basis_status[row_i] = 1 # <<<<<<<<<<<<<< * elif stat == SCIP_BASESTAT_UPPER: * cons_basis_status[row_i] = 2 */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_basis_status.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_basis_status.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4397, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_basis_status.diminfo[0].strides) = 1; /* "pyscipopt/scip.pyx":4396 * if stat == SCIP_BASESTAT_LOWER: * cons_basis_status[row_i] = 0 * elif stat == SCIP_BASESTAT_BASIC: # <<<<<<<<<<<<<< * cons_basis_status[row_i] = 1 * elif stat == SCIP_BASESTAT_UPPER: */ break; case SCIP_BASESTAT_UPPER: /* "pyscipopt/scip.pyx":4399 * cons_basis_status[row_i] = 1 * elif stat == SCIP_BASESTAT_UPPER: * cons_basis_status[row_i] = 2 # <<<<<<<<<<<<<< * else: * cons_basis_status[row_i] = 3 */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_basis_status.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_basis_status.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4399, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_basis_status.diminfo[0].strides) = 2; /* "pyscipopt/scip.pyx":4398 * elif stat == SCIP_BASESTAT_BASIC: * cons_basis_status[row_i] = 1 * elif stat == SCIP_BASESTAT_UPPER: # <<<<<<<<<<<<<< * cons_basis_status[row_i] = 2 * else: */ break; default: /* "pyscipopt/scip.pyx":4401 * cons_basis_status[row_i] = 2 * else: * cons_basis_status[row_i] = 3 # <<<<<<<<<<<<<< * * return { */ __pyx_t_39 = __pyx_v_row_i; __pyx_t_40 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_cons_basis_status.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_40 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_cons_basis_status.diminfo[0].shape)) __pyx_t_40 = 0; if (unlikely(__pyx_t_40 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_40); __PYX_ERR(3, 4401, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_cons_basis_status.diminfo[0].strides) = 3; break; } } /* "pyscipopt/scip.pyx":4403 * cons_basis_status[row_i] = 3 * * return { # <<<<<<<<<<<<<< * # basic features * 'cons_is_singleton': cons_is_singleton, */ __Pyx_XDECREF(__pyx_r); /* "pyscipopt/scip.pyx":4405 * return { * # basic features * 'cons_is_singleton': cons_is_singleton, # <<<<<<<<<<<<<< * 'cons_is_aggregation': cons_is_aggregation, * 'cons_is_precedence': cons_is_precedence, */ __pyx_t_3 = __Pyx_PyDict_NewPresized(26); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_singleton, ((PyObject *)__pyx_v_cons_is_singleton)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4406 * # basic features * 'cons_is_singleton': cons_is_singleton, * 'cons_is_aggregation': cons_is_aggregation, # <<<<<<<<<<<<<< * 'cons_is_precedence': cons_is_precedence, * 'cons_is_knapsack': cons_is_knapsack, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_aggregation, ((PyObject *)__pyx_v_cons_is_aggregation)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4407 * 'cons_is_singleton': cons_is_singleton, * 'cons_is_aggregation': cons_is_aggregation, * 'cons_is_precedence': cons_is_precedence, # <<<<<<<<<<<<<< * 'cons_is_knapsack': cons_is_knapsack, * 'cons_is_logicor': cons_is_logicor, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_precedence, ((PyObject *)__pyx_v_cons_is_precedence)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4408 * 'cons_is_aggregation': cons_is_aggregation, * 'cons_is_precedence': cons_is_precedence, * 'cons_is_knapsack': cons_is_knapsack, # <<<<<<<<<<<<<< * 'cons_is_logicor': cons_is_logicor, * 'cons_is_general_linear': cons_is_general_linear, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_knapsack, ((PyObject *)__pyx_v_cons_is_knapsack)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4409 * 'cons_is_precedence': cons_is_precedence, * 'cons_is_knapsack': cons_is_knapsack, * 'cons_is_logicor': cons_is_logicor, # <<<<<<<<<<<<<< * 'cons_is_general_linear': cons_is_general_linear, * 'cons_is_AND': cons_is_AND, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_logicor, ((PyObject *)__pyx_v_cons_is_logicor)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4410 * 'cons_is_knapsack': cons_is_knapsack, * 'cons_is_logicor': cons_is_logicor, * 'cons_is_general_linear': cons_is_general_linear, # <<<<<<<<<<<<<< * 'cons_is_AND': cons_is_AND, * 'cons_is_OR': cons_is_OR, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_general_linear, ((PyObject *)__pyx_v_cons_is_general_linear)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4411 * 'cons_is_logicor': cons_is_logicor, * 'cons_is_general_linear': cons_is_general_linear, * 'cons_is_AND': cons_is_AND, # <<<<<<<<<<<<<< * 'cons_is_OR': cons_is_OR, * 'cons_is_XOR': cons_is_XOR, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_AND, ((PyObject *)__pyx_v_cons_is_AND)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4412 * 'cons_is_general_linear': cons_is_general_linear, * 'cons_is_AND': cons_is_AND, * 'cons_is_OR': cons_is_OR, # <<<<<<<<<<<<<< * 'cons_is_XOR': cons_is_XOR, * 'cons_is_linking': cons_is_linking, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_OR, ((PyObject *)__pyx_v_cons_is_OR)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4413 * 'cons_is_AND': cons_is_AND, * 'cons_is_OR': cons_is_OR, * 'cons_is_XOR': cons_is_XOR, # <<<<<<<<<<<<<< * 'cons_is_linking': cons_is_linking, * 'cons_is_cardinality': cons_is_cardinality, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_XOR, ((PyObject *)__pyx_v_cons_is_XOR)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4414 * 'cons_is_OR': cons_is_OR, * 'cons_is_XOR': cons_is_XOR, * 'cons_is_linking': cons_is_linking, # <<<<<<<<<<<<<< * 'cons_is_cardinality': cons_is_cardinality, * 'cons_is_variable_bound': cons_is_variable_bound, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_linking, ((PyObject *)__pyx_v_cons_is_linking)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4415 * 'cons_is_XOR': cons_is_XOR, * 'cons_is_linking': cons_is_linking, * 'cons_is_cardinality': cons_is_cardinality, # <<<<<<<<<<<<<< * 'cons_is_variable_bound': cons_is_variable_bound, * 'cons_lhs': cons_lhs, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_cardinality, ((PyObject *)__pyx_v_cons_is_cardinality)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4416 * 'cons_is_linking': cons_is_linking, * 'cons_is_cardinality': cons_is_cardinality, * 'cons_is_variable_bound': cons_is_variable_bound, # <<<<<<<<<<<<<< * 'cons_lhs': cons_lhs, * 'cons_rhs': cons_rhs, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_is_variable_bound, ((PyObject *)__pyx_v_cons_is_variable_bound)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4417 * 'cons_is_cardinality': cons_is_cardinality, * 'cons_is_variable_bound': cons_is_variable_bound, * 'cons_lhs': cons_lhs, # <<<<<<<<<<<<<< * 'cons_rhs': cons_rhs, * 'cons_nnzrs': cons_nnzrs, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_lhs, ((PyObject *)__pyx_v_cons_lhs)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4418 * 'cons_is_variable_bound': cons_is_variable_bound, * 'cons_lhs': cons_lhs, * 'cons_rhs': cons_rhs, # <<<<<<<<<<<<<< * 'cons_nnzrs': cons_nnzrs, * 'cons_npos': cons_npos, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_rhs, ((PyObject *)__pyx_v_cons_rhs)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4419 * 'cons_lhs': cons_lhs, * 'cons_rhs': cons_rhs, * 'cons_nnzrs': cons_nnzrs, # <<<<<<<<<<<<<< * 'cons_npos': cons_npos, * 'cons_nneg': cons_nneg, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_nnzrs, ((PyObject *)__pyx_v_cons_nnzrs)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4420 * 'cons_rhs': cons_rhs, * 'cons_nnzrs': cons_nnzrs, * 'cons_npos': cons_npos, # <<<<<<<<<<<<<< * 'cons_nneg': cons_nneg, * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_npos, ((PyObject *)__pyx_v_cons_npos)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4421 * 'cons_nnzrs': cons_nnzrs, * 'cons_npos': cons_npos, * 'cons_nneg': cons_nneg, # <<<<<<<<<<<<<< * * # lp features */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_nneg, ((PyObject *)__pyx_v_cons_nneg)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4424 * * # lp features * 'cons_dual_sol': cons_dual_sol, # <<<<<<<<<<<<<< * 'cons_basis_status': cons_basis_status, * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_dual_sol, ((PyObject *)__pyx_v_cons_dual_sol)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4425 * # lp features * 'cons_dual_sol': cons_dual_sol, * 'cons_basis_status': cons_basis_status, # <<<<<<<<<<<<<< * * # structural features */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_basis_status, ((PyObject *)__pyx_v_cons_basis_status)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4428 * * # structural features * 'cons_sum_abs': cons_sum_abs, # <<<<<<<<<<<<<< * 'cons_sum_pos': cons_sum_pos, * 'cons_sum_neg': cons_sum_neg, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_sum_abs, ((PyObject *)__pyx_v_cons_sum_abs)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4429 * # structural features * 'cons_sum_abs': cons_sum_abs, * 'cons_sum_pos': cons_sum_pos, # <<<<<<<<<<<<<< * 'cons_sum_neg': cons_sum_neg, * 'cons_coef_mean': cons_coef_mean, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_sum_pos, ((PyObject *)__pyx_v_cons_sum_pos)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4430 * 'cons_sum_abs': cons_sum_abs, * 'cons_sum_pos': cons_sum_pos, * 'cons_sum_neg': cons_sum_neg, # <<<<<<<<<<<<<< * 'cons_coef_mean': cons_coef_mean, * 'cons_coef_stdev': cons_coef_stdev, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_sum_neg, ((PyObject *)__pyx_v_cons_sum_neg)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4431 * 'cons_sum_pos': cons_sum_pos, * 'cons_sum_neg': cons_sum_neg, * 'cons_coef_mean': cons_coef_mean, # <<<<<<<<<<<<<< * 'cons_coef_stdev': cons_coef_stdev, * 'cons_coef_min': cons_coef_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_coef_mean, ((PyObject *)__pyx_v_cons_coef_mean)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4432 * 'cons_sum_neg': cons_sum_neg, * 'cons_coef_mean': cons_coef_mean, * 'cons_coef_stdev': cons_coef_stdev, # <<<<<<<<<<<<<< * 'cons_coef_min': cons_coef_min, * 'cons_coef_max': cons_coef_max */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_coef_stdev, ((PyObject *)__pyx_v_cons_coef_stdev)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4433 * 'cons_coef_mean': cons_coef_mean, * 'cons_coef_stdev': cons_coef_stdev, * 'cons_coef_min': cons_coef_min, # <<<<<<<<<<<<<< * 'cons_coef_max': cons_coef_max * } */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_coef_min, ((PyObject *)__pyx_v_cons_coef_min)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) /* "pyscipopt/scip.pyx":4434 * 'cons_coef_stdev': cons_coef_stdev, * 'cons_coef_min': cons_coef_min, * 'cons_coef_max': cons_coef_max # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cons_coef_max, ((PyObject *)__pyx_v_cons_coef_max)) < 0) __PYX_ERR(3, 4405, __pyx_L1_error) __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":4266 * } * * def getDingStateRows(self): # <<<<<<<<<<<<<< * # basic features * cdef np.ndarray[np.int32_t, ndim=1] cons_is_singleton */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_npos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getDingStateRows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_basis_status.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_coef_stdev.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_dual_sol.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_AND.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_OR.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_XOR.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_aggregation.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_cardinality.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_general_linear.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_knapsack.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_linking.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_logicor.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_precedence.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_singleton.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_is_variable_bound.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_lhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_nneg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_npos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_rhs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_abs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_neg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_sum_pos.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_singleton); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_aggregation); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_precedence); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_knapsack); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_logicor); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_general_linear); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_AND); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_OR); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_XOR); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_linking); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_cardinality); __Pyx_XDECREF((PyObject *)__pyx_v_cons_is_variable_bound); __Pyx_XDECREF((PyObject *)__pyx_v_cons_lhs); __Pyx_XDECREF((PyObject *)__pyx_v_cons_rhs); __Pyx_XDECREF((PyObject *)__pyx_v_cons_nnzrs); __Pyx_XDECREF((PyObject *)__pyx_v_cons_npos); __Pyx_XDECREF((PyObject *)__pyx_v_cons_nneg); __Pyx_XDECREF((PyObject *)__pyx_v_cons_dual_sol); __Pyx_XDECREF((PyObject *)__pyx_v_cons_basis_status); __Pyx_XDECREF((PyObject *)__pyx_v_cons_sum_abs); __Pyx_XDECREF((PyObject *)__pyx_v_cons_sum_pos); __Pyx_XDECREF((PyObject *)__pyx_v_cons_sum_neg); __Pyx_XDECREF((PyObject *)__pyx_v_cons_coef_mean); __Pyx_XDECREF((PyObject *)__pyx_v_cons_coef_stdev); __Pyx_XDECREF((PyObject *)__pyx_v_cons_coef_min); __Pyx_XDECREF((PyObject *)__pyx_v_cons_coef_max); __Pyx_XDECREF(__pyx_v_consname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":4438 * * * def getDingStateLPgraph(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef int row_i, col_i, i */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_507getDingStateLPgraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_507getDingStateLPgraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDingStateLPgraph (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_506getDingStateLPgraph(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_506getDingStateLPgraph(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP *__pyx_v_scip; int __pyx_v_row_i; int __pyx_v_col_i; int __pyx_v_i; int __pyx_v_ncols; int __pyx_v_nrows; PyArrayObject *__pyx_v_vc = 0; PyArrayObject *__pyx_v_vo = 0; PyArrayObject *__pyx_v_co = 0; SCIP_COL **__pyx_v_cols; SCIP_ROW **__pyx_v_rows; int __pyx_v_ncols_row; SCIP_COL **__pyx_v_cols_row; SCIP_Real *__pyx_v_row_coefs; __Pyx_LocalBuf_ND __pyx_pybuffernd_co; __Pyx_Buffer __pyx_pybuffer_co; __Pyx_LocalBuf_ND __pyx_pybuffernd_vc; __Pyx_Buffer __pyx_pybuffer_vc; __Pyx_LocalBuf_ND __pyx_pybuffernd_vo; __Pyx_Buffer __pyx_pybuffer_vo; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_t_17; int __pyx_t_18; int __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDingStateLPgraph", 0); __pyx_pybuffer_vc.pybuffer.buf = NULL; __pyx_pybuffer_vc.refcount = 0; __pyx_pybuffernd_vc.data = NULL; __pyx_pybuffernd_vc.rcbuffer = &__pyx_pybuffer_vc; __pyx_pybuffer_vo.pybuffer.buf = NULL; __pyx_pybuffer_vo.refcount = 0; __pyx_pybuffernd_vo.data = NULL; __pyx_pybuffernd_vo.rcbuffer = &__pyx_pybuffer_vo; __pyx_pybuffer_co.pybuffer.buf = NULL; __pyx_pybuffer_co.refcount = 0; __pyx_pybuffernd_co.data = NULL; __pyx_pybuffernd_co.rcbuffer = &__pyx_pybuffer_co; /* "pyscipopt/scip.pyx":4439 * * def getDingStateLPgraph(self): * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * cdef int row_i, col_i, i * */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":4442 * cdef int row_i, col_i, i * * cdef int ncols = SCIPgetNLPCols(scip) # <<<<<<<<<<<<<< * cdef int nrows = SCIPgetNLPRows(scip) * */ __pyx_v_ncols = SCIPgetNLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":4443 * * cdef int ncols = SCIPgetNLPCols(scip) * cdef int nrows = SCIPgetNLPRows(scip) # <<<<<<<<<<<<<< * * cdef np.ndarray[np.float32_t, ndim=2] vc */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4448 * cdef np.ndarray[np.float32_t, ndim=1] vo * cdef np.ndarray[np.float32_t, ndim=1] co * vc = np.zeros(shape=(nrows, ncols), dtype=np.float32) # <<<<<<<<<<<<<< * vo = np.zeros(shape=(ncols, ), dtype=np.float32) * co = np.zeros(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4448, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vc.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vc.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vc.rcbuffer->pybuffer, (PyObject*)__pyx_v_vc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_vc.diminfo[0].strides = __pyx_pybuffernd_vc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vc.diminfo[0].shape = __pyx_pybuffernd_vc.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vc.diminfo[1].strides = __pyx_pybuffernd_vc.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vc.diminfo[1].shape = __pyx_pybuffernd_vc.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 4448, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_vc = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":4449 * cdef np.ndarray[np.float32_t, ndim=1] co * vc = np.zeros(shape=(nrows, ncols), dtype=np.float32) * vo = np.zeros(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * co = np.zeros(shape=(nrows, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4449, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vo.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vo.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vo.rcbuffer->pybuffer, (PyObject*)__pyx_v_vo, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_vo.diminfo[0].strides = __pyx_pybuffernd_vo.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vo.diminfo[0].shape = __pyx_pybuffernd_vo.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 4449, __pyx_L1_error) } __pyx_t_12 = 0; __pyx_v_vo = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4450 * vc = np.zeros(shape=(nrows, ncols), dtype=np.float32) * vo = np.zeros(shape=(ncols, ), dtype=np.float32) * co = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * * cdef SCIP_COL** cols = SCIPgetLPCols(scip) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4450, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_co.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_co.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_co.rcbuffer->pybuffer, (PyObject*)__pyx_v_co, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_co.diminfo[0].strides = __pyx_pybuffernd_co.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_co.diminfo[0].shape = __pyx_pybuffernd_co.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 4450, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_co = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4452 * co = np.zeros(shape=(nrows, ), dtype=np.float32) * * cdef SCIP_COL** cols = SCIPgetLPCols(scip) # <<<<<<<<<<<<<< * for col_i in range(ncols): * # vo adj */ __pyx_v_cols = SCIPgetLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":4453 * * cdef SCIP_COL** cols = SCIPgetLPCols(scip) * for col_i in range(ncols): # <<<<<<<<<<<<<< * # vo adj * vo[col_i] = SCIPcolGetObj(cols[col_i]) */ __pyx_t_8 = __pyx_v_ncols; __pyx_t_14 = __pyx_t_8; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_col_i = __pyx_t_15; /* "pyscipopt/scip.pyx":4455 * for col_i in range(ncols): * # vo adj * vo[col_i] = SCIPcolGetObj(cols[col_i]) # <<<<<<<<<<<<<< * * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) */ __pyx_t_16 = __pyx_v_col_i; __pyx_t_17 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_vo.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_vo.diminfo[0].shape)) __pyx_t_17 = 0; if (unlikely(__pyx_t_17 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_17); __PYX_ERR(3, 4455, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_vo.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_vo.diminfo[0].strides) = SCIPcolGetObj((__pyx_v_cols[__pyx_v_col_i])); } /* "pyscipopt/scip.pyx":4457 * vo[col_i] = SCIPcolGetObj(cols[col_i]) * * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) # <<<<<<<<<<<<<< * cdef int ncols_row * cdef SCIP_COL** cols_row */ __pyx_v_rows = SCIPgetLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4461 * cdef SCIP_COL** cols_row * cdef SCIP_Real* row_coefs * for row_i in range(nrows): # <<<<<<<<<<<<<< * # co adj * co[row_i] = SCIProwGetRhs(rows[row_i]) */ __pyx_t_8 = __pyx_v_nrows; __pyx_t_14 = __pyx_t_8; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_row_i = __pyx_t_15; /* "pyscipopt/scip.pyx":4463 * for row_i in range(nrows): * # co adj * co[row_i] = SCIProwGetRhs(rows[row_i]) # <<<<<<<<<<<<<< * * # vc adj */ __pyx_t_16 = __pyx_v_row_i; __pyx_t_17 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_co.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_co.diminfo[0].shape)) __pyx_t_17 = 0; if (unlikely(__pyx_t_17 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_17); __PYX_ERR(3, 4463, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_co.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_co.diminfo[0].strides) = SCIProwGetRhs((__pyx_v_rows[__pyx_v_row_i])); /* "pyscipopt/scip.pyx":4466 * * # vc adj * ncols_row = SCIProwGetNLPNonz(rows[row_i]) # <<<<<<<<<<<<<< * cols_row = SCIProwGetCols(rows[row_i]) * row_coefs = SCIProwGetVals(rows[row_i]) */ __pyx_v_ncols_row = SCIProwGetNLPNonz((__pyx_v_rows[__pyx_v_row_i])); /* "pyscipopt/scip.pyx":4467 * # vc adj * ncols_row = SCIProwGetNLPNonz(rows[row_i]) * cols_row = SCIProwGetCols(rows[row_i]) # <<<<<<<<<<<<<< * row_coefs = SCIProwGetVals(rows[row_i]) * for i in range(ncols_row): */ __pyx_v_cols_row = SCIProwGetCols((__pyx_v_rows[__pyx_v_row_i])); /* "pyscipopt/scip.pyx":4468 * ncols_row = SCIProwGetNLPNonz(rows[row_i]) * cols_row = SCIProwGetCols(rows[row_i]) * row_coefs = SCIProwGetVals(rows[row_i]) # <<<<<<<<<<<<<< * for i in range(ncols_row): * col_i = SCIPcolGetLPPos(cols_row[i]) */ __pyx_v_row_coefs = SCIProwGetVals((__pyx_v_rows[__pyx_v_row_i])); /* "pyscipopt/scip.pyx":4469 * cols_row = SCIProwGetCols(rows[row_i]) * row_coefs = SCIProwGetVals(rows[row_i]) * for i in range(ncols_row): # <<<<<<<<<<<<<< * col_i = SCIPcolGetLPPos(cols_row[i]) * vc[row_i, col_i] = row_coefs[i] */ __pyx_t_17 = __pyx_v_ncols_row; __pyx_t_18 = __pyx_t_17; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19; /* "pyscipopt/scip.pyx":4470 * row_coefs = SCIProwGetVals(rows[row_i]) * for i in range(ncols_row): * col_i = SCIPcolGetLPPos(cols_row[i]) # <<<<<<<<<<<<<< * vc[row_i, col_i] = row_coefs[i] * */ __pyx_v_col_i = SCIPcolGetLPPos((__pyx_v_cols_row[__pyx_v_i])); /* "pyscipopt/scip.pyx":4471 * for i in range(ncols_row): * col_i = SCIPcolGetLPPos(cols_row[i]) * vc[row_i, col_i] = row_coefs[i] # <<<<<<<<<<<<<< * * return vc, vo, co */ __pyx_t_16 = __pyx_v_row_i; __pyx_t_20 = __pyx_v_col_i; __pyx_t_21 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_vc.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_21 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_vc.diminfo[0].shape)) __pyx_t_21 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_vc.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_21 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_vc.diminfo[1].shape)) __pyx_t_21 = 1; if (unlikely(__pyx_t_21 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_21); __PYX_ERR(3, 4471, __pyx_L1_error) } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_vc.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_vc.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_vc.diminfo[1].strides) = (__pyx_v_row_coefs[__pyx_v_i]); } } /* "pyscipopt/scip.pyx":4473 * vc[row_i, col_i] = row_coefs[i] * * return vc, vo, co # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_vc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vc)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_vc)); __Pyx_INCREF(((PyObject *)__pyx_v_vo)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vo)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_vo)); __Pyx_INCREF(((PyObject *)__pyx_v_co)); __Pyx_GIVEREF(((PyObject *)__pyx_v_co)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_co)); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":4438 * * * def getDingStateLPgraph(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef int row_i, col_i, i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_co.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vo.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getDingStateLPgraph", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_co.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vo.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_vc); __Pyx_XDECREF((PyObject *)__pyx_v_vo); __Pyx_XDECREF((PyObject *)__pyx_v_co); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":4476 * * * def getDingStateCols(self): # <<<<<<<<<<<<<< * * cdef np.ndarray[np.int32_t, ndim=1] col_type_binary */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_509getDingStateCols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_509getDingStateCols(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDingStateCols (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_508getDingStateCols(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_508getDingStateCols(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyArrayObject *__pyx_v_col_type_binary = 0; PyArrayObject *__pyx_v_col_type_int = 0; PyArrayObject *__pyx_v_col_coefs = 0; PyArrayObject *__pyx_v_col_coefs_pos = 0; PyArrayObject *__pyx_v_col_coefs_neg = 0; PyArrayObject *__pyx_v_col_nnzrs = 0; PyArrayObject *__pyx_v_col_nup_locks = 0; PyArrayObject *__pyx_v_col_ndown_locks = 0; PyArrayObject *__pyx_v_col_solvals = 0; PyArrayObject *__pyx_v_col_sol_frac_up = 0; PyArrayObject *__pyx_v_col_sol_frac_down = 0; PyArrayObject *__pyx_v_col_sol_isfrac = 0; PyArrayObject *__pyx_v_col_ps_up = 0; PyArrayObject *__pyx_v_col_ps_down = 0; PyArrayObject *__pyx_v_col_ps_ratio = 0; PyArrayObject *__pyx_v_col_ps_sum = 0; PyArrayObject *__pyx_v_col_ps_product = 0; PyArrayObject *__pyx_v_col_lbs = 0; PyArrayObject *__pyx_v_col_ubs = 0; PyArrayObject *__pyx_v_col_red_costs = 0; PyArrayObject *__pyx_v_col_cdeg_mean = 0; PyArrayObject *__pyx_v_col_cdeg_std = 0; PyArrayObject *__pyx_v_col_cdeg_min = 0; PyArrayObject *__pyx_v_col_cdeg_max = 0; PyArrayObject *__pyx_v_col_prhs_ratio_max = 0; PyArrayObject *__pyx_v_col_prhs_ratio_min = 0; PyArrayObject *__pyx_v_col_nrhs_ratio_max = 0; PyArrayObject *__pyx_v_col_nrhs_ratio_min = 0; PyArrayObject *__pyx_v_col_plhs_ratio_max = 0; PyArrayObject *__pyx_v_col_plhs_ratio_min = 0; PyArrayObject *__pyx_v_col_nlhs_ratio_max = 0; PyArrayObject *__pyx_v_col_nlhs_ratio_min = 0; PyArrayObject *__pyx_v_col_pcoefs_sum = 0; PyArrayObject *__pyx_v_col_pcoefs_mean = 0; PyArrayObject *__pyx_v_col_pcoefs_std = 0; PyArrayObject *__pyx_v_col_pcoefs_min = 0; PyArrayObject *__pyx_v_col_pcoefs_max = 0; PyArrayObject *__pyx_v_col_ncoefs_sum = 0; PyArrayObject *__pyx_v_col_ncoefs_mean = 0; PyArrayObject *__pyx_v_col_ncoefs_std = 0; PyArrayObject *__pyx_v_col_ncoefs_min = 0; PyArrayObject *__pyx_v_col_ncoefs_max = 0; PyArrayObject *__pyx_v_col_coef_sum1_unit_weight = 0; PyArrayObject *__pyx_v_col_coef_mean1_unit_weight = 0; PyArrayObject *__pyx_v_col_coef_std1_unit_weight = 0; PyArrayObject *__pyx_v_col_coef_max1_unit_weight = 0; PyArrayObject *__pyx_v_col_coef_min1_unit_weight = 0; PyArrayObject *__pyx_v_col_coef_sum2_inverse_sum = 0; PyArrayObject *__pyx_v_col_coef_mean2_inverse_sum = 0; PyArrayObject *__pyx_v_col_coef_std2_inverse_sum = 0; PyArrayObject *__pyx_v_col_coef_max2_inverse_sum = 0; PyArrayObject *__pyx_v_col_coef_min2_inverse_sum = 0; PyArrayObject *__pyx_v_col_coef_sum3_dual_cost = 0; PyArrayObject *__pyx_v_col_coef_mean3_dual_cost = 0; PyArrayObject *__pyx_v_col_coef_std3_dual_cost = 0; PyArrayObject *__pyx_v_col_coef_max3_dual_cost = 0; PyArrayObject *__pyx_v_col_coef_min3_dual_cost = 0; SCIP *__pyx_v_scip; int __pyx_v_i; int __pyx_v_col_i; int __pyx_v_ncols; SCIP_COL **__pyx_v_cols; SCIP_ROW **__pyx_v_neighbors; SCIP_Real *__pyx_v_nonzero_coefs_raw; SCIP_Real __pyx_v_lhs; SCIP_Real __pyx_v_rhs; SCIP_Real __pyx_v_coef; SCIP_VAR *__pyx_v_var; SCIP_COL *__pyx_v_col; int __pyx_v_neighbor_index; int __pyx_v_cdeg_max; int __pyx_v_cdeg_min; int __pyx_v_cdeg; int __pyx_v_nb_neighbors; float __pyx_v_cdeg_mean; float __pyx_v_cdeg_var; int __pyx_v_pcoefs_count; int __pyx_v_ncoefs_count; float __pyx_v_pcoefs_var; float __pyx_v_pcoefs_mean; float __pyx_v_pcoefs_min; float __pyx_v_pcoefs_max; float __pyx_v_ncoefs_var; float __pyx_v_ncoefs_mean; float __pyx_v_ncoefs_min; float __pyx_v_ncoefs_max; PyObject *__pyx_v_solval = NULL; PyObject *__pyx_v_prhs_ratio_max = NULL; PyObject *__pyx_v_prhs_ratio_min = NULL; PyObject *__pyx_v_nrhs_ratio_max = NULL; PyObject *__pyx_v_nrhs_ratio_min = NULL; long __pyx_v_plhs_ratio_max; long __pyx_v_plhs_ratio_min; long __pyx_v_nlhs_ratio_max; long __pyx_v_nlhs_ratio_min; PyObject *__pyx_v_value = NULL; int __pyx_v_row_index; int __pyx_v_nrows; SCIP_ROW **__pyx_v_rows; float __pyx_v_constraint_sum; float __pyx_v_abs_coef; CYTHON_UNUSED SCIP_COL **__pyx_v_neighbor_columns; int __pyx_v_count; float __pyx_v_cons_sum1; float __pyx_v_cons_mean1; float __pyx_v_cons_var1; float __pyx_v_cons_max1; float __pyx_v_cons_min1; float __pyx_v_cons_sum2; float __pyx_v_cons_mean2; float __pyx_v_cons_var2; float __pyx_v_cons_max2; float __pyx_v_cons_min2; float __pyx_v_cons_sum3; float __pyx_v_cons_mean3; float __pyx_v_cons_var3; float __pyx_v_cons_max3; float __pyx_v_cons_min3; PyArrayObject *__pyx_v_cons_w1 = 0; PyArrayObject *__pyx_v_cons_w2 = 0; PyArrayObject *__pyx_v_cons_w3 = 0; SCIP_ROW *__pyx_v_row; int __pyx_v_neighbor_ncolumns; SCIP_Real *__pyx_v_neighbor_columns_values; int __pyx_v_neighbor_column_index; int __pyx_v_neighbor_row_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_cdeg_max; __Pyx_Buffer __pyx_pybuffer_col_cdeg_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_cdeg_mean; __Pyx_Buffer __pyx_pybuffer_col_cdeg_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_cdeg_min; __Pyx_Buffer __pyx_pybuffer_col_cdeg_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_cdeg_std; __Pyx_Buffer __pyx_pybuffer_col_cdeg_std; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_max1_unit_weight; __Pyx_Buffer __pyx_pybuffer_col_coef_max1_unit_weight; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_max2_inverse_sum; __Pyx_Buffer __pyx_pybuffer_col_coef_max2_inverse_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_max3_dual_cost; __Pyx_Buffer __pyx_pybuffer_col_coef_max3_dual_cost; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_mean1_unit_weight; __Pyx_Buffer __pyx_pybuffer_col_coef_mean1_unit_weight; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_mean2_inverse_sum; __Pyx_Buffer __pyx_pybuffer_col_coef_mean2_inverse_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_mean3_dual_cost; __Pyx_Buffer __pyx_pybuffer_col_coef_mean3_dual_cost; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_min1_unit_weight; __Pyx_Buffer __pyx_pybuffer_col_coef_min1_unit_weight; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_min2_inverse_sum; __Pyx_Buffer __pyx_pybuffer_col_coef_min2_inverse_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_min3_dual_cost; __Pyx_Buffer __pyx_pybuffer_col_coef_min3_dual_cost; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_std1_unit_weight; __Pyx_Buffer __pyx_pybuffer_col_coef_std1_unit_weight; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_std2_inverse_sum; __Pyx_Buffer __pyx_pybuffer_col_coef_std2_inverse_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_std3_dual_cost; __Pyx_Buffer __pyx_pybuffer_col_coef_std3_dual_cost; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_sum1_unit_weight; __Pyx_Buffer __pyx_pybuffer_col_coef_sum1_unit_weight; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_sum2_inverse_sum; __Pyx_Buffer __pyx_pybuffer_col_coef_sum2_inverse_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coef_sum3_dual_cost; __Pyx_Buffer __pyx_pybuffer_col_coef_sum3_dual_cost; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coefs; __Pyx_Buffer __pyx_pybuffer_col_coefs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coefs_neg; __Pyx_Buffer __pyx_pybuffer_col_coefs_neg; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_coefs_pos; __Pyx_Buffer __pyx_pybuffer_col_coefs_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_lbs; __Pyx_Buffer __pyx_pybuffer_col_lbs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ncoefs_max; __Pyx_Buffer __pyx_pybuffer_col_ncoefs_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ncoefs_mean; __Pyx_Buffer __pyx_pybuffer_col_ncoefs_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ncoefs_min; __Pyx_Buffer __pyx_pybuffer_col_ncoefs_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ncoefs_std; __Pyx_Buffer __pyx_pybuffer_col_ncoefs_std; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ncoefs_sum; __Pyx_Buffer __pyx_pybuffer_col_ncoefs_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ndown_locks; __Pyx_Buffer __pyx_pybuffer_col_ndown_locks; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_nlhs_ratio_max; __Pyx_Buffer __pyx_pybuffer_col_nlhs_ratio_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_nlhs_ratio_min; __Pyx_Buffer __pyx_pybuffer_col_nlhs_ratio_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_nnzrs; __Pyx_Buffer __pyx_pybuffer_col_nnzrs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_nrhs_ratio_max; __Pyx_Buffer __pyx_pybuffer_col_nrhs_ratio_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_nrhs_ratio_min; __Pyx_Buffer __pyx_pybuffer_col_nrhs_ratio_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_nup_locks; __Pyx_Buffer __pyx_pybuffer_col_nup_locks; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_pcoefs_max; __Pyx_Buffer __pyx_pybuffer_col_pcoefs_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_pcoefs_mean; __Pyx_Buffer __pyx_pybuffer_col_pcoefs_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_pcoefs_min; __Pyx_Buffer __pyx_pybuffer_col_pcoefs_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_pcoefs_std; __Pyx_Buffer __pyx_pybuffer_col_pcoefs_std; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_pcoefs_sum; __Pyx_Buffer __pyx_pybuffer_col_pcoefs_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_plhs_ratio_max; __Pyx_Buffer __pyx_pybuffer_col_plhs_ratio_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_plhs_ratio_min; __Pyx_Buffer __pyx_pybuffer_col_plhs_ratio_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_prhs_ratio_max; __Pyx_Buffer __pyx_pybuffer_col_prhs_ratio_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_prhs_ratio_min; __Pyx_Buffer __pyx_pybuffer_col_prhs_ratio_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ps_down; __Pyx_Buffer __pyx_pybuffer_col_ps_down; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ps_product; __Pyx_Buffer __pyx_pybuffer_col_ps_product; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ps_ratio; __Pyx_Buffer __pyx_pybuffer_col_ps_ratio; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ps_sum; __Pyx_Buffer __pyx_pybuffer_col_ps_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ps_up; __Pyx_Buffer __pyx_pybuffer_col_ps_up; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_red_costs; __Pyx_Buffer __pyx_pybuffer_col_red_costs; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_sol_frac_down; __Pyx_Buffer __pyx_pybuffer_col_sol_frac_down; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_sol_frac_up; __Pyx_Buffer __pyx_pybuffer_col_sol_frac_up; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_sol_isfrac; __Pyx_Buffer __pyx_pybuffer_col_sol_isfrac; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_solvals; __Pyx_Buffer __pyx_pybuffer_col_solvals; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_type_binary; __Pyx_Buffer __pyx_pybuffer_col_type_binary; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_type_int; __Pyx_Buffer __pyx_pybuffer_col_type_int; __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ubs; __Pyx_Buffer __pyx_pybuffer_col_ubs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_w1; __Pyx_Buffer __pyx_pybuffer_cons_w1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_w2; __Pyx_Buffer __pyx_pybuffer_cons_w2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_w3; __Pyx_Buffer __pyx_pybuffer_cons_w3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; PyArrayObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; PyArrayObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; PyArrayObject *__pyx_t_22 = NULL; PyArrayObject *__pyx_t_23 = NULL; PyArrayObject *__pyx_t_24 = NULL; PyArrayObject *__pyx_t_25 = NULL; PyArrayObject *__pyx_t_26 = NULL; PyArrayObject *__pyx_t_27 = NULL; PyArrayObject *__pyx_t_28 = NULL; PyArrayObject *__pyx_t_29 = NULL; PyArrayObject *__pyx_t_30 = NULL; PyArrayObject *__pyx_t_31 = NULL; PyArrayObject *__pyx_t_32 = NULL; PyArrayObject *__pyx_t_33 = NULL; PyArrayObject *__pyx_t_34 = NULL; PyArrayObject *__pyx_t_35 = NULL; PyArrayObject *__pyx_t_36 = NULL; PyArrayObject *__pyx_t_37 = NULL; PyArrayObject *__pyx_t_38 = NULL; PyArrayObject *__pyx_t_39 = NULL; PyArrayObject *__pyx_t_40 = NULL; PyArrayObject *__pyx_t_41 = NULL; PyArrayObject *__pyx_t_42 = NULL; PyArrayObject *__pyx_t_43 = NULL; PyArrayObject *__pyx_t_44 = NULL; PyArrayObject *__pyx_t_45 = NULL; PyArrayObject *__pyx_t_46 = NULL; PyArrayObject *__pyx_t_47 = NULL; PyArrayObject *__pyx_t_48 = NULL; PyArrayObject *__pyx_t_49 = NULL; PyArrayObject *__pyx_t_50 = NULL; PyArrayObject *__pyx_t_51 = NULL; PyArrayObject *__pyx_t_52 = NULL; PyArrayObject *__pyx_t_53 = NULL; PyArrayObject *__pyx_t_54 = NULL; PyArrayObject *__pyx_t_55 = NULL; PyArrayObject *__pyx_t_56 = NULL; PyArrayObject *__pyx_t_57 = NULL; PyArrayObject *__pyx_t_58 = NULL; PyArrayObject *__pyx_t_59 = NULL; PyArrayObject *__pyx_t_60 = NULL; PyArrayObject *__pyx_t_61 = NULL; PyArrayObject *__pyx_t_62 = NULL; PyArrayObject *__pyx_t_63 = NULL; PyArrayObject *__pyx_t_64 = NULL; PyArrayObject *__pyx_t_65 = NULL; PyArrayObject *__pyx_t_66 = NULL; int __pyx_t_67; int __pyx_t_68; Py_ssize_t __pyx_t_69; int __pyx_t_70; long __pyx_t_71; __pyx_t_5numpy_float32_t __pyx_t_72; __pyx_t_5numpy_float32_t __pyx_t_73; SCIP_Real __pyx_t_74; float __pyx_t_75; float __pyx_t_76; int __pyx_t_77; int __pyx_t_78; int __pyx_t_79; int __pyx_t_80; int __pyx_t_81; int __pyx_t_82; int __pyx_t_83; long __pyx_t_84; float __pyx_t_85; double __pyx_t_86; SCIP_Real __pyx_t_87; SCIP_Real __pyx_t_88; PyArrayObject *__pyx_t_89 = NULL; float __pyx_t_90; float __pyx_t_91; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDingStateCols", 0); __pyx_pybuffer_col_type_binary.pybuffer.buf = NULL; __pyx_pybuffer_col_type_binary.refcount = 0; __pyx_pybuffernd_col_type_binary.data = NULL; __pyx_pybuffernd_col_type_binary.rcbuffer = &__pyx_pybuffer_col_type_binary; __pyx_pybuffer_col_type_int.pybuffer.buf = NULL; __pyx_pybuffer_col_type_int.refcount = 0; __pyx_pybuffernd_col_type_int.data = NULL; __pyx_pybuffernd_col_type_int.rcbuffer = &__pyx_pybuffer_col_type_int; __pyx_pybuffer_col_coefs.pybuffer.buf = NULL; __pyx_pybuffer_col_coefs.refcount = 0; __pyx_pybuffernd_col_coefs.data = NULL; __pyx_pybuffernd_col_coefs.rcbuffer = &__pyx_pybuffer_col_coefs; __pyx_pybuffer_col_coefs_pos.pybuffer.buf = NULL; __pyx_pybuffer_col_coefs_pos.refcount = 0; __pyx_pybuffernd_col_coefs_pos.data = NULL; __pyx_pybuffernd_col_coefs_pos.rcbuffer = &__pyx_pybuffer_col_coefs_pos; __pyx_pybuffer_col_coefs_neg.pybuffer.buf = NULL; __pyx_pybuffer_col_coefs_neg.refcount = 0; __pyx_pybuffernd_col_coefs_neg.data = NULL; __pyx_pybuffernd_col_coefs_neg.rcbuffer = &__pyx_pybuffer_col_coefs_neg; __pyx_pybuffer_col_nnzrs.pybuffer.buf = NULL; __pyx_pybuffer_col_nnzrs.refcount = 0; __pyx_pybuffernd_col_nnzrs.data = NULL; __pyx_pybuffernd_col_nnzrs.rcbuffer = &__pyx_pybuffer_col_nnzrs; __pyx_pybuffer_col_nup_locks.pybuffer.buf = NULL; __pyx_pybuffer_col_nup_locks.refcount = 0; __pyx_pybuffernd_col_nup_locks.data = NULL; __pyx_pybuffernd_col_nup_locks.rcbuffer = &__pyx_pybuffer_col_nup_locks; __pyx_pybuffer_col_ndown_locks.pybuffer.buf = NULL; __pyx_pybuffer_col_ndown_locks.refcount = 0; __pyx_pybuffernd_col_ndown_locks.data = NULL; __pyx_pybuffernd_col_ndown_locks.rcbuffer = &__pyx_pybuffer_col_ndown_locks; __pyx_pybuffer_col_solvals.pybuffer.buf = NULL; __pyx_pybuffer_col_solvals.refcount = 0; __pyx_pybuffernd_col_solvals.data = NULL; __pyx_pybuffernd_col_solvals.rcbuffer = &__pyx_pybuffer_col_solvals; __pyx_pybuffer_col_sol_frac_up.pybuffer.buf = NULL; __pyx_pybuffer_col_sol_frac_up.refcount = 0; __pyx_pybuffernd_col_sol_frac_up.data = NULL; __pyx_pybuffernd_col_sol_frac_up.rcbuffer = &__pyx_pybuffer_col_sol_frac_up; __pyx_pybuffer_col_sol_frac_down.pybuffer.buf = NULL; __pyx_pybuffer_col_sol_frac_down.refcount = 0; __pyx_pybuffernd_col_sol_frac_down.data = NULL; __pyx_pybuffernd_col_sol_frac_down.rcbuffer = &__pyx_pybuffer_col_sol_frac_down; __pyx_pybuffer_col_sol_isfrac.pybuffer.buf = NULL; __pyx_pybuffer_col_sol_isfrac.refcount = 0; __pyx_pybuffernd_col_sol_isfrac.data = NULL; __pyx_pybuffernd_col_sol_isfrac.rcbuffer = &__pyx_pybuffer_col_sol_isfrac; __pyx_pybuffer_col_ps_up.pybuffer.buf = NULL; __pyx_pybuffer_col_ps_up.refcount = 0; __pyx_pybuffernd_col_ps_up.data = NULL; __pyx_pybuffernd_col_ps_up.rcbuffer = &__pyx_pybuffer_col_ps_up; __pyx_pybuffer_col_ps_down.pybuffer.buf = NULL; __pyx_pybuffer_col_ps_down.refcount = 0; __pyx_pybuffernd_col_ps_down.data = NULL; __pyx_pybuffernd_col_ps_down.rcbuffer = &__pyx_pybuffer_col_ps_down; __pyx_pybuffer_col_ps_ratio.pybuffer.buf = NULL; __pyx_pybuffer_col_ps_ratio.refcount = 0; __pyx_pybuffernd_col_ps_ratio.data = NULL; __pyx_pybuffernd_col_ps_ratio.rcbuffer = &__pyx_pybuffer_col_ps_ratio; __pyx_pybuffer_col_ps_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_ps_sum.refcount = 0; __pyx_pybuffernd_col_ps_sum.data = NULL; __pyx_pybuffernd_col_ps_sum.rcbuffer = &__pyx_pybuffer_col_ps_sum; __pyx_pybuffer_col_ps_product.pybuffer.buf = NULL; __pyx_pybuffer_col_ps_product.refcount = 0; __pyx_pybuffernd_col_ps_product.data = NULL; __pyx_pybuffernd_col_ps_product.rcbuffer = &__pyx_pybuffer_col_ps_product; __pyx_pybuffer_col_lbs.pybuffer.buf = NULL; __pyx_pybuffer_col_lbs.refcount = 0; __pyx_pybuffernd_col_lbs.data = NULL; __pyx_pybuffernd_col_lbs.rcbuffer = &__pyx_pybuffer_col_lbs; __pyx_pybuffer_col_ubs.pybuffer.buf = NULL; __pyx_pybuffer_col_ubs.refcount = 0; __pyx_pybuffernd_col_ubs.data = NULL; __pyx_pybuffernd_col_ubs.rcbuffer = &__pyx_pybuffer_col_ubs; __pyx_pybuffer_col_red_costs.pybuffer.buf = NULL; __pyx_pybuffer_col_red_costs.refcount = 0; __pyx_pybuffernd_col_red_costs.data = NULL; __pyx_pybuffernd_col_red_costs.rcbuffer = &__pyx_pybuffer_col_red_costs; __pyx_pybuffer_col_cdeg_mean.pybuffer.buf = NULL; __pyx_pybuffer_col_cdeg_mean.refcount = 0; __pyx_pybuffernd_col_cdeg_mean.data = NULL; __pyx_pybuffernd_col_cdeg_mean.rcbuffer = &__pyx_pybuffer_col_cdeg_mean; __pyx_pybuffer_col_cdeg_std.pybuffer.buf = NULL; __pyx_pybuffer_col_cdeg_std.refcount = 0; __pyx_pybuffernd_col_cdeg_std.data = NULL; __pyx_pybuffernd_col_cdeg_std.rcbuffer = &__pyx_pybuffer_col_cdeg_std; __pyx_pybuffer_col_cdeg_min.pybuffer.buf = NULL; __pyx_pybuffer_col_cdeg_min.refcount = 0; __pyx_pybuffernd_col_cdeg_min.data = NULL; __pyx_pybuffernd_col_cdeg_min.rcbuffer = &__pyx_pybuffer_col_cdeg_min; __pyx_pybuffer_col_cdeg_max.pybuffer.buf = NULL; __pyx_pybuffer_col_cdeg_max.refcount = 0; __pyx_pybuffernd_col_cdeg_max.data = NULL; __pyx_pybuffernd_col_cdeg_max.rcbuffer = &__pyx_pybuffer_col_cdeg_max; __pyx_pybuffer_col_prhs_ratio_max.pybuffer.buf = NULL; __pyx_pybuffer_col_prhs_ratio_max.refcount = 0; __pyx_pybuffernd_col_prhs_ratio_max.data = NULL; __pyx_pybuffernd_col_prhs_ratio_max.rcbuffer = &__pyx_pybuffer_col_prhs_ratio_max; __pyx_pybuffer_col_prhs_ratio_min.pybuffer.buf = NULL; __pyx_pybuffer_col_prhs_ratio_min.refcount = 0; __pyx_pybuffernd_col_prhs_ratio_min.data = NULL; __pyx_pybuffernd_col_prhs_ratio_min.rcbuffer = &__pyx_pybuffer_col_prhs_ratio_min; __pyx_pybuffer_col_nrhs_ratio_max.pybuffer.buf = NULL; __pyx_pybuffer_col_nrhs_ratio_max.refcount = 0; __pyx_pybuffernd_col_nrhs_ratio_max.data = NULL; __pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer = &__pyx_pybuffer_col_nrhs_ratio_max; __pyx_pybuffer_col_nrhs_ratio_min.pybuffer.buf = NULL; __pyx_pybuffer_col_nrhs_ratio_min.refcount = 0; __pyx_pybuffernd_col_nrhs_ratio_min.data = NULL; __pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer = &__pyx_pybuffer_col_nrhs_ratio_min; __pyx_pybuffer_col_plhs_ratio_max.pybuffer.buf = NULL; __pyx_pybuffer_col_plhs_ratio_max.refcount = 0; __pyx_pybuffernd_col_plhs_ratio_max.data = NULL; __pyx_pybuffernd_col_plhs_ratio_max.rcbuffer = &__pyx_pybuffer_col_plhs_ratio_max; __pyx_pybuffer_col_plhs_ratio_min.pybuffer.buf = NULL; __pyx_pybuffer_col_plhs_ratio_min.refcount = 0; __pyx_pybuffernd_col_plhs_ratio_min.data = NULL; __pyx_pybuffernd_col_plhs_ratio_min.rcbuffer = &__pyx_pybuffer_col_plhs_ratio_min; __pyx_pybuffer_col_nlhs_ratio_max.pybuffer.buf = NULL; __pyx_pybuffer_col_nlhs_ratio_max.refcount = 0; __pyx_pybuffernd_col_nlhs_ratio_max.data = NULL; __pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer = &__pyx_pybuffer_col_nlhs_ratio_max; __pyx_pybuffer_col_nlhs_ratio_min.pybuffer.buf = NULL; __pyx_pybuffer_col_nlhs_ratio_min.refcount = 0; __pyx_pybuffernd_col_nlhs_ratio_min.data = NULL; __pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer = &__pyx_pybuffer_col_nlhs_ratio_min; __pyx_pybuffer_col_pcoefs_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_pcoefs_sum.refcount = 0; __pyx_pybuffernd_col_pcoefs_sum.data = NULL; __pyx_pybuffernd_col_pcoefs_sum.rcbuffer = &__pyx_pybuffer_col_pcoefs_sum; __pyx_pybuffer_col_pcoefs_mean.pybuffer.buf = NULL; __pyx_pybuffer_col_pcoefs_mean.refcount = 0; __pyx_pybuffernd_col_pcoefs_mean.data = NULL; __pyx_pybuffernd_col_pcoefs_mean.rcbuffer = &__pyx_pybuffer_col_pcoefs_mean; __pyx_pybuffer_col_pcoefs_std.pybuffer.buf = NULL; __pyx_pybuffer_col_pcoefs_std.refcount = 0; __pyx_pybuffernd_col_pcoefs_std.data = NULL; __pyx_pybuffernd_col_pcoefs_std.rcbuffer = &__pyx_pybuffer_col_pcoefs_std; __pyx_pybuffer_col_pcoefs_min.pybuffer.buf = NULL; __pyx_pybuffer_col_pcoefs_min.refcount = 0; __pyx_pybuffernd_col_pcoefs_min.data = NULL; __pyx_pybuffernd_col_pcoefs_min.rcbuffer = &__pyx_pybuffer_col_pcoefs_min; __pyx_pybuffer_col_pcoefs_max.pybuffer.buf = NULL; __pyx_pybuffer_col_pcoefs_max.refcount = 0; __pyx_pybuffernd_col_pcoefs_max.data = NULL; __pyx_pybuffernd_col_pcoefs_max.rcbuffer = &__pyx_pybuffer_col_pcoefs_max; __pyx_pybuffer_col_ncoefs_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_ncoefs_sum.refcount = 0; __pyx_pybuffernd_col_ncoefs_sum.data = NULL; __pyx_pybuffernd_col_ncoefs_sum.rcbuffer = &__pyx_pybuffer_col_ncoefs_sum; __pyx_pybuffer_col_ncoefs_mean.pybuffer.buf = NULL; __pyx_pybuffer_col_ncoefs_mean.refcount = 0; __pyx_pybuffernd_col_ncoefs_mean.data = NULL; __pyx_pybuffernd_col_ncoefs_mean.rcbuffer = &__pyx_pybuffer_col_ncoefs_mean; __pyx_pybuffer_col_ncoefs_std.pybuffer.buf = NULL; __pyx_pybuffer_col_ncoefs_std.refcount = 0; __pyx_pybuffernd_col_ncoefs_std.data = NULL; __pyx_pybuffernd_col_ncoefs_std.rcbuffer = &__pyx_pybuffer_col_ncoefs_std; __pyx_pybuffer_col_ncoefs_min.pybuffer.buf = NULL; __pyx_pybuffer_col_ncoefs_min.refcount = 0; __pyx_pybuffernd_col_ncoefs_min.data = NULL; __pyx_pybuffernd_col_ncoefs_min.rcbuffer = &__pyx_pybuffer_col_ncoefs_min; __pyx_pybuffer_col_ncoefs_max.pybuffer.buf = NULL; __pyx_pybuffer_col_ncoefs_max.refcount = 0; __pyx_pybuffernd_col_ncoefs_max.data = NULL; __pyx_pybuffernd_col_ncoefs_max.rcbuffer = &__pyx_pybuffer_col_ncoefs_max; __pyx_pybuffer_col_coef_sum1_unit_weight.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_sum1_unit_weight.refcount = 0; __pyx_pybuffernd_col_coef_sum1_unit_weight.data = NULL; __pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer = &__pyx_pybuffer_col_coef_sum1_unit_weight; __pyx_pybuffer_col_coef_mean1_unit_weight.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_mean1_unit_weight.refcount = 0; __pyx_pybuffernd_col_coef_mean1_unit_weight.data = NULL; __pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer = &__pyx_pybuffer_col_coef_mean1_unit_weight; __pyx_pybuffer_col_coef_std1_unit_weight.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_std1_unit_weight.refcount = 0; __pyx_pybuffernd_col_coef_std1_unit_weight.data = NULL; __pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer = &__pyx_pybuffer_col_coef_std1_unit_weight; __pyx_pybuffer_col_coef_max1_unit_weight.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_max1_unit_weight.refcount = 0; __pyx_pybuffernd_col_coef_max1_unit_weight.data = NULL; __pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer = &__pyx_pybuffer_col_coef_max1_unit_weight; __pyx_pybuffer_col_coef_min1_unit_weight.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_min1_unit_weight.refcount = 0; __pyx_pybuffernd_col_coef_min1_unit_weight.data = NULL; __pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer = &__pyx_pybuffer_col_coef_min1_unit_weight; __pyx_pybuffer_col_coef_sum2_inverse_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_sum2_inverse_sum.refcount = 0; __pyx_pybuffernd_col_coef_sum2_inverse_sum.data = NULL; __pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer = &__pyx_pybuffer_col_coef_sum2_inverse_sum; __pyx_pybuffer_col_coef_mean2_inverse_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_mean2_inverse_sum.refcount = 0; __pyx_pybuffernd_col_coef_mean2_inverse_sum.data = NULL; __pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer = &__pyx_pybuffer_col_coef_mean2_inverse_sum; __pyx_pybuffer_col_coef_std2_inverse_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_std2_inverse_sum.refcount = 0; __pyx_pybuffernd_col_coef_std2_inverse_sum.data = NULL; __pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer = &__pyx_pybuffer_col_coef_std2_inverse_sum; __pyx_pybuffer_col_coef_max2_inverse_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_max2_inverse_sum.refcount = 0; __pyx_pybuffernd_col_coef_max2_inverse_sum.data = NULL; __pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer = &__pyx_pybuffer_col_coef_max2_inverse_sum; __pyx_pybuffer_col_coef_min2_inverse_sum.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_min2_inverse_sum.refcount = 0; __pyx_pybuffernd_col_coef_min2_inverse_sum.data = NULL; __pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer = &__pyx_pybuffer_col_coef_min2_inverse_sum; __pyx_pybuffer_col_coef_sum3_dual_cost.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_sum3_dual_cost.refcount = 0; __pyx_pybuffernd_col_coef_sum3_dual_cost.data = NULL; __pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer = &__pyx_pybuffer_col_coef_sum3_dual_cost; __pyx_pybuffer_col_coef_mean3_dual_cost.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_mean3_dual_cost.refcount = 0; __pyx_pybuffernd_col_coef_mean3_dual_cost.data = NULL; __pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer = &__pyx_pybuffer_col_coef_mean3_dual_cost; __pyx_pybuffer_col_coef_std3_dual_cost.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_std3_dual_cost.refcount = 0; __pyx_pybuffernd_col_coef_std3_dual_cost.data = NULL; __pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer = &__pyx_pybuffer_col_coef_std3_dual_cost; __pyx_pybuffer_col_coef_max3_dual_cost.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_max3_dual_cost.refcount = 0; __pyx_pybuffernd_col_coef_max3_dual_cost.data = NULL; __pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer = &__pyx_pybuffer_col_coef_max3_dual_cost; __pyx_pybuffer_col_coef_min3_dual_cost.pybuffer.buf = NULL; __pyx_pybuffer_col_coef_min3_dual_cost.refcount = 0; __pyx_pybuffernd_col_coef_min3_dual_cost.data = NULL; __pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer = &__pyx_pybuffer_col_coef_min3_dual_cost; __pyx_pybuffer_cons_w1.pybuffer.buf = NULL; __pyx_pybuffer_cons_w1.refcount = 0; __pyx_pybuffernd_cons_w1.data = NULL; __pyx_pybuffernd_cons_w1.rcbuffer = &__pyx_pybuffer_cons_w1; __pyx_pybuffer_cons_w2.pybuffer.buf = NULL; __pyx_pybuffer_cons_w2.refcount = 0; __pyx_pybuffernd_cons_w2.data = NULL; __pyx_pybuffernd_cons_w2.rcbuffer = &__pyx_pybuffer_cons_w2; __pyx_pybuffer_cons_w3.pybuffer.buf = NULL; __pyx_pybuffer_cons_w3.refcount = 0; __pyx_pybuffernd_cons_w3.data = NULL; __pyx_pybuffernd_cons_w3.rcbuffer = &__pyx_pybuffer_cons_w3; /* "pyscipopt/scip.pyx":4542 * cdef np.ndarray[np.float32_t, ndim=1] col_coef_min3_dual_cost * * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * cdef int i, j, k, col_i * cdef SCIP_Real sim, prod */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":4545 * cdef int i, j, k, col_i * cdef SCIP_Real sim, prod * cdef int ncols = SCIPgetNLPCols(scip) # <<<<<<<<<<<<<< * * col_type_binary = np.empty(shape=(ncols, ), dtype=np.int32) */ __pyx_v_ncols = SCIPgetNLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":4547 * cdef int ncols = SCIPgetNLPCols(scip) * * col_type_binary = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_type_int = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4547, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_type_binary, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_type_binary.diminfo[0].strides = __pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_type_binary.diminfo[0].shape = __pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4547, __pyx_L1_error) } __pyx_t_6 = 0; __pyx_v_col_type_binary = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4548 * * col_type_binary = np.empty(shape=(ncols, ), dtype=np.int32) * col_type_int = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) * col_coefs_pos = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4548, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_type_int.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_type_int.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_type_int.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_type_int, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_type_int.diminfo[0].strides = __pyx_pybuffernd_col_type_int.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_type_int.diminfo[0].shape = __pyx_pybuffernd_col_type_int.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4548, __pyx_L1_error) } __pyx_t_11 = 0; __pyx_v_col_type_int = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4549 * col_type_binary = np.empty(shape=(ncols, ), dtype=np.int32) * col_type_int = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coefs_pos = np.empty(shape=(ncols, ), dtype=np.float32) * col_coefs_neg = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4549, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coefs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coefs.diminfo[0].strides = __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coefs.diminfo[0].shape = __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4549, __pyx_L1_error) } __pyx_t_12 = 0; __pyx_v_col_coefs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4550 * col_type_int = np.empty(shape=(ncols, ), dtype=np.int32) * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) * col_coefs_pos = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coefs_neg = np.empty(shape=(ncols, ), dtype=np.float32) * col_nnzrs = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4550, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coefs_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coefs_pos.diminfo[0].strides = __pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coefs_pos.diminfo[0].shape = __pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4550, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_col_coefs_pos = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4551 * col_coefs = np.empty(shape=(ncols, ), dtype=np.float32) * col_coefs_pos = np.empty(shape=(ncols, ), dtype=np.float32) * col_coefs_neg = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_nnzrs = np.empty(shape=(ncols, ), dtype=np.int32) * col_nup_locks = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4551, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coefs_neg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coefs_neg.diminfo[0].strides = __pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coefs_neg.diminfo[0].shape = __pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4551, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_col_coefs_neg = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4552 * col_coefs_pos = np.empty(shape=(ncols, ), dtype=np.float32) * col_coefs_neg = np.empty(shape=(ncols, ), dtype=np.float32) * col_nnzrs = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_nup_locks = np.empty(shape=(ncols, ), dtype=np.int32) * col_ndown_locks = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4552, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_nnzrs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_nnzrs.diminfo[0].strides = __pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_nnzrs.diminfo[0].shape = __pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4552, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_col_nnzrs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4553 * col_coefs_neg = np.empty(shape=(ncols, ), dtype=np.float32) * col_nnzrs = np.empty(shape=(ncols, ), dtype=np.int32) * col_nup_locks = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_ndown_locks = np.empty(shape=(ncols, ), dtype=np.int32) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4553, __pyx_L1_error) __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_nup_locks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_nup_locks.diminfo[0].strides = __pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_nup_locks.diminfo[0].shape = __pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4553, __pyx_L1_error) } __pyx_t_16 = 0; __pyx_v_col_nup_locks = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4554 * col_nnzrs = np.empty(shape=(ncols, ), dtype=np.int32) * col_nup_locks = np.empty(shape=(ncols, ), dtype=np.int32) * col_ndown_locks = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4554, __pyx_L1_error) __pyx_t_17 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ndown_locks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ndown_locks.diminfo[0].strides = __pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ndown_locks.diminfo[0].shape = __pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4554, __pyx_L1_error) } __pyx_t_17 = 0; __pyx_v_col_ndown_locks = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4556 * col_ndown_locks = np.empty(shape=(ncols, ), dtype=np.int32) * * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_sol_frac_up = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_frac_down = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4556, __pyx_L1_error) __pyx_t_18 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_solvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_solvals.diminfo[0].strides = __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_solvals.diminfo[0].shape = __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4556, __pyx_L1_error) } __pyx_t_18 = 0; __pyx_v_col_solvals = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4557 * * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_frac_up = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_sol_frac_down = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_isfrac = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4557, __pyx_L1_error) __pyx_t_19 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_frac_up, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_sol_frac_up.diminfo[0].strides = __pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_frac_up.diminfo[0].shape = __pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4557, __pyx_L1_error) } __pyx_t_19 = 0; __pyx_v_col_sol_frac_up = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4558 * col_solvals = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_frac_up = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_frac_down = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_sol_isfrac = np.empty(shape=(ncols, ), dtype=np.float32) * col_red_costs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4558, __pyx_L1_error) __pyx_t_20 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_frac_down, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_sol_frac_down.diminfo[0].strides = __pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_frac_down.diminfo[0].shape = __pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4558, __pyx_L1_error) } __pyx_t_20 = 0; __pyx_v_col_sol_frac_down = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4559 * col_sol_frac_up = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_frac_down = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_isfrac = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_red_costs = np.empty(shape=(ncols, ), dtype=np.float32) * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4559, __pyx_L1_error) __pyx_t_21 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_sol_isfrac, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_sol_isfrac.diminfo[0].strides = __pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_sol_isfrac.diminfo[0].shape = __pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4559, __pyx_L1_error) } __pyx_t_21 = 0; __pyx_v_col_sol_isfrac = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4560 * col_sol_frac_down = np.empty(shape=(ncols, ), dtype=np.float32) * col_sol_isfrac = np.empty(shape=(ncols, ), dtype=np.float32) * col_red_costs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4560, __pyx_L1_error) __pyx_t_22 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_red_costs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_red_costs.diminfo[0].strides = __pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_red_costs.diminfo[0].shape = __pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4560, __pyx_L1_error) } __pyx_t_22 = 0; __pyx_v_col_red_costs = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4561 * col_sol_isfrac = np.empty(shape=(ncols, ), dtype=np.float32) * col_red_costs = np.empty(shape=(ncols, ), dtype=np.float32) * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4561, __pyx_L1_error) __pyx_t_23 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_lbs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_lbs.diminfo[0].strides = __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_lbs.diminfo[0].shape = __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4561, __pyx_L1_error) } __pyx_t_23 = 0; __pyx_v_col_lbs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4562 * col_red_costs = np.empty(shape=(ncols, ), dtype=np.float32) * col_lbs = np.empty(shape=(ncols, ), dtype=np.float32) * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * * col_ps_up = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4562, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ubs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ubs.diminfo[0].strides = __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ubs.diminfo[0].shape = __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4562, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_col_ubs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4564 * col_ubs = np.empty(shape=(ncols, ), dtype=np.float32) * * col_ps_up = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ps_down = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_ratio = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4564, __pyx_L1_error) __pyx_t_25 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer, (PyObject*)__pyx_t_25, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ps_up, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ps_up.diminfo[0].strides = __pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ps_up.diminfo[0].shape = __pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4564, __pyx_L1_error) } __pyx_t_25 = 0; __pyx_v_col_ps_up = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4565 * * col_ps_up = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_down = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ps_ratio = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4565, __pyx_L1_error) __pyx_t_26 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ps_down, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ps_down.diminfo[0].strides = __pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ps_down.diminfo[0].shape = __pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4565, __pyx_L1_error) } __pyx_t_26 = 0; __pyx_v_col_ps_down = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4566 * col_ps_up = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_down = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_ratio = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ps_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_product = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4566, __pyx_L1_error) __pyx_t_27 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ps_ratio, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ps_ratio.diminfo[0].strides = __pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ps_ratio.diminfo[0].shape = __pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4566, __pyx_L1_error) } __pyx_t_27 = 0; __pyx_v_col_ps_ratio = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4567 * col_ps_down = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_ratio = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ps_product = np.empty(shape=(ncols, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4567, __pyx_L1_error) __pyx_t_28 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ps_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ps_sum.diminfo[0].strides = __pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ps_sum.diminfo[0].shape = __pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4567, __pyx_L1_error) } __pyx_t_28 = 0; __pyx_v_col_ps_sum = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4568 * col_ps_ratio = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_ps_product = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * * col_cdeg_mean = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4568, __pyx_L1_error) __pyx_t_29 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ps_product, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ps_product.diminfo[0].strides = __pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ps_product.diminfo[0].shape = __pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4568, __pyx_L1_error) } __pyx_t_29 = 0; __pyx_v_col_ps_product = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4570 * col_ps_product = np.empty(shape=(ncols, ), dtype=np.float32) * * col_cdeg_mean = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_cdeg_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_cdeg_min = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4570, __pyx_L1_error) __pyx_t_30 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_cdeg_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_cdeg_mean.diminfo[0].strides = __pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_cdeg_mean.diminfo[0].shape = __pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4570, __pyx_L1_error) } __pyx_t_30 = 0; __pyx_v_col_cdeg_mean = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4571 * * col_cdeg_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_cdeg_std = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_cdeg_min = np.empty(shape=(ncols, ), dtype=np.int32) * col_cdeg_max = np.empty(shape=(ncols, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4571, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_cdeg_std, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_cdeg_std.diminfo[0].strides = __pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_cdeg_std.diminfo[0].shape = __pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4571, __pyx_L1_error) } __pyx_t_31 = 0; __pyx_v_col_cdeg_std = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4572 * col_cdeg_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_cdeg_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_cdeg_min = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * col_cdeg_max = np.empty(shape=(ncols, ), dtype=np.int32) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4572, __pyx_L1_error) __pyx_t_32 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_cdeg_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_cdeg_min.diminfo[0].strides = __pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_cdeg_min.diminfo[0].shape = __pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4572, __pyx_L1_error) } __pyx_t_32 = 0; __pyx_v_col_cdeg_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4573 * col_cdeg_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_cdeg_min = np.empty(shape=(ncols, ), dtype=np.int32) * col_cdeg_max = np.empty(shape=(ncols, ), dtype=np.int32) # <<<<<<<<<<<<<< * * col_prhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4573, __pyx_L1_error) __pyx_t_33 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_cdeg_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_cdeg_max.diminfo[0].strides = __pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_cdeg_max.diminfo[0].shape = __pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4573, __pyx_L1_error) } __pyx_t_33 = 0; __pyx_v_col_cdeg_max = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4575 * col_cdeg_max = np.empty(shape=(ncols, ), dtype=np.int32) * * col_prhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_prhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_nrhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4575, __pyx_L1_error) __pyx_t_34 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_prhs_ratio_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_prhs_ratio_max.diminfo[0].strides = __pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_prhs_ratio_max.diminfo[0].shape = __pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4575, __pyx_L1_error) } __pyx_t_34 = 0; __pyx_v_col_prhs_ratio_max = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4576 * * col_prhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_prhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_nrhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_nrhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4576, __pyx_L1_error) __pyx_t_35 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_35, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_prhs_ratio_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_prhs_ratio_min.diminfo[0].strides = __pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_prhs_ratio_min.diminfo[0].shape = __pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4576, __pyx_L1_error) } __pyx_t_35 = 0; __pyx_v_col_prhs_ratio_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4577 * col_prhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_prhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_nrhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_nrhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_plhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4577, __pyx_L1_error) __pyx_t_36 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_36, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_nrhs_ratio_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_nrhs_ratio_max.diminfo[0].strides = __pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_nrhs_ratio_max.diminfo[0].shape = __pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4577, __pyx_L1_error) } __pyx_t_36 = 0; __pyx_v_col_nrhs_ratio_max = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4578 * col_prhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_nrhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_nrhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_plhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_plhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4578, __pyx_L1_error) __pyx_t_37 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_37, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_nrhs_ratio_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_nrhs_ratio_min.diminfo[0].strides = __pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_nrhs_ratio_min.diminfo[0].shape = __pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4578, __pyx_L1_error) } __pyx_t_37 = 0; __pyx_v_col_nrhs_ratio_min = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4579 * col_nrhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_nrhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_plhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_plhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_nlhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4579, __pyx_L1_error) __pyx_t_38 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_38, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_plhs_ratio_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_plhs_ratio_max.diminfo[0].strides = __pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_plhs_ratio_max.diminfo[0].shape = __pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4579, __pyx_L1_error) } __pyx_t_38 = 0; __pyx_v_col_plhs_ratio_max = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4580 * col_nrhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_plhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_plhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_nlhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_nlhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4580, __pyx_L1_error) __pyx_t_39 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_39, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_plhs_ratio_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_plhs_ratio_min.diminfo[0].strides = __pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_plhs_ratio_min.diminfo[0].shape = __pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4580, __pyx_L1_error) } __pyx_t_39 = 0; __pyx_v_col_plhs_ratio_min = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4581 * col_plhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_plhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_nlhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_nlhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4581, __pyx_L1_error) __pyx_t_40 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_40, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_nlhs_ratio_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_nlhs_ratio_max.diminfo[0].strides = __pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_nlhs_ratio_max.diminfo[0].shape = __pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4581, __pyx_L1_error) } __pyx_t_40 = 0; __pyx_v_col_nlhs_ratio_max = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4582 * col_plhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_nlhs_ratio_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_nlhs_ratio_min = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4582, __pyx_L1_error) __pyx_t_41 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_41, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_nlhs_ratio_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_nlhs_ratio_min.diminfo[0].strides = __pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_nlhs_ratio_min.diminfo[0].shape = __pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4582, __pyx_L1_error) } __pyx_t_41 = 0; __pyx_v_col_nlhs_ratio_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4585 * * * col_pcoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_pcoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4585, __pyx_L1_error) __pyx_t_42 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_42, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_pcoefs_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_pcoefs_sum.diminfo[0].strides = __pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_pcoefs_sum.diminfo[0].shape = __pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4585, __pyx_L1_error) } __pyx_t_42 = 0; __pyx_v_col_pcoefs_sum = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4586 * * col_pcoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_pcoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4586, __pyx_L1_error) __pyx_t_43 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_43, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_pcoefs_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_pcoefs_mean.diminfo[0].strides = __pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_pcoefs_mean.diminfo[0].shape = __pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4586, __pyx_L1_error) } __pyx_t_43 = 0; __pyx_v_col_pcoefs_mean = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4587 * col_pcoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_pcoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4587, __pyx_L1_error) __pyx_t_44 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer, (PyObject*)__pyx_t_44, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_pcoefs_std, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_pcoefs_std.diminfo[0].strides = __pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_pcoefs_std.diminfo[0].shape = __pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4587, __pyx_L1_error) } __pyx_t_44 = 0; __pyx_v_col_pcoefs_std = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4588 * col_pcoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_pcoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4588, __pyx_L1_error) __pyx_t_45 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_45, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_pcoefs_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_pcoefs_min.diminfo[0].strides = __pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_pcoefs_min.diminfo[0].shape = __pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4588, __pyx_L1_error) } __pyx_t_45 = 0; __pyx_v_col_pcoefs_min = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4589 * col_pcoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ncoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4589, __pyx_L1_error) __pyx_t_46 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_46, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_pcoefs_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_pcoefs_max.diminfo[0].strides = __pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_pcoefs_max.diminfo[0].shape = __pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4589, __pyx_L1_error) } __pyx_t_46 = 0; __pyx_v_col_pcoefs_max = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4590 * col_pcoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_pcoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ncoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4590, __pyx_L1_error) __pyx_t_47 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_47, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ncoefs_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ncoefs_sum.diminfo[0].strides = __pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ncoefs_sum.diminfo[0].shape = __pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4590, __pyx_L1_error) } __pyx_t_47 = 0; __pyx_v_col_ncoefs_sum = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4591 * col_pcoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ncoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4591, __pyx_L1_error) __pyx_t_48 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ncoefs_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ncoefs_mean.diminfo[0].strides = __pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ncoefs_mean.diminfo[0].shape = __pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4591, __pyx_L1_error) } __pyx_t_48 = 0; __pyx_v_col_ncoefs_mean = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4592 * col_ncoefs_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ncoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4592, __pyx_L1_error) __pyx_t_49 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer, (PyObject*)__pyx_t_49, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ncoefs_std, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ncoefs_std.diminfo[0].strides = __pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ncoefs_std.diminfo[0].shape = __pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4592, __pyx_L1_error) } __pyx_t_49 = 0; __pyx_v_col_ncoefs_std = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4593 * col_ncoefs_mean = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_ncoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4593, __pyx_L1_error) __pyx_t_50 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_50, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ncoefs_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_ncoefs_min.diminfo[0].strides = __pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ncoefs_min.diminfo[0].shape = __pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4593, __pyx_L1_error) } __pyx_t_50 = 0; __pyx_v_col_ncoefs_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4594 * col_ncoefs_std = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_min = np.empty(shape=(ncols, ), dtype=np.float32) * col_ncoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * * col_coef_sum1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4594, __pyx_L1_error) __pyx_t_51 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_51, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ncoefs_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_ncoefs_max.diminfo[0].strides = __pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ncoefs_max.diminfo[0].shape = __pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4594, __pyx_L1_error) } __pyx_t_51 = 0; __pyx_v_col_ncoefs_max = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4596 * col_ncoefs_max = np.empty(shape=(ncols, ), dtype=np.float32) * * col_coef_sum1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_mean1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4596, __pyx_L1_error) __pyx_t_52 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_t_52, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_sum1_unit_weight, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_sum1_unit_weight.diminfo[0].strides = __pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_sum1_unit_weight.diminfo[0].shape = __pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4596, __pyx_L1_error) } __pyx_t_52 = 0; __pyx_v_col_coef_sum1_unit_weight = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4597 * * col_coef_sum1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_std1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4597, __pyx_L1_error) __pyx_t_53 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_t_53, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_mean1_unit_weight, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_mean1_unit_weight.diminfo[0].strides = __pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_mean1_unit_weight.diminfo[0].shape = __pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4597, __pyx_L1_error) } __pyx_t_53 = 0; __pyx_v_col_coef_mean1_unit_weight = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4598 * col_coef_sum1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_max1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4598, __pyx_L1_error) __pyx_t_54 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_t_54, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_std1_unit_weight, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_std1_unit_weight.diminfo[0].strides = __pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_std1_unit_weight.diminfo[0].shape = __pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4598, __pyx_L1_error) } __pyx_t_54 = 0; __pyx_v_col_coef_std1_unit_weight = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4599 * col_coef_mean1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_min1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_sum2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4599, __pyx_L1_error) __pyx_t_55 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_t_55, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_max1_unit_weight, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_max1_unit_weight.diminfo[0].strides = __pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_max1_unit_weight.diminfo[0].shape = __pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4599, __pyx_L1_error) } __pyx_t_55 = 0; __pyx_v_col_coef_max1_unit_weight = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4600 * col_coef_std1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_sum2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4600, __pyx_L1_error) __pyx_t_56 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_t_56, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_min1_unit_weight, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_min1_unit_weight.diminfo[0].strides = __pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_min1_unit_weight.diminfo[0].shape = __pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4600, __pyx_L1_error) } __pyx_t_56 = 0; __pyx_v_col_coef_min1_unit_weight = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4601 * col_coef_max1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_sum2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_mean2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4601, __pyx_L1_error) __pyx_t_57 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_57, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_sum2_inverse_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_sum2_inverse_sum.diminfo[0].strides = __pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_sum2_inverse_sum.diminfo[0].shape = __pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4601, __pyx_L1_error) } __pyx_t_57 = 0; __pyx_v_col_coef_sum2_inverse_sum = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4602 * col_coef_min1_unit_weight = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_sum2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_std2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4602, __pyx_L1_error) __pyx_t_58 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_58, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_mean2_inverse_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_mean2_inverse_sum.diminfo[0].strides = __pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_mean2_inverse_sum.diminfo[0].shape = __pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4602, __pyx_L1_error) } __pyx_t_58 = 0; __pyx_v_col_coef_mean2_inverse_sum = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4603 * col_coef_sum2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_max2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4603, __pyx_L1_error) __pyx_t_59 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_59, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_std2_inverse_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_std2_inverse_sum.diminfo[0].strides = __pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_std2_inverse_sum.diminfo[0].shape = __pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4603, __pyx_L1_error) } __pyx_t_59 = 0; __pyx_v_col_coef_std2_inverse_sum = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4604 * col_coef_mean2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_min2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_sum3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4604, __pyx_L1_error) __pyx_t_60 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_60, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_max2_inverse_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_max2_inverse_sum.diminfo[0].strides = __pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_max2_inverse_sum.diminfo[0].shape = __pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4604, __pyx_L1_error) } __pyx_t_60 = 0; __pyx_v_col_coef_max2_inverse_sum = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4605 * col_coef_std2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_sum3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4605, __pyx_L1_error) __pyx_t_61 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_61, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_min2_inverse_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_min2_inverse_sum.diminfo[0].strides = __pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_min2_inverse_sum.diminfo[0].shape = __pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4605, __pyx_L1_error) } __pyx_t_61 = 0; __pyx_v_col_coef_min2_inverse_sum = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4606 * col_coef_max2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_sum3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_mean3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4606, __pyx_L1_error) __pyx_t_62 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_t_62, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_sum3_dual_cost, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_sum3_dual_cost.diminfo[0].strides = __pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_sum3_dual_cost.diminfo[0].shape = __pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4606, __pyx_L1_error) } __pyx_t_62 = 0; __pyx_v_col_coef_sum3_dual_cost = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4607 * col_coef_min2_inverse_sum = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_sum3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_std3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4607, __pyx_L1_error) __pyx_t_63 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_t_63, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_mean3_dual_cost, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_mean3_dual_cost.diminfo[0].strides = __pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_mean3_dual_cost.diminfo[0].shape = __pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4607, __pyx_L1_error) } __pyx_t_63 = 0; __pyx_v_col_coef_mean3_dual_cost = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4608 * col_coef_sum3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_mean3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_max3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4608, __pyx_L1_error) __pyx_t_64 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_t_64, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_std3_dual_cost, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_std3_dual_cost.diminfo[0].strides = __pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_std3_dual_cost.diminfo[0].shape = __pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4608, __pyx_L1_error) } __pyx_t_64 = 0; __pyx_v_col_coef_std3_dual_cost = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4609 * col_coef_mean3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_std3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * col_coef_min3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4609, __pyx_L1_error) __pyx_t_65 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_t_65, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_max3_dual_cost, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_col_coef_max3_dual_cost.diminfo[0].strides = __pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_max3_dual_cost.diminfo[0].shape = __pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4609, __pyx_L1_error) } __pyx_t_65 = 0; __pyx_v_col_coef_max3_dual_cost = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4610 * col_coef_std3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_max3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) * col_coef_min3_dual_cost = np.empty(shape=(ncols, ), dtype=np.float32) # <<<<<<<<<<<<<< * * # COLUMNS */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4610, __pyx_L1_error) __pyx_t_66 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_t_66, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_coef_min3_dual_cost, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_col_coef_min3_dual_cost.diminfo[0].strides = __pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_coef_min3_dual_cost.diminfo[0].shape = __pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4610, __pyx_L1_error) } __pyx_t_66 = 0; __pyx_v_col_coef_min3_dual_cost = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4613 * * # COLUMNS * cdef SCIP_COL** cols = SCIPgetLPCols(scip) # <<<<<<<<<<<<<< * * cdef SCIP_ROW** neighbors */ __pyx_v_cols = SCIPgetLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":4627 * cdef float ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max * * for i in range(ncols): # <<<<<<<<<<<<<< * col = cols[i] * col_i = SCIPcolGetIndex(col) */ __pyx_t_7 = __pyx_v_ncols; __pyx_t_67 = __pyx_t_7; for (__pyx_t_68 = 0; __pyx_t_68 < __pyx_t_67; __pyx_t_68+=1) { __pyx_v_i = __pyx_t_68; /* "pyscipopt/scip.pyx":4628 * * for i in range(ncols): * col = cols[i] # <<<<<<<<<<<<<< * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) */ __pyx_v_col = (__pyx_v_cols[__pyx_v_i]); /* "pyscipopt/scip.pyx":4629 * for i in range(ncols): * col = cols[i] * col_i = SCIPcolGetIndex(col) # <<<<<<<<<<<<<< * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) */ __pyx_v_col_i = SCIPcolGetIndex(__pyx_v_col); /* "pyscipopt/scip.pyx":4630 * col = cols[i] * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) # <<<<<<<<<<<<<< * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) */ __pyx_v_neighbors = SCIPcolGetRows(__pyx_v_col); /* "pyscipopt/scip.pyx":4631 * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * nonzero_coefs_raw = SCIPcolGetVals(col) * var = SCIPcolGetVar(cols[i]) */ __pyx_v_nb_neighbors = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":4632 * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) # <<<<<<<<<<<<<< * var = SCIPcolGetVar(cols[i]) * */ __pyx_v_nonzero_coefs_raw = SCIPcolGetVals(__pyx_v_col); /* "pyscipopt/scip.pyx":4633 * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) * var = SCIPcolGetVar(cols[i]) # <<<<<<<<<<<<<< * * ##### basic features ##### */ __pyx_v_var = SCIPcolGetVar((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4638 * * # Variable type * col_type_binary[col_i] = SCIPvarIsBinary(var) # <<<<<<<<<<<<<< * col_type_int[col_i] = SCIPvarIsIntegral(var) * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_type_binary.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_type_binary.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4638, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_type_binary.diminfo[0].strides) = SCIPvarIsBinary(__pyx_v_var); /* "pyscipopt/scip.pyx":4639 * # Variable type * col_type_binary[col_i] = SCIPvarIsBinary(var) * col_type_int[col_i] = SCIPvarIsIntegral(var) # <<<<<<<<<<<<<< * * # Objective coefficient */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_type_int.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_type_int.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4639, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_type_int.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_type_int.diminfo[0].strides) = SCIPvarIsIntegral(__pyx_v_var); /* "pyscipopt/scip.pyx":4642 * * # Objective coefficient * col_coefs[col_i] = SCIPcolGetObj(cols[i]) # <<<<<<<<<<<<<< * col_coefs_pos[col_i] = max(col_coefs[col_i], 0) * col_coefs_neg[col_i] = min(col_coefs[col_i], 0) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coefs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coefs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4642, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coefs.diminfo[0].strides) = SCIPcolGetObj((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4643 * # Objective coefficient * col_coefs[col_i] = SCIPcolGetObj(cols[i]) * col_coefs_pos[col_i] = max(col_coefs[col_i], 0) # <<<<<<<<<<<<<< * col_coefs_neg[col_i] = min(col_coefs[col_i], 0) * */ __pyx_t_71 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coefs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coefs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4643, __pyx_L1_error) } __pyx_t_72 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coefs.diminfo[0].strides)); if (((__pyx_t_71 > __pyx_t_72) != 0)) { __pyx_t_73 = __pyx_t_71; } else { __pyx_t_73 = __pyx_t_72; } __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coefs_pos.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coefs_pos.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4643, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coefs_pos.diminfo[0].strides) = __pyx_t_73; /* "pyscipopt/scip.pyx":4644 * col_coefs[col_i] = SCIPcolGetObj(cols[i]) * col_coefs_pos[col_i] = max(col_coefs[col_i], 0) * col_coefs_neg[col_i] = min(col_coefs[col_i], 0) # <<<<<<<<<<<<<< * * # nonzeros for col in constraints */ __pyx_t_71 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coefs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coefs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4644, __pyx_L1_error) } __pyx_t_73 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coefs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coefs.diminfo[0].strides)); if (((__pyx_t_71 < __pyx_t_73) != 0)) { __pyx_t_72 = __pyx_t_71; } else { __pyx_t_72 = __pyx_t_73; } __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coefs_neg.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coefs_neg.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4644, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coefs_neg.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4647 * * # nonzeros for col in constraints * col_nnzrs[col_i] = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * * # locks */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_nnzrs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4647, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_nnzrs.diminfo[0].strides) = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":4650 * * # locks * col_nup_locks[col_i] = SCIPvarGetNLocksUp(var) # <<<<<<<<<<<<<< * col_ndown_locks[col_i] = SCIPvarGetNLocksDown(var) * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_nup_locks.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_nup_locks.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4650, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_nup_locks.diminfo[0].strides) = SCIPvarGetNLocksUp(__pyx_v_var); /* "pyscipopt/scip.pyx":4651 * # locks * col_nup_locks[col_i] = SCIPvarGetNLocksUp(var) * col_ndown_locks[col_i] = SCIPvarGetNLocksDown(var) # <<<<<<<<<<<<<< * * ##### lp features ##### */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ndown_locks.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ndown_locks.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4651, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ndown_locks.diminfo[0].strides) = SCIPvarGetNLocksDown(__pyx_v_var); /* "pyscipopt/scip.pyx":4654 * * ##### lp features ##### * solval = SCIPcolGetPrimsol(cols[i]) # <<<<<<<<<<<<<< * col_solvals[col_i] = solval * col_sol_frac_up[col_i] = math.ceil(solval) - solval */ __pyx_t_2 = PyFloat_FromDouble(SCIPcolGetPrimsol((__pyx_v_cols[__pyx_v_i]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_solval, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4655 * ##### lp features ##### * solval = SCIPcolGetPrimsol(cols[i]) * col_solvals[col_i] = solval # <<<<<<<<<<<<<< * col_sol_frac_up[col_i] = math.ceil(solval) - solval * col_sol_frac_down[col_i] = solval - math.floor(solval) */ __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_v_solval); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4655, __pyx_L1_error) __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_solvals.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_solvals.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4655, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_solvals.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_solvals.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4656 * solval = SCIPcolGetPrimsol(cols[i]) * col_solvals[col_i] = solval * col_sol_frac_up[col_i] = math.ceil(solval) - solval # <<<<<<<<<<<<<< * col_sol_frac_down[col_i] = solval - math.floor(solval) * col_sol_isfrac[col_i] = SCIPfeasFrac(scip, solval) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ceil); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_solval) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_solval); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_v_solval); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4656, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_sol_frac_up.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_sol_frac_up.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4656, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_sol_frac_up.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4657 * col_solvals[col_i] = solval * col_sol_frac_up[col_i] = math.ceil(solval) - solval * col_sol_frac_down[col_i] = solval - math.floor(solval) # <<<<<<<<<<<<<< * col_sol_isfrac[col_i] = SCIPfeasFrac(scip, solval) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_solval) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_solval); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_v_solval, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_sol_frac_down.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_sol_frac_down.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4657, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_sol_frac_down.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4658 * col_sol_frac_up[col_i] = math.ceil(solval) - solval * col_sol_frac_down[col_i] = solval - math.floor(solval) * col_sol_isfrac[col_i] = SCIPfeasFrac(scip, solval) # <<<<<<<<<<<<<< * * # Global bounds */ __pyx_t_74 = __pyx_PyFloat_AsDouble(__pyx_v_solval); if (unlikely((__pyx_t_74 == ((SCIP_Real)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4658, __pyx_L1_error) __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_sol_isfrac.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_sol_isfrac.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4658, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_sol_isfrac.diminfo[0].strides) = SCIPfeasFrac(__pyx_v_scip, __pyx_t_74); /* "pyscipopt/scip.pyx":4661 * * # Global bounds * col_lbs[col_i] = SCIPcolGetLb(cols[i]) # <<<<<<<<<<<<<< * col_ubs[col_i] = SCIPcolGetUb(cols[i]) * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_lbs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_lbs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4661, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_lbs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_lbs.diminfo[0].strides) = SCIPcolGetLb((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4662 * # Global bounds * col_lbs[col_i] = SCIPcolGetLb(cols[i]) * col_ubs[col_i] = SCIPcolGetUb(cols[i]) # <<<<<<<<<<<<<< * * # reduced cost */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ubs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ubs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4662, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ubs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ubs.diminfo[0].strides) = SCIPcolGetUb((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4665 * * # reduced cost * col_red_costs[col_i] = SCIPgetColRedcost(scip, cols[i]) # <<<<<<<<<<<<<< * * # Stats. for constraint degrees (4) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_red_costs.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_red_costs.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4665, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_red_costs.diminfo[0].strides) = SCIPgetColRedcost(__pyx_v_scip, (__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4671 * # participate in multiple constraints, and statistics over those constraints degrees are used. * # The constraint degree is computed on the root LP (mean, stdev., min, max) * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 # <<<<<<<<<<<<<< * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): */ __pyx_t_75 = 0.0; __pyx_t_76 = 0.0; __pyx_t_70 = 0; __pyx_t_77 = 0; __pyx_v_cdeg_var = __pyx_t_75; __pyx_v_cdeg_mean = __pyx_t_76; __pyx_v_cdeg_min = __pyx_t_70; __pyx_v_cdeg_max = __pyx_t_77; /* "pyscipopt/scip.pyx":4672 * # The constraint degree is computed on the root LP (mean, stdev., min, max) * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) */ __pyx_t_78 = ((__pyx_v_nb_neighbors > 0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4673 * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg */ __pyx_t_77 = __pyx_v_nb_neighbors; __pyx_t_70 = __pyx_t_77; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_70; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4674 * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) */ __pyx_v_cdeg = SCIProwGetNNonz((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4675 * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg # <<<<<<<<<<<<<< * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) */ __pyx_v_cdeg_mean = (__pyx_v_cdeg_mean + __pyx_v_cdeg); /* "pyscipopt/scip.pyx":4676 * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) # <<<<<<<<<<<<<< * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors */ if (((__pyx_v_neighbor_index == 0) != 0)) { __pyx_t_80 = __pyx_v_cdeg; } else { __pyx_t_81 = __pyx_v_cdeg; __pyx_t_82 = __pyx_v_cdeg_max; if (((__pyx_t_81 > __pyx_t_82) != 0)) { __pyx_t_83 = __pyx_t_81; } else { __pyx_t_83 = __pyx_t_82; } __pyx_t_80 = __pyx_t_83; } __pyx_v_cdeg_max = __pyx_t_80; /* "pyscipopt/scip.pyx":4677 * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) # <<<<<<<<<<<<<< * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): */ if (((__pyx_v_neighbor_index == 0) != 0)) { __pyx_t_80 = __pyx_v_cdeg; } else { __pyx_t_83 = __pyx_v_cdeg; __pyx_t_81 = __pyx_v_cdeg_min; if (((__pyx_t_83 < __pyx_t_81) != 0)) { __pyx_t_82 = __pyx_t_83; } else { __pyx_t_82 = __pyx_t_81; } __pyx_t_80 = __pyx_t_82; } __pyx_v_cdeg_min = __pyx_t_80; } /* "pyscipopt/scip.pyx":4678 * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg_var += (cdeg - cdeg_mean)**2 */ if (unlikely(__pyx_v_nb_neighbors == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4678, __pyx_L1_error) } __pyx_v_cdeg_mean = (__pyx_v_cdeg_mean / __pyx_v_nb_neighbors); /* "pyscipopt/scip.pyx":4679 * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors */ __pyx_t_77 = __pyx_v_nb_neighbors; __pyx_t_70 = __pyx_t_77; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_70; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4680 * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): * cdeg_var += (cdeg - cdeg_mean)**2 # <<<<<<<<<<<<<< * cdeg_var /= nb_neighbors * */ __pyx_v_cdeg_var = (__pyx_v_cdeg_var + powf((__pyx_v_cdeg - __pyx_v_cdeg_mean), 2.0)); } /* "pyscipopt/scip.pyx":4681 * for neighbor_index in range(nb_neighbors): * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors # <<<<<<<<<<<<<< * * col_cdeg_mean[col_i] = cdeg_mean */ if (unlikely(__pyx_v_nb_neighbors == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4681, __pyx_L1_error) } __pyx_v_cdeg_var = (__pyx_v_cdeg_var / __pyx_v_nb_neighbors); /* "pyscipopt/scip.pyx":4672 * # The constraint degree is computed on the root LP (mean, stdev., min, max) * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) */ } /* "pyscipopt/scip.pyx":4683 * cdeg_var /= nb_neighbors * * col_cdeg_mean[col_i] = cdeg_mean # <<<<<<<<<<<<<< * col_cdeg_std[col_i] = math.sqrt(cdeg_var) * col_cdeg_min[col_i] = cdeg_min */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_cdeg_mean.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_cdeg_mean.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4683, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_cdeg_mean.diminfo[0].strides) = __pyx_v_cdeg_mean; /* "pyscipopt/scip.pyx":4684 * * col_cdeg_mean[col_i] = cdeg_mean * col_cdeg_std[col_i] = math.sqrt(cdeg_var) # <<<<<<<<<<<<<< * col_cdeg_min[col_i] = cdeg_min * col_cdeg_max[col_i] = cdeg_max */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_cdeg_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_cdeg_std.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_cdeg_std.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4684, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_cdeg_std.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4685 * col_cdeg_mean[col_i] = cdeg_mean * col_cdeg_std[col_i] = math.sqrt(cdeg_var) * col_cdeg_min[col_i] = cdeg_min # <<<<<<<<<<<<<< * col_cdeg_max[col_i] = cdeg_max * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_cdeg_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_cdeg_min.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4685, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_cdeg_min.diminfo[0].strides) = __pyx_v_cdeg_min; /* "pyscipopt/scip.pyx":4686 * col_cdeg_std[col_i] = math.sqrt(cdeg_var) * col_cdeg_min[col_i] = cdeg_min * col_cdeg_max[col_i] = cdeg_max # <<<<<<<<<<<<<< * * # Min/max for ratios of constraint coeffs. to RHS/LHS (8) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_cdeg_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_cdeg_max.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4686, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_cdeg_max.diminfo[0].strides) = __pyx_v_cdeg_max; /* "pyscipopt/scip.pyx":4689 * * # Min/max for ratios of constraint coeffs. to RHS/LHS (8) * prhs_ratio_max, prhs_ratio_min = -1, 1 # <<<<<<<<<<<<<< * nrhs_ratio_max, nrhs_ratio_min = -1, 1 * plhs_ratio_max, plhs_ratio_min = -1, 1 */ __pyx_t_3 = __pyx_int_neg_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_int_1; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_prhs_ratio_max, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_prhs_ratio_min, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4690 * # Min/max for ratios of constraint coeffs. to RHS/LHS (8) * prhs_ratio_max, prhs_ratio_min = -1, 1 * nrhs_ratio_max, nrhs_ratio_min = -1, 1 # <<<<<<<<<<<<<< * plhs_ratio_max, plhs_ratio_min = -1, 1 * nlhs_ratio_max, nlhs_ratio_min = -1, 1 */ __pyx_t_2 = __pyx_int_neg_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_int_1; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_nrhs_ratio_max, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_nrhs_ratio_min, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4691 * prhs_ratio_max, prhs_ratio_min = -1, 1 * nrhs_ratio_max, nrhs_ratio_min = -1, 1 * plhs_ratio_max, plhs_ratio_min = -1, 1 # <<<<<<<<<<<<<< * nlhs_ratio_max, nlhs_ratio_min = -1, 1 * for neighbor_index in range(nb_neighbors): */ __pyx_t_71 = -1L; __pyx_t_84 = 1; __pyx_v_plhs_ratio_max = __pyx_t_71; __pyx_v_plhs_ratio_min = __pyx_t_84; /* "pyscipopt/scip.pyx":4692 * nrhs_ratio_max, nrhs_ratio_min = -1, 1 * plhs_ratio_max, plhs_ratio_min = -1, 1 * nlhs_ratio_max, nlhs_ratio_min = -1, 1 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] */ __pyx_t_84 = -1L; __pyx_t_71 = 1; __pyx_v_nlhs_ratio_max = __pyx_t_84; __pyx_v_nlhs_ratio_min = __pyx_t_71; /* "pyscipopt/scip.pyx":4693 * plhs_ratio_max, plhs_ratio_min = -1, 1 * nlhs_ratio_max, nlhs_ratio_min = -1, 1 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * rhs = SCIProwGetRhs(neighbors[neighbor_index]) */ __pyx_t_77 = __pyx_v_nb_neighbors; __pyx_t_70 = __pyx_t_77; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_70; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4694 * nlhs_ratio_max, nlhs_ratio_min = -1, 1 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":4695 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * rhs = SCIProwGetRhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): */ __pyx_v_rhs = SCIProwGetRhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4696 * coef = nonzero_coefs_raw[neighbor_index] * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) */ __pyx_v_lhs = SCIProwGetLhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4697 * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: */ __pyx_t_78 = ((!(SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_rhs)) != 0)) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4698 * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) # <<<<<<<<<<<<<< * if rhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) */ if (((__pyx_v_coef == 0.0) != 0)) { __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; } else { __pyx_t_74 = (REALABS(__pyx_v_coef) + REALABS(__pyx_v_rhs)); if (unlikely(__pyx_t_74 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4698, __pyx_L1_error) } __pyx_t_2 = PyFloat_FromDouble((__pyx_v_coef / __pyx_t_74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4699 * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: # <<<<<<<<<<<<<< * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) */ __pyx_t_78 = ((__pyx_v_rhs >= 0.0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4700 * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) # <<<<<<<<<<<<<< * prhs_ratio_min = min(prhs_ratio_min, value) * else: */ __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_prhs_ratio_max); __pyx_t_2 = __pyx_v_prhs_ratio_max; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4700, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_prhs_ratio_max, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4701 * if rhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) # <<<<<<<<<<<<<< * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) */ __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_prhs_ratio_min); __pyx_t_4 = __pyx_v_prhs_ratio_min; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4701, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_prhs_ratio_min, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4699 * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: # <<<<<<<<<<<<<< * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) */ goto __pyx_L13; } /* "pyscipopt/scip.pyx":4703 * prhs_ratio_min = min(prhs_ratio_min, value) * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) # <<<<<<<<<<<<<< * nrhs_ratio_min = min(nrhs_ratio_min, value) * */ /*else*/ { __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_nrhs_ratio_max); __pyx_t_2 = __pyx_v_nrhs_ratio_max; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4703, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_nrhs_ratio_max, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4704 * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) # <<<<<<<<<<<<<< * * if not SCIPisInfinity(scip, REALABS(lhs)): */ __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_nrhs_ratio_min); __pyx_t_4 = __pyx_v_nrhs_ratio_min; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4704, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_nrhs_ratio_min, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L13:; /* "pyscipopt/scip.pyx":4697 * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: */ } /* "pyscipopt/scip.pyx":4706 * nrhs_ratio_min = min(nrhs_ratio_min, value) * * if not SCIPisInfinity(scip, REALABS(lhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if lhs >= 0: */ __pyx_t_78 = ((!(SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_lhs)) != 0)) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4707 * * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) # <<<<<<<<<<<<<< * if lhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) */ if (((__pyx_v_coef == 0.0) != 0)) { __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; } else { __pyx_t_74 = (REALABS(__pyx_v_coef) + REALABS(__pyx_v_lhs)); if (unlikely(__pyx_t_74 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4707, __pyx_L1_error) } __pyx_t_2 = PyFloat_FromDouble((__pyx_v_coef / __pyx_t_74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4708 * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if lhs >= 0: # <<<<<<<<<<<<<< * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) */ __pyx_t_78 = ((__pyx_v_lhs >= 0.0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4709 * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if lhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) # <<<<<<<<<<<<<< * prhs_ratio_min = min(prhs_ratio_min, value) * else: */ __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_prhs_ratio_max); __pyx_t_2 = __pyx_v_prhs_ratio_max; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4709, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_prhs_ratio_max, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4710 * if lhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) # <<<<<<<<<<<<<< * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) */ __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_prhs_ratio_min); __pyx_t_4 = __pyx_v_prhs_ratio_min; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4710, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_prhs_ratio_min, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4708 * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if lhs >= 0: # <<<<<<<<<<<<<< * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) */ goto __pyx_L15; } /* "pyscipopt/scip.pyx":4712 * prhs_ratio_min = min(prhs_ratio_min, value) * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) # <<<<<<<<<<<<<< * nrhs_ratio_min = min(nrhs_ratio_min, value) * col_prhs_ratio_max[col_i] = prhs_ratio_max */ /*else*/ { __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_nrhs_ratio_max); __pyx_t_2 = __pyx_v_nrhs_ratio_max; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4712, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_nrhs_ratio_max, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4713 * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) # <<<<<<<<<<<<<< * col_prhs_ratio_max[col_i] = prhs_ratio_max * col_prhs_ratio_min[col_i] = prhs_ratio_min */ __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_v_nrhs_ratio_min); __pyx_t_4 = __pyx_v_nrhs_ratio_min; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4713, __pyx_L1_error) __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_nrhs_ratio_min, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L15:; /* "pyscipopt/scip.pyx":4706 * nrhs_ratio_min = min(nrhs_ratio_min, value) * * if not SCIPisInfinity(scip, REALABS(lhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if lhs >= 0: */ } } /* "pyscipopt/scip.pyx":4714 * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) * col_prhs_ratio_max[col_i] = prhs_ratio_max # <<<<<<<<<<<<<< * col_prhs_ratio_min[col_i] = prhs_ratio_min * col_nrhs_ratio_max[col_i] = nrhs_ratio_max */ __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_v_prhs_ratio_max); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4714, __pyx_L1_error) __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_prhs_ratio_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_prhs_ratio_max.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4714, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_prhs_ratio_max.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4715 * nrhs_ratio_min = min(nrhs_ratio_min, value) * col_prhs_ratio_max[col_i] = prhs_ratio_max * col_prhs_ratio_min[col_i] = prhs_ratio_min # <<<<<<<<<<<<<< * col_nrhs_ratio_max[col_i] = nrhs_ratio_max * col_nrhs_ratio_min[col_i] = nrhs_ratio_min */ __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_v_prhs_ratio_min); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4715, __pyx_L1_error) __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_prhs_ratio_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_prhs_ratio_min.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4715, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_prhs_ratio_min.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4716 * col_prhs_ratio_max[col_i] = prhs_ratio_max * col_prhs_ratio_min[col_i] = prhs_ratio_min * col_nrhs_ratio_max[col_i] = nrhs_ratio_max # <<<<<<<<<<<<<< * col_nrhs_ratio_min[col_i] = nrhs_ratio_min * */ __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_v_nrhs_ratio_max); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4716, __pyx_L1_error) __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_nrhs_ratio_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_nrhs_ratio_max.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4716, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_nrhs_ratio_max.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4717 * col_prhs_ratio_min[col_i] = prhs_ratio_min * col_nrhs_ratio_max[col_i] = nrhs_ratio_max * col_nrhs_ratio_min[col_i] = nrhs_ratio_min # <<<<<<<<<<<<<< * * col_plhs_ratio_max[col_i] = plhs_ratio_max */ __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_v_nrhs_ratio_min); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4717, __pyx_L1_error) __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_nrhs_ratio_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_nrhs_ratio_min.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4717, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_nrhs_ratio_min.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4719 * col_nrhs_ratio_min[col_i] = nrhs_ratio_min * * col_plhs_ratio_max[col_i] = plhs_ratio_max # <<<<<<<<<<<<<< * col_plhs_ratio_min[col_i] = plhs_ratio_min * col_nlhs_ratio_max[col_i] = nlhs_ratio_max */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_plhs_ratio_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_plhs_ratio_max.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4719, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_plhs_ratio_max.diminfo[0].strides) = __pyx_v_plhs_ratio_max; /* "pyscipopt/scip.pyx":4720 * * col_plhs_ratio_max[col_i] = plhs_ratio_max * col_plhs_ratio_min[col_i] = plhs_ratio_min # <<<<<<<<<<<<<< * col_nlhs_ratio_max[col_i] = nlhs_ratio_max * col_nlhs_ratio_min[col_i] = nlhs_ratio_min */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_plhs_ratio_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_plhs_ratio_min.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4720, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_plhs_ratio_min.diminfo[0].strides) = __pyx_v_plhs_ratio_min; /* "pyscipopt/scip.pyx":4721 * col_plhs_ratio_max[col_i] = plhs_ratio_max * col_plhs_ratio_min[col_i] = plhs_ratio_min * col_nlhs_ratio_max[col_i] = nlhs_ratio_max # <<<<<<<<<<<<<< * col_nlhs_ratio_min[col_i] = nlhs_ratio_min * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_nlhs_ratio_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_nlhs_ratio_max.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4721, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_nlhs_ratio_max.diminfo[0].strides) = __pyx_v_nlhs_ratio_max; /* "pyscipopt/scip.pyx":4722 * col_plhs_ratio_min[col_i] = plhs_ratio_min * col_nlhs_ratio_max[col_i] = nlhs_ratio_max * col_nlhs_ratio_min[col_i] = nlhs_ratio_min # <<<<<<<<<<<<<< * * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_77 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_nlhs_ratio_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_77 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_nlhs_ratio_min.diminfo[0].shape)) __pyx_t_77 = 0; if (unlikely(__pyx_t_77 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_77); __PYX_ERR(3, 4722, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_nlhs_ratio_min.diminfo[0].strides) = __pyx_v_nlhs_ratio_min; /* "pyscipopt/scip.pyx":4728 * # A variables positive (negative) coefficients in the constraints it participates in * # (count, mean, stdev., min, max) * pcoefs_var, pcoefs_mean, pcoefs_min, pcoefs_max = 0, 0, 0, 0. # <<<<<<<<<<<<<< * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. * pcoefs_count, ncoefs_count = 0, 0 */ __pyx_t_76 = 0.0; __pyx_t_75 = 0.0; __pyx_t_85 = 0.0; __pyx_t_86 = 0.; __pyx_v_pcoefs_var = __pyx_t_76; __pyx_v_pcoefs_mean = __pyx_t_75; __pyx_v_pcoefs_min = __pyx_t_85; __pyx_v_pcoefs_max = __pyx_t_86; /* "pyscipopt/scip.pyx":4729 * # (count, mean, stdev., min, max) * pcoefs_var, pcoefs_mean, pcoefs_min, pcoefs_max = 0, 0, 0, 0. * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. # <<<<<<<<<<<<<< * pcoefs_count, ncoefs_count = 0, 0 * for neighbor_index in range(nb_neighbors): */ __pyx_t_85 = 0.0; __pyx_t_75 = 0.0; __pyx_t_76 = 0.0; __pyx_t_86 = 0.; __pyx_v_ncoefs_var = __pyx_t_85; __pyx_v_ncoefs_mean = __pyx_t_75; __pyx_v_ncoefs_min = __pyx_t_76; __pyx_v_ncoefs_max = __pyx_t_86; /* "pyscipopt/scip.pyx":4730 * pcoefs_var, pcoefs_mean, pcoefs_min, pcoefs_max = 0, 0, 0, 0. * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. * pcoefs_count, ncoefs_count = 0, 0 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] */ __pyx_t_77 = 0; __pyx_t_70 = 0; __pyx_v_pcoefs_count = __pyx_t_77; __pyx_v_ncoefs_count = __pyx_t_70; /* "pyscipopt/scip.pyx":4731 * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. * pcoefs_count, ncoefs_count = 0, 0 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: */ __pyx_t_70 = __pyx_v_nb_neighbors; __pyx_t_77 = __pyx_t_70; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_77; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4732 * pcoefs_count, ncoefs_count = 0, 0 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * if coef > 0: * pcoefs_count += 1 */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":4733 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_count += 1 * pcoefs_mean = coef */ __pyx_t_78 = ((__pyx_v_coef > 0.0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4734 * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: * pcoefs_count += 1 # <<<<<<<<<<<<<< * pcoefs_mean = coef * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) */ __pyx_v_pcoefs_count = (__pyx_v_pcoefs_count + 1); /* "pyscipopt/scip.pyx":4735 * if coef > 0: * pcoefs_count += 1 * pcoefs_mean = coef # <<<<<<<<<<<<<< * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) */ __pyx_v_pcoefs_mean = __pyx_v_coef; /* "pyscipopt/scip.pyx":4736 * pcoefs_count += 1 * pcoefs_mean = coef * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) # <<<<<<<<<<<<<< * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: */ if (((__pyx_v_pcoefs_count == 1) != 0)) { __pyx_t_74 = __pyx_v_coef; } else { __pyx_t_87 = __pyx_v_coef; __pyx_t_76 = __pyx_v_pcoefs_min; if (((__pyx_t_87 < __pyx_t_76) != 0)) { __pyx_t_88 = __pyx_t_87; } else { __pyx_t_88 = __pyx_t_76; } __pyx_t_74 = __pyx_t_88; } __pyx_v_pcoefs_min = __pyx_t_74; /* "pyscipopt/scip.pyx":4737 * pcoefs_mean = coef * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) # <<<<<<<<<<<<<< * if coef < 0: * ncoefs_count += 1 */ if (((__pyx_v_pcoefs_count == 1) != 0)) { __pyx_t_74 = __pyx_v_coef; } else { __pyx_t_88 = __pyx_v_coef; __pyx_t_76 = __pyx_v_pcoefs_max; if (((__pyx_t_88 > __pyx_t_76) != 0)) { __pyx_t_87 = __pyx_t_88; } else { __pyx_t_87 = __pyx_t_76; } __pyx_t_74 = __pyx_t_87; } __pyx_v_pcoefs_max = __pyx_t_74; /* "pyscipopt/scip.pyx":4733 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_count += 1 * pcoefs_mean = coef */ } /* "pyscipopt/scip.pyx":4738 * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_count += 1 * ncoefs_mean += coef */ __pyx_t_78 = ((__pyx_v_coef < 0.0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4739 * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: * ncoefs_count += 1 # <<<<<<<<<<<<<< * ncoefs_mean += coef * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) */ __pyx_v_ncoefs_count = (__pyx_v_ncoefs_count + 1); /* "pyscipopt/scip.pyx":4740 * if coef < 0: * ncoefs_count += 1 * ncoefs_mean += coef # <<<<<<<<<<<<<< * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) */ __pyx_v_ncoefs_mean = (__pyx_v_ncoefs_mean + __pyx_v_coef); /* "pyscipopt/scip.pyx":4741 * ncoefs_count += 1 * ncoefs_mean += coef * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) # <<<<<<<<<<<<<< * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: */ if (((__pyx_v_ncoefs_count == 1) != 0)) { __pyx_t_74 = __pyx_v_coef; } else { __pyx_t_87 = __pyx_v_coef; __pyx_t_76 = __pyx_v_ncoefs_min; if (((__pyx_t_87 < __pyx_t_76) != 0)) { __pyx_t_88 = __pyx_t_87; } else { __pyx_t_88 = __pyx_t_76; } __pyx_t_74 = __pyx_t_88; } __pyx_v_ncoefs_min = __pyx_t_74; /* "pyscipopt/scip.pyx":4742 * ncoefs_mean += coef * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) # <<<<<<<<<<<<<< * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count */ if (((__pyx_v_ncoefs_count == 1) != 0)) { __pyx_t_74 = __pyx_v_coef; } else { __pyx_t_88 = __pyx_v_coef; __pyx_t_76 = __pyx_v_ncoefs_max; if (((__pyx_t_88 > __pyx_t_76) != 0)) { __pyx_t_87 = __pyx_t_88; } else { __pyx_t_87 = __pyx_t_76; } __pyx_t_74 = __pyx_t_87; } __pyx_v_ncoefs_max = __pyx_t_74; /* "pyscipopt/scip.pyx":4738 * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_count += 1 * ncoefs_mean += coef */ } } /* "pyscipopt/scip.pyx":4743 * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: */ __pyx_t_78 = ((__pyx_v_pcoefs_count > 0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4744 * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count # <<<<<<<<<<<<<< * if ncoefs_count > 0: * ncoefs_mean /= ncoefs_count */ if (unlikely(__pyx_v_pcoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4744, __pyx_L1_error) } __pyx_v_pcoefs_mean = (__pyx_v_pcoefs_mean / __pyx_v_pcoefs_count); /* "pyscipopt/scip.pyx":4743 * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: */ } /* "pyscipopt/scip.pyx":4745 * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): */ __pyx_t_78 = ((__pyx_v_ncoefs_count > 0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4746 * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: * ncoefs_mean /= ncoefs_count # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] */ if (unlikely(__pyx_v_ncoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4746, __pyx_L1_error) } __pyx_v_ncoefs_mean = (__pyx_v_ncoefs_mean / __pyx_v_ncoefs_count); /* "pyscipopt/scip.pyx":4745 * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): */ } /* "pyscipopt/scip.pyx":4747 * if ncoefs_count > 0: * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: */ __pyx_t_70 = __pyx_v_nb_neighbors; __pyx_t_77 = __pyx_t_70; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_77; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4748 * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":4749 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: */ __pyx_t_78 = ((__pyx_v_coef > 0.0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4750 * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 # <<<<<<<<<<<<<< * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 */ __pyx_v_pcoefs_var = (__pyx_v_pcoefs_var + pow((__pyx_v_coef - __pyx_v_pcoefs_mean), 2.0)); /* "pyscipopt/scip.pyx":4749 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: */ } /* "pyscipopt/scip.pyx":4751 * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: */ __pyx_t_78 = ((__pyx_v_coef < 0.0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4752 * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 # <<<<<<<<<<<<<< * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count */ __pyx_v_ncoefs_var = (__pyx_v_ncoefs_var + pow((__pyx_v_coef - __pyx_v_ncoefs_mean), 2.0)); /* "pyscipopt/scip.pyx":4751 * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: */ } } /* "pyscipopt/scip.pyx":4753 * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: */ __pyx_t_78 = ((__pyx_v_pcoefs_count > 0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4754 * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count # <<<<<<<<<<<<<< * if ncoefs_count > 0: * ncoefs_var /= ncoefs_count */ if (unlikely(__pyx_v_pcoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4754, __pyx_L1_error) } __pyx_v_pcoefs_var = (__pyx_v_pcoefs_var / __pyx_v_pcoefs_count); /* "pyscipopt/scip.pyx":4753 * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: */ } /* "pyscipopt/scip.pyx":4755 * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_var /= ncoefs_count * col_pcoefs_sum[col_i] = pcoefs_count */ __pyx_t_78 = ((__pyx_v_ncoefs_count > 0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4756 * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: * ncoefs_var /= ncoefs_count # <<<<<<<<<<<<<< * col_pcoefs_sum[col_i] = pcoefs_count * col_pcoefs_mean[col_i] = pcoefs_mean */ if (unlikely(__pyx_v_ncoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4756, __pyx_L1_error) } __pyx_v_ncoefs_var = (__pyx_v_ncoefs_var / __pyx_v_ncoefs_count); /* "pyscipopt/scip.pyx":4755 * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_var /= ncoefs_count * col_pcoefs_sum[col_i] = pcoefs_count */ } /* "pyscipopt/scip.pyx":4757 * if ncoefs_count > 0: * ncoefs_var /= ncoefs_count * col_pcoefs_sum[col_i] = pcoefs_count # <<<<<<<<<<<<<< * col_pcoefs_mean[col_i] = pcoefs_mean * col_pcoefs_std[col_i] = math.sqrt(pcoefs_var) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_pcoefs_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_pcoefs_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4757, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_pcoefs_sum.diminfo[0].strides) = __pyx_v_pcoefs_count; /* "pyscipopt/scip.pyx":4758 * ncoefs_var /= ncoefs_count * col_pcoefs_sum[col_i] = pcoefs_count * col_pcoefs_mean[col_i] = pcoefs_mean # <<<<<<<<<<<<<< * col_pcoefs_std[col_i] = math.sqrt(pcoefs_var) * col_pcoefs_min[col_i] = pcoefs_min */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_pcoefs_mean.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_pcoefs_mean.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4758, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_pcoefs_mean.diminfo[0].strides) = __pyx_v_pcoefs_mean; /* "pyscipopt/scip.pyx":4759 * col_pcoefs_sum[col_i] = pcoefs_count * col_pcoefs_mean[col_i] = pcoefs_mean * col_pcoefs_std[col_i] = math.sqrt(pcoefs_var) # <<<<<<<<<<<<<< * col_pcoefs_min[col_i] = pcoefs_min * col_pcoefs_max[col_i] = pcoefs_max */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_pcoefs_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_pcoefs_std.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_pcoefs_std.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4759, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_pcoefs_std.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4760 * col_pcoefs_mean[col_i] = pcoefs_mean * col_pcoefs_std[col_i] = math.sqrt(pcoefs_var) * col_pcoefs_min[col_i] = pcoefs_min # <<<<<<<<<<<<<< * col_pcoefs_max[col_i] = pcoefs_max * col_ncoefs_sum[col_i] = ncoefs_count */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_pcoefs_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_pcoefs_min.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4760, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_pcoefs_min.diminfo[0].strides) = __pyx_v_pcoefs_min; /* "pyscipopt/scip.pyx":4761 * col_pcoefs_std[col_i] = math.sqrt(pcoefs_var) * col_pcoefs_min[col_i] = pcoefs_min * col_pcoefs_max[col_i] = pcoefs_max # <<<<<<<<<<<<<< * col_ncoefs_sum[col_i] = ncoefs_count * col_ncoefs_mean[col_i] = ncoefs_mean */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_pcoefs_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_pcoefs_max.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4761, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_pcoefs_max.diminfo[0].strides) = __pyx_v_pcoefs_max; /* "pyscipopt/scip.pyx":4762 * col_pcoefs_min[col_i] = pcoefs_min * col_pcoefs_max[col_i] = pcoefs_max * col_ncoefs_sum[col_i] = ncoefs_count # <<<<<<<<<<<<<< * col_ncoefs_mean[col_i] = ncoefs_mean * col_ncoefs_std[col_i] = math.sqrt(ncoefs_var) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ncoefs_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ncoefs_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4762, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ncoefs_sum.diminfo[0].strides) = __pyx_v_ncoefs_count; /* "pyscipopt/scip.pyx":4763 * col_pcoefs_max[col_i] = pcoefs_max * col_ncoefs_sum[col_i] = ncoefs_count * col_ncoefs_mean[col_i] = ncoefs_mean # <<<<<<<<<<<<<< * col_ncoefs_std[col_i] = math.sqrt(ncoefs_var) * col_ncoefs_min[col_i] = ncoefs_min */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ncoefs_mean.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ncoefs_mean.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4763, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ncoefs_mean.diminfo[0].strides) = __pyx_v_ncoefs_mean; /* "pyscipopt/scip.pyx":4764 * col_ncoefs_sum[col_i] = ncoefs_count * col_ncoefs_mean[col_i] = ncoefs_mean * col_ncoefs_std[col_i] = math.sqrt(ncoefs_var) # <<<<<<<<<<<<<< * col_ncoefs_min[col_i] = ncoefs_min * col_ncoefs_max[col_i] = ncoefs_max */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ncoefs_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4764, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ncoefs_std.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ncoefs_std.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4764, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ncoefs_std.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4765 * col_ncoefs_mean[col_i] = ncoefs_mean * col_ncoefs_std[col_i] = math.sqrt(ncoefs_var) * col_ncoefs_min[col_i] = ncoefs_min # <<<<<<<<<<<<<< * col_ncoefs_max[col_i] = ncoefs_max * */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ncoefs_min.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ncoefs_min.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4765, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ncoefs_min.diminfo[0].strides) = __pyx_v_ncoefs_min; /* "pyscipopt/scip.pyx":4766 * col_ncoefs_std[col_i] = math.sqrt(ncoefs_var) * col_ncoefs_min[col_i] = ncoefs_min * col_ncoefs_max[col_i] = ncoefs_max # <<<<<<<<<<<<<< * * neighbors = SCIPcolGetRows(col) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_ncoefs_max.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_ncoefs_max.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4766, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_ncoefs_max.diminfo[0].strides) = __pyx_v_ncoefs_max; /* "pyscipopt/scip.pyx":4768 * col_ncoefs_max[col_i] = ncoefs_max * * neighbors = SCIPcolGetRows(col) # <<<<<<<<<<<<<< * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) */ __pyx_v_neighbors = SCIPcolGetRows(__pyx_v_col); /* "pyscipopt/scip.pyx":4769 * * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * nonzero_coefs_raw = SCIPcolGetVals(col) * */ __pyx_v_nb_neighbors = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":4770 * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) # <<<<<<<<<<<<<< * * # -------------- */ __pyx_v_nonzero_coefs_raw = SCIPcolGetVals(__pyx_v_col); } /* "pyscipopt/scip.pyx":4781 * # number of active constraints that xj is in, with the same 4 weightings * cdef int row_index * cdef int nrows = SCIPgetNLPRows(scip) # <<<<<<<<<<<<<< * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) * cdef float constraint_sum, abs_coef */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4782 * cdef int row_index * cdef int nrows = SCIPgetNLPRows(scip) * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) # <<<<<<<<<<<<<< * cdef float constraint_sum, abs_coef * cdef SCIP_COL** neighbor_columns */ __pyx_v_rows = SCIPgetLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":4792 * cdef np.ndarray[np.float32_t, ndim=1] cons_w1, cons_w2, cons_w3, act_cons_w4 * * cons_w1 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) * cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4792, __pyx_L1_error) __pyx_t_89 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w1.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_w1.rcbuffer->pybuffer, (PyObject*)__pyx_t_89, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_w1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_w1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_w1.diminfo[0].strides = __pyx_pybuffernd_cons_w1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_w1.diminfo[0].shape = __pyx_pybuffernd_cons_w1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4792, __pyx_L1_error) } __pyx_t_89 = 0; __pyx_v_cons_w1 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4793 * * cons_w1 = np.zeros(shape=(nrows, ), dtype=np.float32) * cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4793, __pyx_L1_error) __pyx_t_89 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w2.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_w2.rcbuffer->pybuffer, (PyObject*)__pyx_t_89, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_w2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_w2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_w2.diminfo[0].strides = __pyx_pybuffernd_cons_w2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_w2.diminfo[0].shape = __pyx_pybuffernd_cons_w2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4793, __pyx_L1_error) } __pyx_t_89 = 0; __pyx_v_cons_w2 = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4794 * cons_w1 = np.zeros(shape=(nrows, ), dtype=np.float32) * cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) * cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * * for row_index in range(nrows): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 4794, __pyx_L1_error) __pyx_t_89 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w3.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_w3.rcbuffer->pybuffer, (PyObject*)__pyx_t_89, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_w3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_w3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_cons_w3.diminfo[0].strides = __pyx_pybuffernd_cons_w3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_w3.diminfo[0].shape = __pyx_pybuffernd_cons_w3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 4794, __pyx_L1_error) } __pyx_t_89 = 0; __pyx_v_cons_w3 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4796 * cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) * * for row_index in range(nrows): # <<<<<<<<<<<<<< * row = rows[row_index] * */ __pyx_t_7 = __pyx_v_nrows; __pyx_t_67 = __pyx_t_7; for (__pyx_t_68 = 0; __pyx_t_68 < __pyx_t_67; __pyx_t_68+=1) { __pyx_v_row_index = __pyx_t_68; /* "pyscipopt/scip.pyx":4797 * * for row_index in range(nrows): * row = rows[row_index] # <<<<<<<<<<<<<< * * neighbor_columns = SCIProwGetCols(row) */ __pyx_v_row = (__pyx_v_rows[__pyx_v_row_index]); /* "pyscipopt/scip.pyx":4799 * row = rows[row_index] * * neighbor_columns = SCIProwGetCols(row) # <<<<<<<<<<<<<< * neighbor_ncolumns = SCIProwGetNNonz(row) * neighbor_columns_values = SCIProwGetVals(row) */ __pyx_v_neighbor_columns = SCIProwGetCols(__pyx_v_row); /* "pyscipopt/scip.pyx":4800 * * neighbor_columns = SCIProwGetCols(row) * neighbor_ncolumns = SCIProwGetNNonz(row) # <<<<<<<<<<<<<< * neighbor_columns_values = SCIProwGetVals(row) * */ __pyx_v_neighbor_ncolumns = SCIProwGetNNonz(__pyx_v_row); /* "pyscipopt/scip.pyx":4801 * neighbor_columns = SCIProwGetCols(row) * neighbor_ncolumns = SCIProwGetNNonz(row) * neighbor_columns_values = SCIProwGetVals(row) # <<<<<<<<<<<<<< * * # weight no. 1 */ __pyx_v_neighbor_columns_values = SCIProwGetVals(__pyx_v_row); /* "pyscipopt/scip.pyx":4805 * # weight no. 1 * # unit weight * cons_w1[row_index] = 1 # <<<<<<<<<<<<<< * * # weight no. 2 */ __pyx_t_69 = __pyx_v_row_index; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w1.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4805, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w1.diminfo[0].strides) = 1.0; /* "pyscipopt/scip.pyx":4809 * # weight no. 2 * # inverse of the sum of the coefficients of all variables in constraint * constraint_sum = 0 # <<<<<<<<<<<<<< * for neighbor_column_index in range(neighbor_ncolumns): * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) */ __pyx_v_constraint_sum = 0.0; /* "pyscipopt/scip.pyx":4810 * # inverse of the sum of the coefficients of all variables in constraint * constraint_sum = 0 * for neighbor_column_index in range(neighbor_ncolumns): # <<<<<<<<<<<<<< * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * cons_w2[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum */ __pyx_t_70 = __pyx_v_neighbor_ncolumns; __pyx_t_77 = __pyx_t_70; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_77; __pyx_t_79+=1) { __pyx_v_neighbor_column_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4811 * constraint_sum = 0 * for neighbor_column_index in range(neighbor_ncolumns): * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) # <<<<<<<<<<<<<< * cons_w2[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum * */ __pyx_v_constraint_sum = (__pyx_v_constraint_sum + REALABS((__pyx_v_neighbor_columns_values[__pyx_v_neighbor_column_index]))); } /* "pyscipopt/scip.pyx":4812 * for neighbor_column_index in range(neighbor_ncolumns): * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * cons_w2[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum # <<<<<<<<<<<<<< * * # weight no. 3 */ if (((__pyx_v_constraint_sum == 0.0) != 0)) { __pyx_t_72 = 1.0; } else { if (unlikely(__pyx_v_constraint_sum == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4812, __pyx_L1_error) } __pyx_t_72 = (1.0 / __pyx_v_constraint_sum); } __pyx_t_69 = __pyx_v_row_index; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w2.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4812, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w2.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4816 * # weight no. 3 * # dual cost of the constraint * cons_w3[row_index] = REALABS(SCIProwGetDualsol(row)) # <<<<<<<<<<<<<< * * */ __pyx_t_69 = __pyx_v_row_index; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w3.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4816, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w3.diminfo[0].strides) = REALABS(SCIProwGetDualsol(__pyx_v_row)); } /* "pyscipopt/scip.pyx":4819 * * * for i in range(ncols): # <<<<<<<<<<<<<< * col = cols[i] * col_i = SCIPcolGetIndex(col) */ __pyx_t_7 = __pyx_v_ncols; __pyx_t_67 = __pyx_t_7; for (__pyx_t_68 = 0; __pyx_t_68 < __pyx_t_67; __pyx_t_68+=1) { __pyx_v_i = __pyx_t_68; /* "pyscipopt/scip.pyx":4820 * * for i in range(ncols): * col = cols[i] # <<<<<<<<<<<<<< * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) */ __pyx_v_col = (__pyx_v_cols[__pyx_v_i]); /* "pyscipopt/scip.pyx":4821 * for i in range(ncols): * col = cols[i] * col_i = SCIPcolGetIndex(col) # <<<<<<<<<<<<<< * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) */ __pyx_v_col_i = SCIPcolGetIndex(__pyx_v_col); /* "pyscipopt/scip.pyx":4822 * col = cols[i] * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) # <<<<<<<<<<<<<< * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) */ __pyx_v_neighbors = SCIPcolGetRows(__pyx_v_col); /* "pyscipopt/scip.pyx":4823 * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * nonzero_coefs_raw = SCIPcolGetVals(col) * var = SCIPcolGetVar(cols[i]) */ __pyx_v_nb_neighbors = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":4824 * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) # <<<<<<<<<<<<<< * var = SCIPcolGetVar(cols[i]) * */ __pyx_v_nonzero_coefs_raw = SCIPcolGetVals(__pyx_v_col); /* "pyscipopt/scip.pyx":4825 * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) * var = SCIPcolGetVar(cols[i]) # <<<<<<<<<<<<<< * * cons_sum1, cons_mean1, cons_var1, cons_max1, cons_min1 = 0, 0, 0, 0, 0 */ __pyx_v_var = SCIPcolGetVar((__pyx_v_cols[__pyx_v_i])); /* "pyscipopt/scip.pyx":4827 * var = SCIPcolGetVar(cols[i]) * * cons_sum1, cons_mean1, cons_var1, cons_max1, cons_min1 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * cons_sum2, cons_mean2, cons_var2, cons_max2, cons_min2 = 0, 0, 0, 0, 0 * cons_sum3, cons_mean3, cons_var3, cons_max3, cons_min3 = 0, 0, 0, 0, 0 */ __pyx_t_76 = 0.0; __pyx_t_75 = 0.0; __pyx_t_85 = 0.0; __pyx_t_90 = 0.0; __pyx_t_91 = 0.0; __pyx_v_cons_sum1 = __pyx_t_76; __pyx_v_cons_mean1 = __pyx_t_75; __pyx_v_cons_var1 = __pyx_t_85; __pyx_v_cons_max1 = __pyx_t_90; __pyx_v_cons_min1 = __pyx_t_91; /* "pyscipopt/scip.pyx":4828 * * cons_sum1, cons_mean1, cons_var1, cons_max1, cons_min1 = 0, 0, 0, 0, 0 * cons_sum2, cons_mean2, cons_var2, cons_max2, cons_min2 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * cons_sum3, cons_mean3, cons_var3, cons_max3, cons_min3 = 0, 0, 0, 0, 0 * count = 0 */ __pyx_t_91 = 0.0; __pyx_t_90 = 0.0; __pyx_t_85 = 0.0; __pyx_t_75 = 0.0; __pyx_t_76 = 0.0; __pyx_v_cons_sum2 = __pyx_t_91; __pyx_v_cons_mean2 = __pyx_t_90; __pyx_v_cons_var2 = __pyx_t_85; __pyx_v_cons_max2 = __pyx_t_75; __pyx_v_cons_min2 = __pyx_t_76; /* "pyscipopt/scip.pyx":4829 * cons_sum1, cons_mean1, cons_var1, cons_max1, cons_min1 = 0, 0, 0, 0, 0 * cons_sum2, cons_mean2, cons_var2, cons_max2, cons_min2 = 0, 0, 0, 0, 0 * cons_sum3, cons_mean3, cons_var3, cons_max3, cons_min3 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * count = 0 * for neighbor_index in range(nb_neighbors): */ __pyx_t_76 = 0.0; __pyx_t_75 = 0.0; __pyx_t_85 = 0.0; __pyx_t_90 = 0.0; __pyx_t_91 = 0.0; __pyx_v_cons_sum3 = __pyx_t_76; __pyx_v_cons_mean3 = __pyx_t_75; __pyx_v_cons_var3 = __pyx_t_85; __pyx_v_cons_max3 = __pyx_t_90; __pyx_v_cons_min3 = __pyx_t_91; /* "pyscipopt/scip.pyx":4830 * cons_sum2, cons_mean2, cons_var2, cons_max2, cons_min2 = 0, 0, 0, 0, 0 * cons_sum3, cons_mean3, cons_var3, cons_max3, cons_min3 = 0, 0, 0, 0, 0 * count = 0 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * count += 1 */ __pyx_v_count = 0; /* "pyscipopt/scip.pyx":4831 * cons_sum3, cons_mean3, cons_var3, cons_max3, cons_min3 = 0, 0, 0, 0, 0 * count = 0 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) */ __pyx_t_70 = __pyx_v_nb_neighbors; __pyx_t_77 = __pyx_t_70; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_77; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4832 * count = 0 * for neighbor_index in range(nb_neighbors): * count += 1 # <<<<<<<<<<<<<< * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) */ __pyx_v_count = (__pyx_v_count + 1); /* "pyscipopt/scip.pyx":4833 * for neighbor_index in range(nb_neighbors): * count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * */ __pyx_v_neighbor_row_index = SCIProwGetLPPos((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4834 * count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) # <<<<<<<<<<<<<< * * value = cons_w1[neighbor_row_index] * abs_coef */ __pyx_v_abs_coef = REALABS((__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4836 * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * * value = cons_w1[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * cons_sum1 += value * cons_max1 = value if count == 1 else max(cons_max1, value) */ __pyx_t_69 = __pyx_v_neighbor_row_index; __pyx_t_80 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_80 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w1.diminfo[0].shape)) __pyx_t_80 = 0; if (unlikely(__pyx_t_80 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_80); __PYX_ERR(3, 4836, __pyx_L1_error) } __pyx_t_3 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w1.diminfo[0].strides)) * __pyx_v_abs_coef)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4837 * * value = cons_w1[neighbor_row_index] * abs_coef * cons_sum1 += value # <<<<<<<<<<<<<< * cons_max1 = value if count == 1 else max(cons_max1, value) * cons_min1 = value if count == 1 else min(cons_min1, value) */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_sum1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_91 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4837, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_cons_sum1 = __pyx_t_91; /* "pyscipopt/scip.pyx":4838 * value = cons_w1[neighbor_row_index] * abs_coef * cons_sum1 += value * cons_max1 = value if count == 1 else max(cons_max1, value) # <<<<<<<<<<<<<< * cons_min1 = value if count == 1 else min(cons_min1, value) * */ if (((__pyx_v_count == 1) != 0)) { __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4838, __pyx_L1_error) __pyx_t_91 = __pyx_t_90; } else { __Pyx_INCREF(__pyx_v_value); __pyx_t_2 = __pyx_v_value; __pyx_t_90 = __pyx_v_cons_max1; __pyx_t_4 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_5 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_t_90; } __pyx_v_cons_max1 = __pyx_t_91; /* "pyscipopt/scip.pyx":4839 * cons_sum1 += value * cons_max1 = value if count == 1 else max(cons_max1, value) * cons_min1 = value if count == 1 else min(cons_min1, value) # <<<<<<<<<<<<<< * * value = cons_w2[neighbor_row_index] * abs_coef */ if (((__pyx_v_count == 1) != 0)) { __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4839, __pyx_L1_error) __pyx_t_91 = __pyx_t_90; } else { __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __pyx_t_90 = __pyx_v_cons_min1; __pyx_t_5 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_91 = __pyx_t_90; } __pyx_v_cons_min1 = __pyx_t_91; /* "pyscipopt/scip.pyx":4841 * cons_min1 = value if count == 1 else min(cons_min1, value) * * value = cons_w2[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * cons_sum2 += value * cons_max2 = value if count == 1 else max(cons_max2, value) */ __pyx_t_69 = __pyx_v_neighbor_row_index; __pyx_t_80 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_80 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w2.diminfo[0].shape)) __pyx_t_80 = 0; if (unlikely(__pyx_t_80 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_80); __PYX_ERR(3, 4841, __pyx_L1_error) } __pyx_t_2 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w2.diminfo[0].strides)) * __pyx_v_abs_coef)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4842 * * value = cons_w2[neighbor_row_index] * abs_coef * cons_sum2 += value # <<<<<<<<<<<<<< * cons_max2 = value if count == 1 else max(cons_max2, value) * cons_min2 = value if count == 1 else min(cons_min2, value) */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_cons_sum2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_91 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_91 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_cons_sum2 = __pyx_t_91; /* "pyscipopt/scip.pyx":4843 * value = cons_w2[neighbor_row_index] * abs_coef * cons_sum2 += value * cons_max2 = value if count == 1 else max(cons_max2, value) # <<<<<<<<<<<<<< * cons_min2 = value if count == 1 else min(cons_min2, value) * */ if (((__pyx_v_count == 1) != 0)) { __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4843, __pyx_L1_error) __pyx_t_91 = __pyx_t_90; } else { __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __pyx_t_90 = __pyx_v_cons_max2; __pyx_t_4 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __pyx_t_5 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_91 = __pyx_t_90; } __pyx_v_cons_max2 = __pyx_t_91; /* "pyscipopt/scip.pyx":4844 * cons_sum2 += value * cons_max2 = value if count == 1 else max(cons_max2, value) * cons_min2 = value if count == 1 else min(cons_min2, value) # <<<<<<<<<<<<<< * * value = cons_w3[neighbor_row_index] * abs_coef */ if (((__pyx_v_count == 1) != 0)) { __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4844, __pyx_L1_error) __pyx_t_91 = __pyx_t_90; } else { __Pyx_INCREF(__pyx_v_value); __pyx_t_2 = __pyx_v_value; __pyx_t_90 = __pyx_v_cons_min2; __pyx_t_5 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_t_90; } __pyx_v_cons_min2 = __pyx_t_91; /* "pyscipopt/scip.pyx":4846 * cons_min2 = value if count == 1 else min(cons_min2, value) * * value = cons_w3[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * cons_sum3 += value * cons_max3 = value if count == 1 else max(cons_max3, value) */ __pyx_t_69 = __pyx_v_neighbor_row_index; __pyx_t_80 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_80 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w3.diminfo[0].shape)) __pyx_t_80 = 0; if (unlikely(__pyx_t_80 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_80); __PYX_ERR(3, 4846, __pyx_L1_error) } __pyx_t_3 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w3.diminfo[0].strides)) * __pyx_v_abs_coef)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":4847 * * value = cons_w3[neighbor_row_index] * abs_coef * cons_sum3 += value # <<<<<<<<<<<<<< * cons_max3 = value if count == 1 else max(cons_max3, value) * cons_min3 = value if count == 1 else min(cons_min3, value) */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_sum3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_91 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_cons_sum3 = __pyx_t_91; /* "pyscipopt/scip.pyx":4848 * value = cons_w3[neighbor_row_index] * abs_coef * cons_sum3 += value * cons_max3 = value if count == 1 else max(cons_max3, value) # <<<<<<<<<<<<<< * cons_min3 = value if count == 1 else min(cons_min3, value) * */ if (((__pyx_v_count == 1) != 0)) { __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4848, __pyx_L1_error) __pyx_t_91 = __pyx_t_90; } else { __Pyx_INCREF(__pyx_v_value); __pyx_t_2 = __pyx_v_value; __pyx_t_90 = __pyx_v_cons_max3; __pyx_t_4 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_5 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_t_90; } __pyx_v_cons_max3 = __pyx_t_91; /* "pyscipopt/scip.pyx":4849 * cons_sum3 += value * cons_max3 = value if count == 1 else max(cons_max3, value) * cons_min3 = value if count == 1 else min(cons_min3, value) # <<<<<<<<<<<<<< * * if count > 0: */ if (((__pyx_v_count == 1) != 0)) { __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4849, __pyx_L1_error) __pyx_t_91 = __pyx_t_90; } else { __Pyx_INCREF(__pyx_v_value); __pyx_t_3 = __pyx_v_value; __pyx_t_90 = __pyx_v_cons_min3; __pyx_t_5 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_78 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_78 < 0)) __PYX_ERR(3, 4849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_78) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_90); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_90 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_90 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_91 = __pyx_t_90; } __pyx_v_cons_min3 = __pyx_t_91; } /* "pyscipopt/scip.pyx":4851 * cons_min3 = value if count == 1 else min(cons_min3, value) * * if count > 0: # <<<<<<<<<<<<<< * cons_mean1 = cons_sum1 / count * cons_mean2 = cons_sum2 / count */ __pyx_t_78 = ((__pyx_v_count > 0) != 0); if (__pyx_t_78) { /* "pyscipopt/scip.pyx":4852 * * if count > 0: * cons_mean1 = cons_sum1 / count # <<<<<<<<<<<<<< * cons_mean2 = cons_sum2 / count * cons_mean3 = cons_sum3 / count */ if (unlikely(__pyx_v_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4852, __pyx_L1_error) } __pyx_v_cons_mean1 = (__pyx_v_cons_sum1 / ((float)__pyx_v_count)); /* "pyscipopt/scip.pyx":4853 * if count > 0: * cons_mean1 = cons_sum1 / count * cons_mean2 = cons_sum2 / count # <<<<<<<<<<<<<< * cons_mean3 = cons_sum3 / count * */ if (unlikely(__pyx_v_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4853, __pyx_L1_error) } __pyx_v_cons_mean2 = (__pyx_v_cons_sum2 / ((float)__pyx_v_count)); /* "pyscipopt/scip.pyx":4854 * cons_mean1 = cons_sum1 / count * cons_mean2 = cons_sum2 / count * cons_mean3 = cons_sum3 / count # <<<<<<<<<<<<<< * * for neighbor_index in range(nb_neighbors): */ if (unlikely(__pyx_v_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4854, __pyx_L1_error) } __pyx_v_cons_mean3 = (__pyx_v_cons_sum3 / ((float)__pyx_v_count)); /* "pyscipopt/scip.pyx":4856 * cons_mean3 = cons_sum3 / count * * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) */ __pyx_t_70 = __pyx_v_nb_neighbors; __pyx_t_77 = __pyx_t_70; for (__pyx_t_79 = 0; __pyx_t_79 < __pyx_t_77; __pyx_t_79+=1) { __pyx_v_neighbor_index = __pyx_t_79; /* "pyscipopt/scip.pyx":4858 * for neighbor_index in range(nb_neighbors): * * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * */ __pyx_v_neighbor_row_index = SCIProwGetLPPos((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4859 * * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) # <<<<<<<<<<<<<< * * value = cons_w1[neighbor_row_index] * abs_coef */ __pyx_v_abs_coef = REALABS((__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":4861 * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * * value = cons_w1[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * cons_var1 += (value - cons_mean1)**2 * */ __pyx_t_69 = __pyx_v_neighbor_row_index; __pyx_t_80 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_80 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w1.diminfo[0].shape)) __pyx_t_80 = 0; if (unlikely(__pyx_t_80 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_80); __PYX_ERR(3, 4861, __pyx_L1_error) } __pyx_t_2 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w1.diminfo[0].strides)) * __pyx_v_abs_coef)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4862 * * value = cons_w1[neighbor_row_index] * abs_coef * cons_var1 += (value - cons_mean1)**2 # <<<<<<<<<<<<<< * * value = cons_w2[neighbor_row_index] * abs_coef */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_cons_var1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_mean1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_v_value, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Power(__pyx_t_4, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_91 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4862, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cons_var1 = __pyx_t_91; /* "pyscipopt/scip.pyx":4864 * cons_var1 += (value - cons_mean1)**2 * * value = cons_w2[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * cons_var2 += (value - cons_mean2)**2 * */ __pyx_t_69 = __pyx_v_neighbor_row_index; __pyx_t_80 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_80 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w2.diminfo[0].shape)) __pyx_t_80 = 0; if (unlikely(__pyx_t_80 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_80); __PYX_ERR(3, 4864, __pyx_L1_error) } __pyx_t_4 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w2.diminfo[0].strides)) * __pyx_v_abs_coef)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":4865 * * value = cons_w2[neighbor_row_index] * abs_coef * cons_var2 += (value - cons_mean2)**2 # <<<<<<<<<<<<<< * * value = cons_w3[neighbor_row_index] * abs_coef */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_cons_var2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_mean2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Subtract(__pyx_v_value, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Power(__pyx_t_2, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_91 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4865, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_cons_var2 = __pyx_t_91; /* "pyscipopt/scip.pyx":4867 * cons_var2 += (value - cons_mean2)**2 * * value = cons_w3[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * cons_var3 += (value - cons_mean3)**2 * */ __pyx_t_69 = __pyx_v_neighbor_row_index; __pyx_t_80 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_80 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_cons_w3.diminfo[0].shape)) __pyx_t_80 = 0; if (unlikely(__pyx_t_80 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_80); __PYX_ERR(3, 4867, __pyx_L1_error) } __pyx_t_2 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_cons_w3.diminfo[0].strides)) * __pyx_v_abs_coef)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":4868 * * value = cons_w3[neighbor_row_index] * abs_coef * cons_var3 += (value - cons_mean3)**2 # <<<<<<<<<<<<<< * * cons_var1 /= count */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_cons_var3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_mean3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_v_value, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Power(__pyx_t_4, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_91 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_91 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 4868, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cons_var3 = __pyx_t_91; } /* "pyscipopt/scip.pyx":4870 * cons_var3 += (value - cons_mean3)**2 * * cons_var1 /= count # <<<<<<<<<<<<<< * cons_var2 /= count * cons_var3 /= count */ if (unlikely(__pyx_v_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4870, __pyx_L1_error) } __pyx_v_cons_var1 = (__pyx_v_cons_var1 / __pyx_v_count); /* "pyscipopt/scip.pyx":4871 * * cons_var1 /= count * cons_var2 /= count # <<<<<<<<<<<<<< * cons_var3 /= count * */ if (unlikely(__pyx_v_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4871, __pyx_L1_error) } __pyx_v_cons_var2 = (__pyx_v_cons_var2 / __pyx_v_count); /* "pyscipopt/scip.pyx":4872 * cons_var1 /= count * cons_var2 /= count * cons_var3 /= count # <<<<<<<<<<<<<< * * col_coef_sum1_unit_weight[col_i] = cons_sum1 */ if (unlikely(__pyx_v_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 4872, __pyx_L1_error) } __pyx_v_cons_var3 = (__pyx_v_cons_var3 / __pyx_v_count); /* "pyscipopt/scip.pyx":4851 * cons_min3 = value if count == 1 else min(cons_min3, value) * * if count > 0: # <<<<<<<<<<<<<< * cons_mean1 = cons_sum1 / count * cons_mean2 = cons_sum2 / count */ } /* "pyscipopt/scip.pyx":4874 * cons_var3 /= count * * col_coef_sum1_unit_weight[col_i] = cons_sum1 # <<<<<<<<<<<<<< * col_coef_sum2_inverse_sum[col_i] = cons_sum2 * col_coef_sum3_dual_cost[col_i] = cons_sum3 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_sum1_unit_weight.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_sum1_unit_weight.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4874, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_sum1_unit_weight.diminfo[0].strides) = __pyx_v_cons_sum1; /* "pyscipopt/scip.pyx":4875 * * col_coef_sum1_unit_weight[col_i] = cons_sum1 * col_coef_sum2_inverse_sum[col_i] = cons_sum2 # <<<<<<<<<<<<<< * col_coef_sum3_dual_cost[col_i] = cons_sum3 * col_coef_mean1_unit_weight[col_i] = cons_mean1 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_sum2_inverse_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_sum2_inverse_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4875, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_sum2_inverse_sum.diminfo[0].strides) = __pyx_v_cons_sum2; /* "pyscipopt/scip.pyx":4876 * col_coef_sum1_unit_weight[col_i] = cons_sum1 * col_coef_sum2_inverse_sum[col_i] = cons_sum2 * col_coef_sum3_dual_cost[col_i] = cons_sum3 # <<<<<<<<<<<<<< * col_coef_mean1_unit_weight[col_i] = cons_mean1 * col_coef_mean2_inverse_sum[col_i] = cons_mean2 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_sum3_dual_cost.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_sum3_dual_cost.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4876, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_sum3_dual_cost.diminfo[0].strides) = __pyx_v_cons_sum3; /* "pyscipopt/scip.pyx":4877 * col_coef_sum2_inverse_sum[col_i] = cons_sum2 * col_coef_sum3_dual_cost[col_i] = cons_sum3 * col_coef_mean1_unit_weight[col_i] = cons_mean1 # <<<<<<<<<<<<<< * col_coef_mean2_inverse_sum[col_i] = cons_mean2 * col_coef_mean3_dual_cost[col_i] = cons_mean3 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_mean1_unit_weight.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_mean1_unit_weight.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4877, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_mean1_unit_weight.diminfo[0].strides) = __pyx_v_cons_mean1; /* "pyscipopt/scip.pyx":4878 * col_coef_sum3_dual_cost[col_i] = cons_sum3 * col_coef_mean1_unit_weight[col_i] = cons_mean1 * col_coef_mean2_inverse_sum[col_i] = cons_mean2 # <<<<<<<<<<<<<< * col_coef_mean3_dual_cost[col_i] = cons_mean3 * col_coef_max1_unit_weight[col_i] = cons_max1 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_mean2_inverse_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_mean2_inverse_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4878, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_mean2_inverse_sum.diminfo[0].strides) = __pyx_v_cons_mean2; /* "pyscipopt/scip.pyx":4879 * col_coef_mean1_unit_weight[col_i] = cons_mean1 * col_coef_mean2_inverse_sum[col_i] = cons_mean2 * col_coef_mean3_dual_cost[col_i] = cons_mean3 # <<<<<<<<<<<<<< * col_coef_max1_unit_weight[col_i] = cons_max1 * col_coef_max2_inverse_sum[col_i] = cons_max2 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_mean3_dual_cost.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_mean3_dual_cost.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4879, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_mean3_dual_cost.diminfo[0].strides) = __pyx_v_cons_mean3; /* "pyscipopt/scip.pyx":4880 * col_coef_mean2_inverse_sum[col_i] = cons_mean2 * col_coef_mean3_dual_cost[col_i] = cons_mean3 * col_coef_max1_unit_weight[col_i] = cons_max1 # <<<<<<<<<<<<<< * col_coef_max2_inverse_sum[col_i] = cons_max2 * col_coef_max3_dual_cost[col_i] = cons_max3 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_max1_unit_weight.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_max1_unit_weight.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4880, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_max1_unit_weight.diminfo[0].strides) = __pyx_v_cons_max1; /* "pyscipopt/scip.pyx":4881 * col_coef_mean3_dual_cost[col_i] = cons_mean3 * col_coef_max1_unit_weight[col_i] = cons_max1 * col_coef_max2_inverse_sum[col_i] = cons_max2 # <<<<<<<<<<<<<< * col_coef_max3_dual_cost[col_i] = cons_max3 * col_coef_min1_unit_weight[col_i] = cons_min1 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_max2_inverse_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_max2_inverse_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4881, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_max2_inverse_sum.diminfo[0].strides) = __pyx_v_cons_max2; /* "pyscipopt/scip.pyx":4882 * col_coef_max1_unit_weight[col_i] = cons_max1 * col_coef_max2_inverse_sum[col_i] = cons_max2 * col_coef_max3_dual_cost[col_i] = cons_max3 # <<<<<<<<<<<<<< * col_coef_min1_unit_weight[col_i] = cons_min1 * col_coef_min2_inverse_sum[col_i] = cons_min2 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_max3_dual_cost.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_max3_dual_cost.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4882, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_max3_dual_cost.diminfo[0].strides) = __pyx_v_cons_max3; /* "pyscipopt/scip.pyx":4883 * col_coef_max2_inverse_sum[col_i] = cons_max2 * col_coef_max3_dual_cost[col_i] = cons_max3 * col_coef_min1_unit_weight[col_i] = cons_min1 # <<<<<<<<<<<<<< * col_coef_min2_inverse_sum[col_i] = cons_min2 * col_coef_min3_dual_cost[col_i] = cons_min3 */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_min1_unit_weight.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_min1_unit_weight.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4883, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_min1_unit_weight.diminfo[0].strides) = __pyx_v_cons_min1; /* "pyscipopt/scip.pyx":4884 * col_coef_max3_dual_cost[col_i] = cons_max3 * col_coef_min1_unit_weight[col_i] = cons_min1 * col_coef_min2_inverse_sum[col_i] = cons_min2 # <<<<<<<<<<<<<< * col_coef_min3_dual_cost[col_i] = cons_min3 * col_coef_std1_unit_weight[col_i] = math.sqrt(cons_var1) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_min2_inverse_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_min2_inverse_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4884, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_min2_inverse_sum.diminfo[0].strides) = __pyx_v_cons_min2; /* "pyscipopt/scip.pyx":4885 * col_coef_min1_unit_weight[col_i] = cons_min1 * col_coef_min2_inverse_sum[col_i] = cons_min2 * col_coef_min3_dual_cost[col_i] = cons_min3 # <<<<<<<<<<<<<< * col_coef_std1_unit_weight[col_i] = math.sqrt(cons_var1) * col_coef_std2_inverse_sum[col_i] = math.sqrt(cons_var2) */ __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_min3_dual_cost.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_min3_dual_cost.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4885, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_min3_dual_cost.diminfo[0].strides) = __pyx_v_cons_min3; /* "pyscipopt/scip.pyx":4886 * col_coef_min2_inverse_sum[col_i] = cons_min2 * col_coef_min3_dual_cost[col_i] = cons_min3 * col_coef_std1_unit_weight[col_i] = math.sqrt(cons_var1) # <<<<<<<<<<<<<< * col_coef_std2_inverse_sum[col_i] = math.sqrt(cons_var2) * col_coef_std3_dual_cost[col_i] = math.sqrt(cons_var3) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_var1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_std1_unit_weight.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_std1_unit_weight.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4886, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_std1_unit_weight.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4887 * col_coef_min3_dual_cost[col_i] = cons_min3 * col_coef_std1_unit_weight[col_i] = math.sqrt(cons_var1) * col_coef_std2_inverse_sum[col_i] = math.sqrt(cons_var2) # <<<<<<<<<<<<<< * col_coef_std3_dual_cost[col_i] = math.sqrt(cons_var3) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_cons_var2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_std2_inverse_sum.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_std2_inverse_sum.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4887, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_std2_inverse_sum.diminfo[0].strides) = __pyx_t_72; /* "pyscipopt/scip.pyx":4888 * col_coef_std1_unit_weight[col_i] = math.sqrt(cons_var1) * col_coef_std2_inverse_sum[col_i] = math.sqrt(cons_var2) * col_coef_std3_dual_cost[col_i] = math.sqrt(cons_var3) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cons_var3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_72 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_72 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 4888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_69 = __pyx_v_col_i; __pyx_t_70 = -1; if (__pyx_t_69 < 0) { __pyx_t_69 += __pyx_pybuffernd_col_coef_std3_dual_cost.diminfo[0].shape; if (unlikely(__pyx_t_69 < 0)) __pyx_t_70 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_col_coef_std3_dual_cost.diminfo[0].shape)) __pyx_t_70 = 0; if (unlikely(__pyx_t_70 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_70); __PYX_ERR(3, 4888, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_col_coef_std3_dual_cost.diminfo[0].strides) = __pyx_t_72; } /* "pyscipopt/scip.pyx":4891 * * * return { # <<<<<<<<<<<<<< * # basic (8) * 'col_type_binary': col_type_binary, */ __Pyx_XDECREF(__pyx_r); /* "pyscipopt/scip.pyx":4893 * return { * # basic (8) * 'col_type_binary': col_type_binary, # <<<<<<<<<<<<<< * 'col_type_int': col_type_int, * 'col_coefs': col_coefs, */ __pyx_t_4 = __Pyx_PyDict_NewPresized(57); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_type_binary, ((PyObject *)__pyx_v_col_type_binary)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4894 * # basic (8) * 'col_type_binary': col_type_binary, * 'col_type_int': col_type_int, # <<<<<<<<<<<<<< * 'col_coefs': col_coefs, * 'col_coefs_pos': col_coefs_pos, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_type_int, ((PyObject *)__pyx_v_col_type_int)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4895 * 'col_type_binary': col_type_binary, * 'col_type_int': col_type_int, * 'col_coefs': col_coefs, # <<<<<<<<<<<<<< * 'col_coefs_pos': col_coefs_pos, * 'col_coefs_neg': col_coefs_neg, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coefs, ((PyObject *)__pyx_v_col_coefs)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4896 * 'col_type_int': col_type_int, * 'col_coefs': col_coefs, * 'col_coefs_pos': col_coefs_pos, # <<<<<<<<<<<<<< * 'col_coefs_neg': col_coefs_neg, * 'col_nnzrs': col_nnzrs, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coefs_pos, ((PyObject *)__pyx_v_col_coefs_pos)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4897 * 'col_coefs': col_coefs, * 'col_coefs_pos': col_coefs_pos, * 'col_coefs_neg': col_coefs_neg, # <<<<<<<<<<<<<< * 'col_nnzrs': col_nnzrs, * 'col_nup_locks': col_nup_locks, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coefs_neg, ((PyObject *)__pyx_v_col_coefs_neg)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4898 * 'col_coefs_pos': col_coefs_pos, * 'col_coefs_neg': col_coefs_neg, * 'col_nnzrs': col_nnzrs, # <<<<<<<<<<<<<< * 'col_nup_locks': col_nup_locks, * 'col_ndown_locks': col_ndown_locks, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_nnzrs, ((PyObject *)__pyx_v_col_nnzrs)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4899 * 'col_coefs_neg': col_coefs_neg, * 'col_nnzrs': col_nnzrs, * 'col_nup_locks': col_nup_locks, # <<<<<<<<<<<<<< * 'col_ndown_locks': col_ndown_locks, * */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_nup_locks, ((PyObject *)__pyx_v_col_nup_locks)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4900 * 'col_nnzrs': col_nnzrs, * 'col_nup_locks': col_nup_locks, * 'col_ndown_locks': col_ndown_locks, # <<<<<<<<<<<<<< * * # LP (12) */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ndown_locks, ((PyObject *)__pyx_v_col_ndown_locks)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4903 * * # LP (12) * 'col_solvals': col_solvals, # <<<<<<<<<<<<<< * 'col_sol_frac_up': col_sol_frac_up, * 'col_sol_frac_down': col_sol_frac_down, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_solvals, ((PyObject *)__pyx_v_col_solvals)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4904 * # LP (12) * 'col_solvals': col_solvals, * 'col_sol_frac_up': col_sol_frac_up, # <<<<<<<<<<<<<< * 'col_sol_frac_down': col_sol_frac_down, * 'col_sol_isfrac': col_sol_isfrac, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_sol_frac_up, ((PyObject *)__pyx_v_col_sol_frac_up)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4905 * 'col_solvals': col_solvals, * 'col_sol_frac_up': col_sol_frac_up, * 'col_sol_frac_down': col_sol_frac_down, # <<<<<<<<<<<<<< * 'col_sol_isfrac': col_sol_isfrac, * 'col_red_costs': col_red_costs, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_sol_frac_down, ((PyObject *)__pyx_v_col_sol_frac_down)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4906 * 'col_sol_frac_up': col_sol_frac_up, * 'col_sol_frac_down': col_sol_frac_down, * 'col_sol_isfrac': col_sol_isfrac, # <<<<<<<<<<<<<< * 'col_red_costs': col_red_costs, * 'col_lbs': col_lbs, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_sol_isfrac, ((PyObject *)__pyx_v_col_sol_isfrac)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4907 * 'col_sol_frac_down': col_sol_frac_down, * 'col_sol_isfrac': col_sol_isfrac, * 'col_red_costs': col_red_costs, # <<<<<<<<<<<<<< * 'col_lbs': col_lbs, * 'col_ubs': col_ubs, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_red_costs, ((PyObject *)__pyx_v_col_red_costs)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4908 * 'col_sol_isfrac': col_sol_isfrac, * 'col_red_costs': col_red_costs, * 'col_lbs': col_lbs, # <<<<<<<<<<<<<< * 'col_ubs': col_ubs, * 'col_ps_up': col_ps_up, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_lbs, ((PyObject *)__pyx_v_col_lbs)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4909 * 'col_red_costs': col_red_costs, * 'col_lbs': col_lbs, * 'col_ubs': col_ubs, # <<<<<<<<<<<<<< * 'col_ps_up': col_ps_up, * 'col_ps_down': col_ps_down, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ubs, ((PyObject *)__pyx_v_col_ubs)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4910 * 'col_lbs': col_lbs, * 'col_ubs': col_ubs, * 'col_ps_up': col_ps_up, # <<<<<<<<<<<<<< * 'col_ps_down': col_ps_down, * 'col_ps_ratio': col_ps_ratio, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ps_up, ((PyObject *)__pyx_v_col_ps_up)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4911 * 'col_ubs': col_ubs, * 'col_ps_up': col_ps_up, * 'col_ps_down': col_ps_down, # <<<<<<<<<<<<<< * 'col_ps_ratio': col_ps_ratio, * 'col_ps_sum': col_ps_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ps_down, ((PyObject *)__pyx_v_col_ps_down)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4912 * 'col_ps_up': col_ps_up, * 'col_ps_down': col_ps_down, * 'col_ps_ratio': col_ps_ratio, # <<<<<<<<<<<<<< * 'col_ps_sum': col_ps_sum, * 'col_ps_product': col_ps_product, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ps_ratio, ((PyObject *)__pyx_v_col_ps_ratio)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4913 * 'col_ps_down': col_ps_down, * 'col_ps_ratio': col_ps_ratio, * 'col_ps_sum': col_ps_sum, # <<<<<<<<<<<<<< * 'col_ps_product': col_ps_product, * */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ps_sum, ((PyObject *)__pyx_v_col_ps_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4914 * 'col_ps_ratio': col_ps_ratio, * 'col_ps_sum': col_ps_sum, * 'col_ps_product': col_ps_product, # <<<<<<<<<<<<<< * * # Structure (4 + 8 + 10 + 15) */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ps_product, ((PyObject *)__pyx_v_col_ps_product)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4917 * * # Structure (4 + 8 + 10 + 15) * 'col_cdeg_mean': col_cdeg_mean, # <<<<<<<<<<<<<< * 'col_cdeg_std': col_cdeg_std, * 'col_cdeg_min': col_cdeg_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_cdeg_mean, ((PyObject *)__pyx_v_col_cdeg_mean)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4918 * # Structure (4 + 8 + 10 + 15) * 'col_cdeg_mean': col_cdeg_mean, * 'col_cdeg_std': col_cdeg_std, # <<<<<<<<<<<<<< * 'col_cdeg_min': col_cdeg_min, * 'col_cdeg_max': col_cdeg_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_cdeg_std, ((PyObject *)__pyx_v_col_cdeg_std)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4919 * 'col_cdeg_mean': col_cdeg_mean, * 'col_cdeg_std': col_cdeg_std, * 'col_cdeg_min': col_cdeg_min, # <<<<<<<<<<<<<< * 'col_cdeg_max': col_cdeg_max, * 'col_prhs_ratio_max': col_prhs_ratio_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_cdeg_min, ((PyObject *)__pyx_v_col_cdeg_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4920 * 'col_cdeg_std': col_cdeg_std, * 'col_cdeg_min': col_cdeg_min, * 'col_cdeg_max': col_cdeg_max, # <<<<<<<<<<<<<< * 'col_prhs_ratio_max': col_prhs_ratio_max, * 'col_prhs_ratio_min': col_prhs_ratio_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_cdeg_max, ((PyObject *)__pyx_v_col_cdeg_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4921 * 'col_cdeg_min': col_cdeg_min, * 'col_cdeg_max': col_cdeg_max, * 'col_prhs_ratio_max': col_prhs_ratio_max, # <<<<<<<<<<<<<< * 'col_prhs_ratio_min': col_prhs_ratio_min, * 'col_nrhs_ratio_max': col_nrhs_ratio_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_prhs_ratio_max, ((PyObject *)__pyx_v_col_prhs_ratio_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4922 * 'col_cdeg_max': col_cdeg_max, * 'col_prhs_ratio_max': col_prhs_ratio_max, * 'col_prhs_ratio_min': col_prhs_ratio_min, # <<<<<<<<<<<<<< * 'col_nrhs_ratio_max': col_nrhs_ratio_max, * 'col_nrhs_ratio_min': col_nrhs_ratio_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_prhs_ratio_min, ((PyObject *)__pyx_v_col_prhs_ratio_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4923 * 'col_prhs_ratio_max': col_prhs_ratio_max, * 'col_prhs_ratio_min': col_prhs_ratio_min, * 'col_nrhs_ratio_max': col_nrhs_ratio_max, # <<<<<<<<<<<<<< * 'col_nrhs_ratio_min': col_nrhs_ratio_min, * 'col_plhs_ratio_max': col_plhs_ratio_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_nrhs_ratio_max, ((PyObject *)__pyx_v_col_nrhs_ratio_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4924 * 'col_prhs_ratio_min': col_prhs_ratio_min, * 'col_nrhs_ratio_max': col_nrhs_ratio_max, * 'col_nrhs_ratio_min': col_nrhs_ratio_min, # <<<<<<<<<<<<<< * 'col_plhs_ratio_max': col_plhs_ratio_max, * 'col_plhs_ratio_min': col_plhs_ratio_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_nrhs_ratio_min, ((PyObject *)__pyx_v_col_nrhs_ratio_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4925 * 'col_nrhs_ratio_max': col_nrhs_ratio_max, * 'col_nrhs_ratio_min': col_nrhs_ratio_min, * 'col_plhs_ratio_max': col_plhs_ratio_max, # <<<<<<<<<<<<<< * 'col_plhs_ratio_min': col_plhs_ratio_min, * 'col_nlhs_ratio_max': col_nlhs_ratio_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_plhs_ratio_max, ((PyObject *)__pyx_v_col_plhs_ratio_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4926 * 'col_nrhs_ratio_min': col_nrhs_ratio_min, * 'col_plhs_ratio_max': col_plhs_ratio_max, * 'col_plhs_ratio_min': col_plhs_ratio_min, # <<<<<<<<<<<<<< * 'col_nlhs_ratio_max': col_nlhs_ratio_max, * 'col_nlhs_ratio_min': col_nlhs_ratio_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_plhs_ratio_min, ((PyObject *)__pyx_v_col_plhs_ratio_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4927 * 'col_plhs_ratio_max': col_plhs_ratio_max, * 'col_plhs_ratio_min': col_plhs_ratio_min, * 'col_nlhs_ratio_max': col_nlhs_ratio_max, # <<<<<<<<<<<<<< * 'col_nlhs_ratio_min': col_nlhs_ratio_min, * 'col_pcoefs_sum': col_pcoefs_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_nlhs_ratio_max, ((PyObject *)__pyx_v_col_nlhs_ratio_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4928 * 'col_plhs_ratio_min': col_plhs_ratio_min, * 'col_nlhs_ratio_max': col_nlhs_ratio_max, * 'col_nlhs_ratio_min': col_nlhs_ratio_min, # <<<<<<<<<<<<<< * 'col_pcoefs_sum': col_pcoefs_sum, * 'col_pcoefs_mean': col_pcoefs_mean, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_nlhs_ratio_min, ((PyObject *)__pyx_v_col_nlhs_ratio_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4929 * 'col_nlhs_ratio_max': col_nlhs_ratio_max, * 'col_nlhs_ratio_min': col_nlhs_ratio_min, * 'col_pcoefs_sum': col_pcoefs_sum, # <<<<<<<<<<<<<< * 'col_pcoefs_mean': col_pcoefs_mean, * 'col_pcoefs_std': col_pcoefs_std, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_pcoefs_sum, ((PyObject *)__pyx_v_col_pcoefs_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4930 * 'col_nlhs_ratio_min': col_nlhs_ratio_min, * 'col_pcoefs_sum': col_pcoefs_sum, * 'col_pcoefs_mean': col_pcoefs_mean, # <<<<<<<<<<<<<< * 'col_pcoefs_std': col_pcoefs_std, * 'col_pcoefs_min': col_pcoefs_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_pcoefs_mean, ((PyObject *)__pyx_v_col_pcoefs_mean)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4931 * 'col_pcoefs_sum': col_pcoefs_sum, * 'col_pcoefs_mean': col_pcoefs_mean, * 'col_pcoefs_std': col_pcoefs_std, # <<<<<<<<<<<<<< * 'col_pcoefs_min': col_pcoefs_min, * 'col_pcoefs_max': col_pcoefs_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_pcoefs_std, ((PyObject *)__pyx_v_col_pcoefs_std)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4932 * 'col_pcoefs_mean': col_pcoefs_mean, * 'col_pcoefs_std': col_pcoefs_std, * 'col_pcoefs_min': col_pcoefs_min, # <<<<<<<<<<<<<< * 'col_pcoefs_max': col_pcoefs_max, * 'col_ncoefs_sum': col_ncoefs_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_pcoefs_min, ((PyObject *)__pyx_v_col_pcoefs_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4933 * 'col_pcoefs_std': col_pcoefs_std, * 'col_pcoefs_min': col_pcoefs_min, * 'col_pcoefs_max': col_pcoefs_max, # <<<<<<<<<<<<<< * 'col_ncoefs_sum': col_ncoefs_sum, * 'col_ncoefs_mean': col_ncoefs_mean, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_pcoefs_max, ((PyObject *)__pyx_v_col_pcoefs_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4934 * 'col_pcoefs_min': col_pcoefs_min, * 'col_pcoefs_max': col_pcoefs_max, * 'col_ncoefs_sum': col_ncoefs_sum, # <<<<<<<<<<<<<< * 'col_ncoefs_mean': col_ncoefs_mean, * 'col_ncoefs_std': col_ncoefs_std, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ncoefs_sum, ((PyObject *)__pyx_v_col_ncoefs_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4935 * 'col_pcoefs_max': col_pcoefs_max, * 'col_ncoefs_sum': col_ncoefs_sum, * 'col_ncoefs_mean': col_ncoefs_mean, # <<<<<<<<<<<<<< * 'col_ncoefs_std': col_ncoefs_std, * 'col_ncoefs_min': col_ncoefs_min, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ncoefs_mean, ((PyObject *)__pyx_v_col_ncoefs_mean)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4936 * 'col_ncoefs_sum': col_ncoefs_sum, * 'col_ncoefs_mean': col_ncoefs_mean, * 'col_ncoefs_std': col_ncoefs_std, # <<<<<<<<<<<<<< * 'col_ncoefs_min': col_ncoefs_min, * 'col_ncoefs_max': col_ncoefs_max, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ncoefs_std, ((PyObject *)__pyx_v_col_ncoefs_std)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4937 * 'col_ncoefs_mean': col_ncoefs_mean, * 'col_ncoefs_std': col_ncoefs_std, * 'col_ncoefs_min': col_ncoefs_min, # <<<<<<<<<<<<<< * 'col_ncoefs_max': col_ncoefs_max, * 'col_coef_sum1_unit_weight': col_coef_sum1_unit_weight, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ncoefs_min, ((PyObject *)__pyx_v_col_ncoefs_min)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4938 * 'col_ncoefs_std': col_ncoefs_std, * 'col_ncoefs_min': col_ncoefs_min, * 'col_ncoefs_max': col_ncoefs_max, # <<<<<<<<<<<<<< * 'col_coef_sum1_unit_weight': col_coef_sum1_unit_weight, * 'col_coef_mean1_unit_weight': col_coef_mean1_unit_weight, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_ncoefs_max, ((PyObject *)__pyx_v_col_ncoefs_max)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4939 * 'col_ncoefs_min': col_ncoefs_min, * 'col_ncoefs_max': col_ncoefs_max, * 'col_coef_sum1_unit_weight': col_coef_sum1_unit_weight, # <<<<<<<<<<<<<< * 'col_coef_mean1_unit_weight': col_coef_mean1_unit_weight, * 'col_coef_std1_unit_weight': col_coef_std1_unit_weight, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_sum1_unit_weight, ((PyObject *)__pyx_v_col_coef_sum1_unit_weight)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4940 * 'col_ncoefs_max': col_ncoefs_max, * 'col_coef_sum1_unit_weight': col_coef_sum1_unit_weight, * 'col_coef_mean1_unit_weight': col_coef_mean1_unit_weight, # <<<<<<<<<<<<<< * 'col_coef_std1_unit_weight': col_coef_std1_unit_weight, * 'col_coef_max1_unit_weight': col_coef_max1_unit_weight, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_mean1_unit_weight, ((PyObject *)__pyx_v_col_coef_mean1_unit_weight)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4941 * 'col_coef_sum1_unit_weight': col_coef_sum1_unit_weight, * 'col_coef_mean1_unit_weight': col_coef_mean1_unit_weight, * 'col_coef_std1_unit_weight': col_coef_std1_unit_weight, # <<<<<<<<<<<<<< * 'col_coef_max1_unit_weight': col_coef_max1_unit_weight, * 'col_coef_min1_unit_weight': col_coef_min1_unit_weight, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_std1_unit_weight, ((PyObject *)__pyx_v_col_coef_std1_unit_weight)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4942 * 'col_coef_mean1_unit_weight': col_coef_mean1_unit_weight, * 'col_coef_std1_unit_weight': col_coef_std1_unit_weight, * 'col_coef_max1_unit_weight': col_coef_max1_unit_weight, # <<<<<<<<<<<<<< * 'col_coef_min1_unit_weight': col_coef_min1_unit_weight, * 'col_coef_sum2_inverse_sum': col_coef_sum2_inverse_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_max1_unit_weight, ((PyObject *)__pyx_v_col_coef_max1_unit_weight)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4943 * 'col_coef_std1_unit_weight': col_coef_std1_unit_weight, * 'col_coef_max1_unit_weight': col_coef_max1_unit_weight, * 'col_coef_min1_unit_weight': col_coef_min1_unit_weight, # <<<<<<<<<<<<<< * 'col_coef_sum2_inverse_sum': col_coef_sum2_inverse_sum, * 'col_coef_mean2_inverse_sum': col_coef_mean2_inverse_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_min1_unit_weight, ((PyObject *)__pyx_v_col_coef_min1_unit_weight)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4944 * 'col_coef_max1_unit_weight': col_coef_max1_unit_weight, * 'col_coef_min1_unit_weight': col_coef_min1_unit_weight, * 'col_coef_sum2_inverse_sum': col_coef_sum2_inverse_sum, # <<<<<<<<<<<<<< * 'col_coef_mean2_inverse_sum': col_coef_mean2_inverse_sum, * 'col_coef_std2_inverse_sum': col_coef_std2_inverse_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_sum2_inverse_sum, ((PyObject *)__pyx_v_col_coef_sum2_inverse_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4945 * 'col_coef_min1_unit_weight': col_coef_min1_unit_weight, * 'col_coef_sum2_inverse_sum': col_coef_sum2_inverse_sum, * 'col_coef_mean2_inverse_sum': col_coef_mean2_inverse_sum, # <<<<<<<<<<<<<< * 'col_coef_std2_inverse_sum': col_coef_std2_inverse_sum, * 'col_coef_max2_inverse_sum': col_coef_max2_inverse_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_mean2_inverse_sum, ((PyObject *)__pyx_v_col_coef_mean2_inverse_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4946 * 'col_coef_sum2_inverse_sum': col_coef_sum2_inverse_sum, * 'col_coef_mean2_inverse_sum': col_coef_mean2_inverse_sum, * 'col_coef_std2_inverse_sum': col_coef_std2_inverse_sum, # <<<<<<<<<<<<<< * 'col_coef_max2_inverse_sum': col_coef_max2_inverse_sum, * 'col_coef_min2_inverse_sum': col_coef_min2_inverse_sum, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_std2_inverse_sum, ((PyObject *)__pyx_v_col_coef_std2_inverse_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4947 * 'col_coef_mean2_inverse_sum': col_coef_mean2_inverse_sum, * 'col_coef_std2_inverse_sum': col_coef_std2_inverse_sum, * 'col_coef_max2_inverse_sum': col_coef_max2_inverse_sum, # <<<<<<<<<<<<<< * 'col_coef_min2_inverse_sum': col_coef_min2_inverse_sum, * 'col_coef_sum3_dual_cost': col_coef_sum3_dual_cost, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_max2_inverse_sum, ((PyObject *)__pyx_v_col_coef_max2_inverse_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4948 * 'col_coef_std2_inverse_sum': col_coef_std2_inverse_sum, * 'col_coef_max2_inverse_sum': col_coef_max2_inverse_sum, * 'col_coef_min2_inverse_sum': col_coef_min2_inverse_sum, # <<<<<<<<<<<<<< * 'col_coef_sum3_dual_cost': col_coef_sum3_dual_cost, * 'col_coef_mean3_dual_cost': col_coef_mean3_dual_cost, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_min2_inverse_sum, ((PyObject *)__pyx_v_col_coef_min2_inverse_sum)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4949 * 'col_coef_max2_inverse_sum': col_coef_max2_inverse_sum, * 'col_coef_min2_inverse_sum': col_coef_min2_inverse_sum, * 'col_coef_sum3_dual_cost': col_coef_sum3_dual_cost, # <<<<<<<<<<<<<< * 'col_coef_mean3_dual_cost': col_coef_mean3_dual_cost, * 'col_coef_std3_dual_cost': col_coef_std3_dual_cost, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_sum3_dual_cost, ((PyObject *)__pyx_v_col_coef_sum3_dual_cost)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4950 * 'col_coef_min2_inverse_sum': col_coef_min2_inverse_sum, * 'col_coef_sum3_dual_cost': col_coef_sum3_dual_cost, * 'col_coef_mean3_dual_cost': col_coef_mean3_dual_cost, # <<<<<<<<<<<<<< * 'col_coef_std3_dual_cost': col_coef_std3_dual_cost, * 'col_coef_max3_dual_cost': col_coef_max3_dual_cost, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_mean3_dual_cost, ((PyObject *)__pyx_v_col_coef_mean3_dual_cost)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4951 * 'col_coef_sum3_dual_cost': col_coef_sum3_dual_cost, * 'col_coef_mean3_dual_cost': col_coef_mean3_dual_cost, * 'col_coef_std3_dual_cost': col_coef_std3_dual_cost, # <<<<<<<<<<<<<< * 'col_coef_max3_dual_cost': col_coef_max3_dual_cost, * 'col_coef_min3_dual_cost': col_coef_min3_dual_cost, */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_std3_dual_cost, ((PyObject *)__pyx_v_col_coef_std3_dual_cost)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4952 * 'col_coef_mean3_dual_cost': col_coef_mean3_dual_cost, * 'col_coef_std3_dual_cost': col_coef_std3_dual_cost, * 'col_coef_max3_dual_cost': col_coef_max3_dual_cost, # <<<<<<<<<<<<<< * 'col_coef_min3_dual_cost': col_coef_min3_dual_cost, * } */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_max3_dual_cost, ((PyObject *)__pyx_v_col_coef_max3_dual_cost)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) /* "pyscipopt/scip.pyx":4953 * 'col_coef_std3_dual_cost': col_coef_std3_dual_cost, * 'col_coef_max3_dual_cost': col_coef_max3_dual_cost, * 'col_coef_min3_dual_cost': col_coef_min3_dual_cost, # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_col_coef_min3_dual_cost, ((PyObject *)__pyx_v_col_coef_min3_dual_cost)) < 0) __PYX_ERR(3, 4893, __pyx_L1_error) __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":4476 * * * def getDingStateCols(self): # <<<<<<<<<<<<<< * * cdef np.ndarray[np.int32_t, ndim=1] col_type_binary */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_type_int.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w3.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getDingStateCols", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_cdeg_std.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_max3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_mean3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_min3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_std3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum1_unit_weight.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum2_inverse_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coef_sum3_dual_cost.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs_neg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_coefs_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_lbs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_std.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ncoefs_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ndown_locks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nlhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nlhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nrhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nrhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_nup_locks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_std.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_pcoefs_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_plhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_plhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_prhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_prhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_down.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_product.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ps_up.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_red_costs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_frac_down.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_frac_up.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_sol_isfrac.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_solvals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_type_binary.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_type_int.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ubs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_w3.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_col_type_binary); __Pyx_XDECREF((PyObject *)__pyx_v_col_type_int); __Pyx_XDECREF((PyObject *)__pyx_v_col_coefs); __Pyx_XDECREF((PyObject *)__pyx_v_col_coefs_pos); __Pyx_XDECREF((PyObject *)__pyx_v_col_coefs_neg); __Pyx_XDECREF((PyObject *)__pyx_v_col_nnzrs); __Pyx_XDECREF((PyObject *)__pyx_v_col_nup_locks); __Pyx_XDECREF((PyObject *)__pyx_v_col_ndown_locks); __Pyx_XDECREF((PyObject *)__pyx_v_col_solvals); __Pyx_XDECREF((PyObject *)__pyx_v_col_sol_frac_up); __Pyx_XDECREF((PyObject *)__pyx_v_col_sol_frac_down); __Pyx_XDECREF((PyObject *)__pyx_v_col_sol_isfrac); __Pyx_XDECREF((PyObject *)__pyx_v_col_ps_up); __Pyx_XDECREF((PyObject *)__pyx_v_col_ps_down); __Pyx_XDECREF((PyObject *)__pyx_v_col_ps_ratio); __Pyx_XDECREF((PyObject *)__pyx_v_col_ps_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_ps_product); __Pyx_XDECREF((PyObject *)__pyx_v_col_lbs); __Pyx_XDECREF((PyObject *)__pyx_v_col_ubs); __Pyx_XDECREF((PyObject *)__pyx_v_col_red_costs); __Pyx_XDECREF((PyObject *)__pyx_v_col_cdeg_mean); __Pyx_XDECREF((PyObject *)__pyx_v_col_cdeg_std); __Pyx_XDECREF((PyObject *)__pyx_v_col_cdeg_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_cdeg_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_prhs_ratio_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_prhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_nrhs_ratio_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_nrhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_plhs_ratio_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_plhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_nlhs_ratio_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_nlhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_pcoefs_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_pcoefs_mean); __Pyx_XDECREF((PyObject *)__pyx_v_col_pcoefs_std); __Pyx_XDECREF((PyObject *)__pyx_v_col_pcoefs_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_pcoefs_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_ncoefs_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_ncoefs_mean); __Pyx_XDECREF((PyObject *)__pyx_v_col_ncoefs_std); __Pyx_XDECREF((PyObject *)__pyx_v_col_ncoefs_min); __Pyx_XDECREF((PyObject *)__pyx_v_col_ncoefs_max); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_sum1_unit_weight); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_mean1_unit_weight); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_std1_unit_weight); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_max1_unit_weight); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_min1_unit_weight); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_sum2_inverse_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_mean2_inverse_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_std2_inverse_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_max2_inverse_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_min2_inverse_sum); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_sum3_dual_cost); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_mean3_dual_cost); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_std3_dual_cost); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_max3_dual_cost); __Pyx_XDECREF((PyObject *)__pyx_v_col_coef_min3_dual_cost); __Pyx_XDECREF(__pyx_v_solval); __Pyx_XDECREF(__pyx_v_prhs_ratio_max); __Pyx_XDECREF(__pyx_v_prhs_ratio_min); __Pyx_XDECREF(__pyx_v_nrhs_ratio_max); __Pyx_XDECREF(__pyx_v_nrhs_ratio_min); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF((PyObject *)__pyx_v_cons_w1); __Pyx_XDECREF((PyObject *)__pyx_v_cons_w2); __Pyx_XDECREF((PyObject *)__pyx_v_cons_w3); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":4956 * } * * def getKhalilState(self, root_info, candidates): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_511getKhalilState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_511getKhalilState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_root_info = 0; PyObject *__pyx_v_candidates = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKhalilState (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root_info,&__pyx_n_s_candidates,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root_info)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_candidates)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getKhalilState", 1, 2, 2, 1); __PYX_ERR(3, 4956, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getKhalilState") < 0)) __PYX_ERR(3, 4956, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_root_info = values[0]; __pyx_v_candidates = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getKhalilState", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4956, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.getKhalilState", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_510getKhalilState(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_root_info, __pyx_v_candidates); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_510getKhalilState(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_root_info, PyObject *__pyx_v_candidates) { SCIP *__pyx_v_scip; PyArrayObject *__pyx_v_cand_coefs = 0; PyArrayObject *__pyx_v_cand_coefs_pos = 0; PyArrayObject *__pyx_v_cand_coefs_neg = 0; PyArrayObject *__pyx_v_cand_nnzrs = 0; PyArrayObject *__pyx_v_cand_root_cdeg_mean = 0; PyArrayObject *__pyx_v_cand_root_cdeg_var = 0; PyArrayObject *__pyx_v_cand_root_cdeg_min = 0; PyArrayObject *__pyx_v_cand_root_cdeg_max = 0; PyArrayObject *__pyx_v_cand_root_pcoefs_count = 0; PyArrayObject *__pyx_v_cand_root_pcoefs_mean = 0; PyArrayObject *__pyx_v_cand_root_pcoefs_var = 0; PyArrayObject *__pyx_v_cand_root_pcoefs_min = 0; PyArrayObject *__pyx_v_cand_root_pcoefs_max = 0; PyArrayObject *__pyx_v_cand_root_ncoefs_count = 0; PyArrayObject *__pyx_v_cand_root_ncoefs_mean = 0; PyArrayObject *__pyx_v_cand_root_ncoefs_var = 0; PyArrayObject *__pyx_v_cand_root_ncoefs_min = 0; PyArrayObject *__pyx_v_cand_root_ncoefs_max = 0; PyArrayObject *__pyx_v_cand_slack = 0; PyArrayObject *__pyx_v_cand_ps_up = 0; PyArrayObject *__pyx_v_cand_ps_down = 0; PyArrayObject *__pyx_v_cand_ps_ratio = 0; PyArrayObject *__pyx_v_cand_ps_sum = 0; PyArrayObject *__pyx_v_cand_ps_product = 0; PyArrayObject *__pyx_v_cand_nb_up_infeas = 0; PyArrayObject *__pyx_v_cand_nb_down_infeas = 0; PyArrayObject *__pyx_v_cand_cdeg_mean = 0; PyArrayObject *__pyx_v_cand_cdeg_var = 0; PyArrayObject *__pyx_v_cand_cdeg_min = 0; PyArrayObject *__pyx_v_cand_cdeg_max = 0; PyArrayObject *__pyx_v_cand_cdeg_mean_ratio = 0; PyArrayObject *__pyx_v_cand_cdeg_min_ratio = 0; PyArrayObject *__pyx_v_cand_cdeg_max_ratio = 0; PyArrayObject *__pyx_v_cand_prhs_ratio_max = 0; PyArrayObject *__pyx_v_cand_prhs_ratio_min = 0; PyArrayObject *__pyx_v_cand_nrhs_ratio_max = 0; PyArrayObject *__pyx_v_cand_nrhs_ratio_min = 0; PyArrayObject *__pyx_v_cand_ota_pp_max = 0; PyArrayObject *__pyx_v_cand_ota_pp_min = 0; PyArrayObject *__pyx_v_cand_ota_pn_max = 0; PyArrayObject *__pyx_v_cand_ota_pn_min = 0; PyArrayObject *__pyx_v_cand_ota_np_max = 0; PyArrayObject *__pyx_v_cand_ota_np_min = 0; PyArrayObject *__pyx_v_cand_ota_nn_max = 0; PyArrayObject *__pyx_v_cand_ota_nn_min = 0; PyArrayObject *__pyx_v_cand_acons_sum1 = 0; PyArrayObject *__pyx_v_cand_acons_mean1 = 0; PyArrayObject *__pyx_v_cand_acons_var1 = 0; PyArrayObject *__pyx_v_cand_acons_max1 = 0; PyArrayObject *__pyx_v_cand_acons_min1 = 0; PyArrayObject *__pyx_v_cand_acons_sum2 = 0; PyArrayObject *__pyx_v_cand_acons_mean2 = 0; PyArrayObject *__pyx_v_cand_acons_var2 = 0; PyArrayObject *__pyx_v_cand_acons_max2 = 0; PyArrayObject *__pyx_v_cand_acons_min2 = 0; PyArrayObject *__pyx_v_cand_acons_sum3 = 0; PyArrayObject *__pyx_v_cand_acons_mean3 = 0; PyArrayObject *__pyx_v_cand_acons_var3 = 0; PyArrayObject *__pyx_v_cand_acons_max3 = 0; PyArrayObject *__pyx_v_cand_acons_min3 = 0; PyArrayObject *__pyx_v_cand_acons_sum4 = 0; PyArrayObject *__pyx_v_cand_acons_mean4 = 0; PyArrayObject *__pyx_v_cand_acons_var4 = 0; PyArrayObject *__pyx_v_cand_acons_max4 = 0; PyArrayObject *__pyx_v_cand_acons_min4 = 0; PyArrayObject *__pyx_v_cand_acons_nb1 = 0; PyArrayObject *__pyx_v_cand_acons_nb2 = 0; PyArrayObject *__pyx_v_cand_acons_nb3 = 0; PyArrayObject *__pyx_v_cand_acons_nb4 = 0; int __pyx_v_ncands; PyObject *__pyx_v_cand_solfracs = NULL; PyObject *__pyx_v_cand_frac_up_infeas = NULL; PyObject *__pyx_v_cand_frac_down_infeas = NULL; SCIP_COL **__pyx_v_cols; int __pyx_v_ncols; int __pyx_v_i; int __pyx_v_cand_i; int __pyx_v_col_i; SCIP_ROW **__pyx_v_neighbors; SCIP_Real *__pyx_v_nonzero_coefs_raw; SCIP_Real *__pyx_v_all_coefs_raw; SCIP_Real __pyx_v_activity; SCIP_Real __pyx_v_lhs; SCIP_Real __pyx_v_rhs; SCIP_Real __pyx_v_coef; SCIP_VAR *__pyx_v_var; SCIP_COL *__pyx_v_col; int __pyx_v_neighbor_index; int __pyx_v_cdeg_max; int __pyx_v_cdeg_min; int __pyx_v_cdeg; int __pyx_v_nb_neighbors; float __pyx_v_cdeg_mean; float __pyx_v_cdeg_var; int __pyx_v_pcoefs_count; int __pyx_v_ncoefs_count; float __pyx_v_pcoefs_var; float __pyx_v_pcoefs_mean; float __pyx_v_pcoefs_min; float __pyx_v_pcoefs_max; float __pyx_v_ncoefs_var; float __pyx_v_ncoefs_mean; float __pyx_v_ncoefs_min; float __pyx_v_ncoefs_max; int __pyx_v_neighbor_column_index; int __pyx_v_neighbor_ncolumns; float __pyx_v_solval; float __pyx_v_pos_coef_sum; float __pyx_v_neg_coef_sum; float __pyx_v_neighbor_coef; float __pyx_v_ota_pp_max; float __pyx_v_ota_pp_min; float __pyx_v_ota_pn_max; float __pyx_v_ota_pn_min; float __pyx_v_ota_np_max; float __pyx_v_ota_np_min; float __pyx_v_ota_nn_max; float __pyx_v_ota_nn_min; float __pyx_v_prhs_ratio_max; float __pyx_v_prhs_ratio_min; float __pyx_v_nrhs_ratio_max; float __pyx_v_nrhs_ratio_min; float __pyx_v_value; float __pyx_v_pratio; float __pyx_v_nratio; SCIP_VAR *__pyx_v_neighbor_var; SCIP_Real *__pyx_v_neighbor_columns_values; int __pyx_v_nbranchings; CYTHON_UNUSED PyObject *__pyx_v_rhs_ratio_max = NULL; CYTHON_UNUSED PyObject *__pyx_v_rhs_ratio_min = NULL; int __pyx_v_row_index; int __pyx_v_nrows; SCIP_ROW **__pyx_v_rows; float __pyx_v_constraint_sum; float __pyx_v_abs_coef; SCIP_COL **__pyx_v_neighbor_columns; int __pyx_v_neighbor_var_index; int __pyx_v_active_count; float __pyx_v_acons_sum1; float __pyx_v_acons_mean1; float __pyx_v_acons_var1; float __pyx_v_acons_max1; float __pyx_v_acons_min1; float __pyx_v_acons_sum2; float __pyx_v_acons_mean2; float __pyx_v_acons_var2; float __pyx_v_acons_max2; float __pyx_v_acons_min2; float __pyx_v_acons_sum3; float __pyx_v_acons_mean3; float __pyx_v_acons_var3; float __pyx_v_acons_max3; float __pyx_v_acons_min3; float __pyx_v_acons_sum4; float __pyx_v_acons_mean4; float __pyx_v_acons_var4; float __pyx_v_acons_max4; float __pyx_v_acons_min4; float __pyx_v_acons_nb1; float __pyx_v_acons_nb2; float __pyx_v_acons_nb3; float __pyx_v_acons_nb4; PyArrayObject *__pyx_v_act_cons_w1 = 0; PyArrayObject *__pyx_v_act_cons_w2 = 0; PyArrayObject *__pyx_v_act_cons_w3 = 0; PyArrayObject *__pyx_v_act_cons_w4 = 0; SCIP_ROW *__pyx_v_row; int __pyx_v_neighbor_row_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_act_cons_w1; __Pyx_Buffer __pyx_pybuffer_act_cons_w1; __Pyx_LocalBuf_ND __pyx_pybuffernd_act_cons_w2; __Pyx_Buffer __pyx_pybuffer_act_cons_w2; __Pyx_LocalBuf_ND __pyx_pybuffernd_act_cons_w3; __Pyx_Buffer __pyx_pybuffer_act_cons_w3; __Pyx_LocalBuf_ND __pyx_pybuffernd_act_cons_w4; __Pyx_Buffer __pyx_pybuffer_act_cons_w4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_max1; __Pyx_Buffer __pyx_pybuffer_cand_acons_max1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_max2; __Pyx_Buffer __pyx_pybuffer_cand_acons_max2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_max3; __Pyx_Buffer __pyx_pybuffer_cand_acons_max3; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_max4; __Pyx_Buffer __pyx_pybuffer_cand_acons_max4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_mean1; __Pyx_Buffer __pyx_pybuffer_cand_acons_mean1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_mean2; __Pyx_Buffer __pyx_pybuffer_cand_acons_mean2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_mean3; __Pyx_Buffer __pyx_pybuffer_cand_acons_mean3; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_mean4; __Pyx_Buffer __pyx_pybuffer_cand_acons_mean4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_min1; __Pyx_Buffer __pyx_pybuffer_cand_acons_min1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_min2; __Pyx_Buffer __pyx_pybuffer_cand_acons_min2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_min3; __Pyx_Buffer __pyx_pybuffer_cand_acons_min3; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_min4; __Pyx_Buffer __pyx_pybuffer_cand_acons_min4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_nb1; __Pyx_Buffer __pyx_pybuffer_cand_acons_nb1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_nb2; __Pyx_Buffer __pyx_pybuffer_cand_acons_nb2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_nb3; __Pyx_Buffer __pyx_pybuffer_cand_acons_nb3; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_nb4; __Pyx_Buffer __pyx_pybuffer_cand_acons_nb4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_sum1; __Pyx_Buffer __pyx_pybuffer_cand_acons_sum1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_sum2; __Pyx_Buffer __pyx_pybuffer_cand_acons_sum2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_sum3; __Pyx_Buffer __pyx_pybuffer_cand_acons_sum3; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_sum4; __Pyx_Buffer __pyx_pybuffer_cand_acons_sum4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_var1; __Pyx_Buffer __pyx_pybuffer_cand_acons_var1; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_var2; __Pyx_Buffer __pyx_pybuffer_cand_acons_var2; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_var3; __Pyx_Buffer __pyx_pybuffer_cand_acons_var3; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_acons_var4; __Pyx_Buffer __pyx_pybuffer_cand_acons_var4; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_max; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_max_ratio; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_max_ratio; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_mean; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_mean_ratio; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_mean_ratio; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_min; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_min_ratio; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_min_ratio; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_cdeg_var; __Pyx_Buffer __pyx_pybuffer_cand_cdeg_var; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_coefs; __Pyx_Buffer __pyx_pybuffer_cand_coefs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_coefs_neg; __Pyx_Buffer __pyx_pybuffer_cand_coefs_neg; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_coefs_pos; __Pyx_Buffer __pyx_pybuffer_cand_coefs_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_nb_down_infeas; __Pyx_Buffer __pyx_pybuffer_cand_nb_down_infeas; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_nb_up_infeas; __Pyx_Buffer __pyx_pybuffer_cand_nb_up_infeas; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_nnzrs; __Pyx_Buffer __pyx_pybuffer_cand_nnzrs; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_nrhs_ratio_max; __Pyx_Buffer __pyx_pybuffer_cand_nrhs_ratio_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_nrhs_ratio_min; __Pyx_Buffer __pyx_pybuffer_cand_nrhs_ratio_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_nn_max; __Pyx_Buffer __pyx_pybuffer_cand_ota_nn_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_nn_min; __Pyx_Buffer __pyx_pybuffer_cand_ota_nn_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_np_max; __Pyx_Buffer __pyx_pybuffer_cand_ota_np_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_np_min; __Pyx_Buffer __pyx_pybuffer_cand_ota_np_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_pn_max; __Pyx_Buffer __pyx_pybuffer_cand_ota_pn_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_pn_min; __Pyx_Buffer __pyx_pybuffer_cand_ota_pn_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_pp_max; __Pyx_Buffer __pyx_pybuffer_cand_ota_pp_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ota_pp_min; __Pyx_Buffer __pyx_pybuffer_cand_ota_pp_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_prhs_ratio_max; __Pyx_Buffer __pyx_pybuffer_cand_prhs_ratio_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_prhs_ratio_min; __Pyx_Buffer __pyx_pybuffer_cand_prhs_ratio_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ps_down; __Pyx_Buffer __pyx_pybuffer_cand_ps_down; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ps_product; __Pyx_Buffer __pyx_pybuffer_cand_ps_product; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ps_ratio; __Pyx_Buffer __pyx_pybuffer_cand_ps_ratio; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ps_sum; __Pyx_Buffer __pyx_pybuffer_cand_ps_sum; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_ps_up; __Pyx_Buffer __pyx_pybuffer_cand_ps_up; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_cdeg_max; __Pyx_Buffer __pyx_pybuffer_cand_root_cdeg_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_cdeg_mean; __Pyx_Buffer __pyx_pybuffer_cand_root_cdeg_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_cdeg_min; __Pyx_Buffer __pyx_pybuffer_cand_root_cdeg_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_cdeg_var; __Pyx_Buffer __pyx_pybuffer_cand_root_cdeg_var; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_ncoefs_count; __Pyx_Buffer __pyx_pybuffer_cand_root_ncoefs_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_ncoefs_max; __Pyx_Buffer __pyx_pybuffer_cand_root_ncoefs_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_ncoefs_mean; __Pyx_Buffer __pyx_pybuffer_cand_root_ncoefs_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_ncoefs_min; __Pyx_Buffer __pyx_pybuffer_cand_root_ncoefs_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_ncoefs_var; __Pyx_Buffer __pyx_pybuffer_cand_root_ncoefs_var; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_pcoefs_count; __Pyx_Buffer __pyx_pybuffer_cand_root_pcoefs_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_pcoefs_max; __Pyx_Buffer __pyx_pybuffer_cand_root_pcoefs_max; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_pcoefs_mean; __Pyx_Buffer __pyx_pybuffer_cand_root_pcoefs_mean; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_pcoefs_min; __Pyx_Buffer __pyx_pybuffer_cand_root_pcoefs_min; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_root_pcoefs_var; __Pyx_Buffer __pyx_pybuffer_cand_root_pcoefs_var; __Pyx_LocalBuf_ND __pyx_pybuffernd_cand_slack; __Pyx_Buffer __pyx_pybuffer_cand_slack; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; PyArrayObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; PyArrayObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; PyArrayObject *__pyx_t_22 = NULL; PyArrayObject *__pyx_t_23 = NULL; PyArrayObject *__pyx_t_24 = NULL; PyArrayObject *__pyx_t_25 = NULL; PyArrayObject *__pyx_t_26 = NULL; PyArrayObject *__pyx_t_27 = NULL; PyArrayObject *__pyx_t_28 = NULL; PyArrayObject *__pyx_t_29 = NULL; PyArrayObject *__pyx_t_30 = NULL; PyArrayObject *__pyx_t_31 = NULL; PyArrayObject *__pyx_t_32 = NULL; PyArrayObject *__pyx_t_33 = NULL; PyArrayObject *__pyx_t_34 = NULL; PyArrayObject *__pyx_t_35 = NULL; PyArrayObject *__pyx_t_36 = NULL; PyArrayObject *__pyx_t_37 = NULL; PyArrayObject *__pyx_t_38 = NULL; PyArrayObject *__pyx_t_39 = NULL; PyArrayObject *__pyx_t_40 = NULL; PyArrayObject *__pyx_t_41 = NULL; PyArrayObject *__pyx_t_42 = NULL; PyArrayObject *__pyx_t_43 = NULL; PyArrayObject *__pyx_t_44 = NULL; PyArrayObject *__pyx_t_45 = NULL; PyArrayObject *__pyx_t_46 = NULL; PyArrayObject *__pyx_t_47 = NULL; PyArrayObject *__pyx_t_48 = NULL; PyArrayObject *__pyx_t_49 = NULL; PyArrayObject *__pyx_t_50 = NULL; PyArrayObject *__pyx_t_51 = NULL; PyArrayObject *__pyx_t_52 = NULL; PyArrayObject *__pyx_t_53 = NULL; PyArrayObject *__pyx_t_54 = NULL; PyArrayObject *__pyx_t_55 = NULL; PyArrayObject *__pyx_t_56 = NULL; PyArrayObject *__pyx_t_57 = NULL; PyArrayObject *__pyx_t_58 = NULL; PyArrayObject *__pyx_t_59 = NULL; PyArrayObject *__pyx_t_60 = NULL; PyArrayObject *__pyx_t_61 = NULL; PyArrayObject *__pyx_t_62 = NULL; PyArrayObject *__pyx_t_63 = NULL; PyArrayObject *__pyx_t_64 = NULL; PyArrayObject *__pyx_t_65 = NULL; PyArrayObject *__pyx_t_66 = NULL; PyArrayObject *__pyx_t_67 = NULL; PyArrayObject *__pyx_t_68 = NULL; PyArrayObject *__pyx_t_69 = NULL; PyArrayObject *__pyx_t_70 = NULL; PyArrayObject *__pyx_t_71 = NULL; PyArrayObject *__pyx_t_72 = NULL; PyArrayObject *__pyx_t_73 = NULL; PyArrayObject *__pyx_t_74 = NULL; PyArrayObject *__pyx_t_75 = NULL; PyArrayObject *__pyx_t_76 = NULL; PyArrayObject *__pyx_t_77 = NULL; PyArrayObject *__pyx_t_78 = NULL; PyArrayObject *__pyx_t_79 = NULL; int __pyx_t_80; int __pyx_t_81; int __pyx_t_82; long __pyx_t_83; float __pyx_t_84; float __pyx_t_85; int __pyx_t_86; int __pyx_t_87; int __pyx_t_88; int __pyx_t_89; int __pyx_t_90; int __pyx_t_91; int __pyx_t_92; float __pyx_t_93; double __pyx_t_94; SCIP_Real __pyx_t_95; SCIP_Real __pyx_t_96; SCIP_Real __pyx_t_97; SCIP_VAR *__pyx_t_98; __pyx_t_5numpy_float32_t __pyx_t_99; Py_ssize_t __pyx_t_100; __pyx_t_5numpy_int32_t __pyx_t_101; Py_ssize_t __pyx_t_102; Py_ssize_t __pyx_t_103; __pyx_t_5numpy_float32_t __pyx_t_104; __pyx_t_5numpy_float32_t __pyx_t_105; float __pyx_t_106; PyArrayObject *__pyx_t_107 = NULL; int __pyx_t_108; float __pyx_t_109; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKhalilState", 0); __pyx_pybuffer_cand_coefs.pybuffer.buf = NULL; __pyx_pybuffer_cand_coefs.refcount = 0; __pyx_pybuffernd_cand_coefs.data = NULL; __pyx_pybuffernd_cand_coefs.rcbuffer = &__pyx_pybuffer_cand_coefs; __pyx_pybuffer_cand_coefs_pos.pybuffer.buf = NULL; __pyx_pybuffer_cand_coefs_pos.refcount = 0; __pyx_pybuffernd_cand_coefs_pos.data = NULL; __pyx_pybuffernd_cand_coefs_pos.rcbuffer = &__pyx_pybuffer_cand_coefs_pos; __pyx_pybuffer_cand_coefs_neg.pybuffer.buf = NULL; __pyx_pybuffer_cand_coefs_neg.refcount = 0; __pyx_pybuffernd_cand_coefs_neg.data = NULL; __pyx_pybuffernd_cand_coefs_neg.rcbuffer = &__pyx_pybuffer_cand_coefs_neg; __pyx_pybuffer_cand_nnzrs.pybuffer.buf = NULL; __pyx_pybuffer_cand_nnzrs.refcount = 0; __pyx_pybuffernd_cand_nnzrs.data = NULL; __pyx_pybuffernd_cand_nnzrs.rcbuffer = &__pyx_pybuffer_cand_nnzrs; __pyx_pybuffer_cand_root_cdeg_mean.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_cdeg_mean.refcount = 0; __pyx_pybuffernd_cand_root_cdeg_mean.data = NULL; __pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer = &__pyx_pybuffer_cand_root_cdeg_mean; __pyx_pybuffer_cand_root_cdeg_var.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_cdeg_var.refcount = 0; __pyx_pybuffernd_cand_root_cdeg_var.data = NULL; __pyx_pybuffernd_cand_root_cdeg_var.rcbuffer = &__pyx_pybuffer_cand_root_cdeg_var; __pyx_pybuffer_cand_root_cdeg_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_cdeg_min.refcount = 0; __pyx_pybuffernd_cand_root_cdeg_min.data = NULL; __pyx_pybuffernd_cand_root_cdeg_min.rcbuffer = &__pyx_pybuffer_cand_root_cdeg_min; __pyx_pybuffer_cand_root_cdeg_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_cdeg_max.refcount = 0; __pyx_pybuffernd_cand_root_cdeg_max.data = NULL; __pyx_pybuffernd_cand_root_cdeg_max.rcbuffer = &__pyx_pybuffer_cand_root_cdeg_max; __pyx_pybuffer_cand_root_pcoefs_count.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_pcoefs_count.refcount = 0; __pyx_pybuffernd_cand_root_pcoefs_count.data = NULL; __pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer = &__pyx_pybuffer_cand_root_pcoefs_count; __pyx_pybuffer_cand_root_pcoefs_mean.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_pcoefs_mean.refcount = 0; __pyx_pybuffernd_cand_root_pcoefs_mean.data = NULL; __pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer = &__pyx_pybuffer_cand_root_pcoefs_mean; __pyx_pybuffer_cand_root_pcoefs_var.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_pcoefs_var.refcount = 0; __pyx_pybuffernd_cand_root_pcoefs_var.data = NULL; __pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer = &__pyx_pybuffer_cand_root_pcoefs_var; __pyx_pybuffer_cand_root_pcoefs_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_pcoefs_min.refcount = 0; __pyx_pybuffernd_cand_root_pcoefs_min.data = NULL; __pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer = &__pyx_pybuffer_cand_root_pcoefs_min; __pyx_pybuffer_cand_root_pcoefs_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_pcoefs_max.refcount = 0; __pyx_pybuffernd_cand_root_pcoefs_max.data = NULL; __pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer = &__pyx_pybuffer_cand_root_pcoefs_max; __pyx_pybuffer_cand_root_ncoefs_count.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_ncoefs_count.refcount = 0; __pyx_pybuffernd_cand_root_ncoefs_count.data = NULL; __pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer = &__pyx_pybuffer_cand_root_ncoefs_count; __pyx_pybuffer_cand_root_ncoefs_mean.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_ncoefs_mean.refcount = 0; __pyx_pybuffernd_cand_root_ncoefs_mean.data = NULL; __pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer = &__pyx_pybuffer_cand_root_ncoefs_mean; __pyx_pybuffer_cand_root_ncoefs_var.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_ncoefs_var.refcount = 0; __pyx_pybuffernd_cand_root_ncoefs_var.data = NULL; __pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer = &__pyx_pybuffer_cand_root_ncoefs_var; __pyx_pybuffer_cand_root_ncoefs_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_ncoefs_min.refcount = 0; __pyx_pybuffernd_cand_root_ncoefs_min.data = NULL; __pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer = &__pyx_pybuffer_cand_root_ncoefs_min; __pyx_pybuffer_cand_root_ncoefs_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_root_ncoefs_max.refcount = 0; __pyx_pybuffernd_cand_root_ncoefs_max.data = NULL; __pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer = &__pyx_pybuffer_cand_root_ncoefs_max; __pyx_pybuffer_cand_slack.pybuffer.buf = NULL; __pyx_pybuffer_cand_slack.refcount = 0; __pyx_pybuffernd_cand_slack.data = NULL; __pyx_pybuffernd_cand_slack.rcbuffer = &__pyx_pybuffer_cand_slack; __pyx_pybuffer_cand_ps_up.pybuffer.buf = NULL; __pyx_pybuffer_cand_ps_up.refcount = 0; __pyx_pybuffernd_cand_ps_up.data = NULL; __pyx_pybuffernd_cand_ps_up.rcbuffer = &__pyx_pybuffer_cand_ps_up; __pyx_pybuffer_cand_ps_down.pybuffer.buf = NULL; __pyx_pybuffer_cand_ps_down.refcount = 0; __pyx_pybuffernd_cand_ps_down.data = NULL; __pyx_pybuffernd_cand_ps_down.rcbuffer = &__pyx_pybuffer_cand_ps_down; __pyx_pybuffer_cand_ps_ratio.pybuffer.buf = NULL; __pyx_pybuffer_cand_ps_ratio.refcount = 0; __pyx_pybuffernd_cand_ps_ratio.data = NULL; __pyx_pybuffernd_cand_ps_ratio.rcbuffer = &__pyx_pybuffer_cand_ps_ratio; __pyx_pybuffer_cand_ps_sum.pybuffer.buf = NULL; __pyx_pybuffer_cand_ps_sum.refcount = 0; __pyx_pybuffernd_cand_ps_sum.data = NULL; __pyx_pybuffernd_cand_ps_sum.rcbuffer = &__pyx_pybuffer_cand_ps_sum; __pyx_pybuffer_cand_ps_product.pybuffer.buf = NULL; __pyx_pybuffer_cand_ps_product.refcount = 0; __pyx_pybuffernd_cand_ps_product.data = NULL; __pyx_pybuffernd_cand_ps_product.rcbuffer = &__pyx_pybuffer_cand_ps_product; __pyx_pybuffer_cand_nb_up_infeas.pybuffer.buf = NULL; __pyx_pybuffer_cand_nb_up_infeas.refcount = 0; __pyx_pybuffernd_cand_nb_up_infeas.data = NULL; __pyx_pybuffernd_cand_nb_up_infeas.rcbuffer = &__pyx_pybuffer_cand_nb_up_infeas; __pyx_pybuffer_cand_nb_down_infeas.pybuffer.buf = NULL; __pyx_pybuffer_cand_nb_down_infeas.refcount = 0; __pyx_pybuffernd_cand_nb_down_infeas.data = NULL; __pyx_pybuffernd_cand_nb_down_infeas.rcbuffer = &__pyx_pybuffer_cand_nb_down_infeas; __pyx_pybuffer_cand_cdeg_mean.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_mean.refcount = 0; __pyx_pybuffernd_cand_cdeg_mean.data = NULL; __pyx_pybuffernd_cand_cdeg_mean.rcbuffer = &__pyx_pybuffer_cand_cdeg_mean; __pyx_pybuffer_cand_cdeg_var.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_var.refcount = 0; __pyx_pybuffernd_cand_cdeg_var.data = NULL; __pyx_pybuffernd_cand_cdeg_var.rcbuffer = &__pyx_pybuffer_cand_cdeg_var; __pyx_pybuffer_cand_cdeg_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_min.refcount = 0; __pyx_pybuffernd_cand_cdeg_min.data = NULL; __pyx_pybuffernd_cand_cdeg_min.rcbuffer = &__pyx_pybuffer_cand_cdeg_min; __pyx_pybuffer_cand_cdeg_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_max.refcount = 0; __pyx_pybuffernd_cand_cdeg_max.data = NULL; __pyx_pybuffernd_cand_cdeg_max.rcbuffer = &__pyx_pybuffer_cand_cdeg_max; __pyx_pybuffer_cand_cdeg_mean_ratio.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_mean_ratio.refcount = 0; __pyx_pybuffernd_cand_cdeg_mean_ratio.data = NULL; __pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer = &__pyx_pybuffer_cand_cdeg_mean_ratio; __pyx_pybuffer_cand_cdeg_min_ratio.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_min_ratio.refcount = 0; __pyx_pybuffernd_cand_cdeg_min_ratio.data = NULL; __pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer = &__pyx_pybuffer_cand_cdeg_min_ratio; __pyx_pybuffer_cand_cdeg_max_ratio.pybuffer.buf = NULL; __pyx_pybuffer_cand_cdeg_max_ratio.refcount = 0; __pyx_pybuffernd_cand_cdeg_max_ratio.data = NULL; __pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer = &__pyx_pybuffer_cand_cdeg_max_ratio; __pyx_pybuffer_cand_prhs_ratio_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_prhs_ratio_max.refcount = 0; __pyx_pybuffernd_cand_prhs_ratio_max.data = NULL; __pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer = &__pyx_pybuffer_cand_prhs_ratio_max; __pyx_pybuffer_cand_prhs_ratio_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_prhs_ratio_min.refcount = 0; __pyx_pybuffernd_cand_prhs_ratio_min.data = NULL; __pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer = &__pyx_pybuffer_cand_prhs_ratio_min; __pyx_pybuffer_cand_nrhs_ratio_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_nrhs_ratio_max.refcount = 0; __pyx_pybuffernd_cand_nrhs_ratio_max.data = NULL; __pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer = &__pyx_pybuffer_cand_nrhs_ratio_max; __pyx_pybuffer_cand_nrhs_ratio_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_nrhs_ratio_min.refcount = 0; __pyx_pybuffernd_cand_nrhs_ratio_min.data = NULL; __pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer = &__pyx_pybuffer_cand_nrhs_ratio_min; __pyx_pybuffer_cand_ota_pp_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_pp_max.refcount = 0; __pyx_pybuffernd_cand_ota_pp_max.data = NULL; __pyx_pybuffernd_cand_ota_pp_max.rcbuffer = &__pyx_pybuffer_cand_ota_pp_max; __pyx_pybuffer_cand_ota_pp_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_pp_min.refcount = 0; __pyx_pybuffernd_cand_ota_pp_min.data = NULL; __pyx_pybuffernd_cand_ota_pp_min.rcbuffer = &__pyx_pybuffer_cand_ota_pp_min; __pyx_pybuffer_cand_ota_pn_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_pn_max.refcount = 0; __pyx_pybuffernd_cand_ota_pn_max.data = NULL; __pyx_pybuffernd_cand_ota_pn_max.rcbuffer = &__pyx_pybuffer_cand_ota_pn_max; __pyx_pybuffer_cand_ota_pn_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_pn_min.refcount = 0; __pyx_pybuffernd_cand_ota_pn_min.data = NULL; __pyx_pybuffernd_cand_ota_pn_min.rcbuffer = &__pyx_pybuffer_cand_ota_pn_min; __pyx_pybuffer_cand_ota_np_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_np_max.refcount = 0; __pyx_pybuffernd_cand_ota_np_max.data = NULL; __pyx_pybuffernd_cand_ota_np_max.rcbuffer = &__pyx_pybuffer_cand_ota_np_max; __pyx_pybuffer_cand_ota_np_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_np_min.refcount = 0; __pyx_pybuffernd_cand_ota_np_min.data = NULL; __pyx_pybuffernd_cand_ota_np_min.rcbuffer = &__pyx_pybuffer_cand_ota_np_min; __pyx_pybuffer_cand_ota_nn_max.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_nn_max.refcount = 0; __pyx_pybuffernd_cand_ota_nn_max.data = NULL; __pyx_pybuffernd_cand_ota_nn_max.rcbuffer = &__pyx_pybuffer_cand_ota_nn_max; __pyx_pybuffer_cand_ota_nn_min.pybuffer.buf = NULL; __pyx_pybuffer_cand_ota_nn_min.refcount = 0; __pyx_pybuffernd_cand_ota_nn_min.data = NULL; __pyx_pybuffernd_cand_ota_nn_min.rcbuffer = &__pyx_pybuffer_cand_ota_nn_min; __pyx_pybuffer_cand_acons_sum1.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_sum1.refcount = 0; __pyx_pybuffernd_cand_acons_sum1.data = NULL; __pyx_pybuffernd_cand_acons_sum1.rcbuffer = &__pyx_pybuffer_cand_acons_sum1; __pyx_pybuffer_cand_acons_mean1.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_mean1.refcount = 0; __pyx_pybuffernd_cand_acons_mean1.data = NULL; __pyx_pybuffernd_cand_acons_mean1.rcbuffer = &__pyx_pybuffer_cand_acons_mean1; __pyx_pybuffer_cand_acons_var1.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_var1.refcount = 0; __pyx_pybuffernd_cand_acons_var1.data = NULL; __pyx_pybuffernd_cand_acons_var1.rcbuffer = &__pyx_pybuffer_cand_acons_var1; __pyx_pybuffer_cand_acons_max1.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_max1.refcount = 0; __pyx_pybuffernd_cand_acons_max1.data = NULL; __pyx_pybuffernd_cand_acons_max1.rcbuffer = &__pyx_pybuffer_cand_acons_max1; __pyx_pybuffer_cand_acons_min1.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_min1.refcount = 0; __pyx_pybuffernd_cand_acons_min1.data = NULL; __pyx_pybuffernd_cand_acons_min1.rcbuffer = &__pyx_pybuffer_cand_acons_min1; __pyx_pybuffer_cand_acons_sum2.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_sum2.refcount = 0; __pyx_pybuffernd_cand_acons_sum2.data = NULL; __pyx_pybuffernd_cand_acons_sum2.rcbuffer = &__pyx_pybuffer_cand_acons_sum2; __pyx_pybuffer_cand_acons_mean2.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_mean2.refcount = 0; __pyx_pybuffernd_cand_acons_mean2.data = NULL; __pyx_pybuffernd_cand_acons_mean2.rcbuffer = &__pyx_pybuffer_cand_acons_mean2; __pyx_pybuffer_cand_acons_var2.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_var2.refcount = 0; __pyx_pybuffernd_cand_acons_var2.data = NULL; __pyx_pybuffernd_cand_acons_var2.rcbuffer = &__pyx_pybuffer_cand_acons_var2; __pyx_pybuffer_cand_acons_max2.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_max2.refcount = 0; __pyx_pybuffernd_cand_acons_max2.data = NULL; __pyx_pybuffernd_cand_acons_max2.rcbuffer = &__pyx_pybuffer_cand_acons_max2; __pyx_pybuffer_cand_acons_min2.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_min2.refcount = 0; __pyx_pybuffernd_cand_acons_min2.data = NULL; __pyx_pybuffernd_cand_acons_min2.rcbuffer = &__pyx_pybuffer_cand_acons_min2; __pyx_pybuffer_cand_acons_sum3.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_sum3.refcount = 0; __pyx_pybuffernd_cand_acons_sum3.data = NULL; __pyx_pybuffernd_cand_acons_sum3.rcbuffer = &__pyx_pybuffer_cand_acons_sum3; __pyx_pybuffer_cand_acons_mean3.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_mean3.refcount = 0; __pyx_pybuffernd_cand_acons_mean3.data = NULL; __pyx_pybuffernd_cand_acons_mean3.rcbuffer = &__pyx_pybuffer_cand_acons_mean3; __pyx_pybuffer_cand_acons_var3.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_var3.refcount = 0; __pyx_pybuffernd_cand_acons_var3.data = NULL; __pyx_pybuffernd_cand_acons_var3.rcbuffer = &__pyx_pybuffer_cand_acons_var3; __pyx_pybuffer_cand_acons_max3.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_max3.refcount = 0; __pyx_pybuffernd_cand_acons_max3.data = NULL; __pyx_pybuffernd_cand_acons_max3.rcbuffer = &__pyx_pybuffer_cand_acons_max3; __pyx_pybuffer_cand_acons_min3.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_min3.refcount = 0; __pyx_pybuffernd_cand_acons_min3.data = NULL; __pyx_pybuffernd_cand_acons_min3.rcbuffer = &__pyx_pybuffer_cand_acons_min3; __pyx_pybuffer_cand_acons_sum4.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_sum4.refcount = 0; __pyx_pybuffernd_cand_acons_sum4.data = NULL; __pyx_pybuffernd_cand_acons_sum4.rcbuffer = &__pyx_pybuffer_cand_acons_sum4; __pyx_pybuffer_cand_acons_mean4.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_mean4.refcount = 0; __pyx_pybuffernd_cand_acons_mean4.data = NULL; __pyx_pybuffernd_cand_acons_mean4.rcbuffer = &__pyx_pybuffer_cand_acons_mean4; __pyx_pybuffer_cand_acons_var4.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_var4.refcount = 0; __pyx_pybuffernd_cand_acons_var4.data = NULL; __pyx_pybuffernd_cand_acons_var4.rcbuffer = &__pyx_pybuffer_cand_acons_var4; __pyx_pybuffer_cand_acons_max4.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_max4.refcount = 0; __pyx_pybuffernd_cand_acons_max4.data = NULL; __pyx_pybuffernd_cand_acons_max4.rcbuffer = &__pyx_pybuffer_cand_acons_max4; __pyx_pybuffer_cand_acons_min4.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_min4.refcount = 0; __pyx_pybuffernd_cand_acons_min4.data = NULL; __pyx_pybuffernd_cand_acons_min4.rcbuffer = &__pyx_pybuffer_cand_acons_min4; __pyx_pybuffer_cand_acons_nb1.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_nb1.refcount = 0; __pyx_pybuffernd_cand_acons_nb1.data = NULL; __pyx_pybuffernd_cand_acons_nb1.rcbuffer = &__pyx_pybuffer_cand_acons_nb1; __pyx_pybuffer_cand_acons_nb2.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_nb2.refcount = 0; __pyx_pybuffernd_cand_acons_nb2.data = NULL; __pyx_pybuffernd_cand_acons_nb2.rcbuffer = &__pyx_pybuffer_cand_acons_nb2; __pyx_pybuffer_cand_acons_nb3.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_nb3.refcount = 0; __pyx_pybuffernd_cand_acons_nb3.data = NULL; __pyx_pybuffernd_cand_acons_nb3.rcbuffer = &__pyx_pybuffer_cand_acons_nb3; __pyx_pybuffer_cand_acons_nb4.pybuffer.buf = NULL; __pyx_pybuffer_cand_acons_nb4.refcount = 0; __pyx_pybuffernd_cand_acons_nb4.data = NULL; __pyx_pybuffernd_cand_acons_nb4.rcbuffer = &__pyx_pybuffer_cand_acons_nb4; __pyx_pybuffer_act_cons_w1.pybuffer.buf = NULL; __pyx_pybuffer_act_cons_w1.refcount = 0; __pyx_pybuffernd_act_cons_w1.data = NULL; __pyx_pybuffernd_act_cons_w1.rcbuffer = &__pyx_pybuffer_act_cons_w1; __pyx_pybuffer_act_cons_w2.pybuffer.buf = NULL; __pyx_pybuffer_act_cons_w2.refcount = 0; __pyx_pybuffernd_act_cons_w2.data = NULL; __pyx_pybuffernd_act_cons_w2.rcbuffer = &__pyx_pybuffer_act_cons_w2; __pyx_pybuffer_act_cons_w3.pybuffer.buf = NULL; __pyx_pybuffer_act_cons_w3.refcount = 0; __pyx_pybuffernd_act_cons_w3.data = NULL; __pyx_pybuffernd_act_cons_w3.rcbuffer = &__pyx_pybuffer_act_cons_w3; __pyx_pybuffer_act_cons_w4.pybuffer.buf = NULL; __pyx_pybuffer_act_cons_w4.refcount = 0; __pyx_pybuffernd_act_cons_w4.data = NULL; __pyx_pybuffernd_act_cons_w4.rcbuffer = &__pyx_pybuffer_act_cons_w4; /* "pyscipopt/scip.pyx":4957 * * def getKhalilState(self, root_info, candidates): * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * * cdef np.ndarray[np.float32_t, ndim=1] cand_coefs */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":5029 * cdef np.ndarray[np.float32_t, ndim=1] cand_acons_nb4 * * cdef int ncands = len(candidates) # <<<<<<<<<<<<<< * * cand_coefs = np.empty(shape=(ncands, ), dtype=np.float32) */ __pyx_t_2 = PyObject_Length(__pyx_v_candidates); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5029, __pyx_L1_error) __pyx_v_ncands = __pyx_t_2; /* "pyscipopt/scip.pyx":5031 * cdef int ncands = len(candidates) * * cand_coefs = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_coefs_pos = np.empty(shape=(ncands, ), dtype=np.float32) * cand_coefs_neg = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5031, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_coefs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_coefs.diminfo[0].strides = __pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_coefs.diminfo[0].shape = __pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5031, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_cand_coefs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5032 * * cand_coefs = np.empty(shape=(ncands, ), dtype=np.float32) * cand_coefs_pos = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_coefs_neg = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nnzrs = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5032, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_coefs_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_coefs_pos.diminfo[0].strides = __pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_coefs_pos.diminfo[0].shape = __pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5032, __pyx_L1_error) } __pyx_t_12 = 0; __pyx_v_cand_coefs_pos = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5033 * cand_coefs = np.empty(shape=(ncands, ), dtype=np.float32) * cand_coefs_pos = np.empty(shape=(ncands, ), dtype=np.float32) * cand_coefs_neg = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_nnzrs = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5033, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_coefs_neg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_coefs_neg.diminfo[0].strides = __pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_coefs_neg.diminfo[0].shape = __pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5033, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_cand_coefs_neg = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5034 * cand_coefs_pos = np.empty(shape=(ncands, ), dtype=np.float32) * cand_coefs_neg = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nnzrs = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_root_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5034, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_nnzrs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_nnzrs.diminfo[0].strides = __pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_nnzrs.diminfo[0].shape = __pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5034, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_cand_nnzrs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5035 * cand_coefs_neg = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nnzrs = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5035, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_cdeg_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].strides = __pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].shape = __pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5035, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_cand_root_cdeg_mean = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5036 * cand_nnzrs = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5036, __pyx_L1_error) __pyx_t_16 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_cdeg_var, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_cdeg_var.diminfo[0].strides = __pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_cdeg_var.diminfo[0].shape = __pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5036, __pyx_L1_error) } __pyx_t_16 = 0; __pyx_v_cand_root_cdeg_var = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5037 * cand_root_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_root_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_pcoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5037, __pyx_L1_error) __pyx_t_17 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_cdeg_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].strides = __pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].shape = __pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5037, __pyx_L1_error) } __pyx_t_17 = 0; __pyx_v_cand_root_cdeg_min = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5038 * cand_root_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_root_pcoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_pcoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5038, __pyx_L1_error) __pyx_t_18 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_cdeg_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].strides = __pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].shape = __pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5038, __pyx_L1_error) } __pyx_t_18 = 0; __pyx_v_cand_root_cdeg_max = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5039 * cand_root_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_pcoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_root_pcoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5039, __pyx_L1_error) __pyx_t_19 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_pcoefs_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_pcoefs_count.diminfo[0].strides = __pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_pcoefs_count.diminfo[0].shape = __pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5039, __pyx_L1_error) } __pyx_t_19 = 0; __pyx_v_cand_root_pcoefs_count = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5040 * cand_root_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_pcoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_pcoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_pcoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5040, __pyx_L1_error) __pyx_t_20 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_pcoefs_var, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_pcoefs_var.diminfo[0].strides = __pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_pcoefs_var.diminfo[0].shape = __pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5040, __pyx_L1_error) } __pyx_t_20 = 0; __pyx_v_cand_root_pcoefs_var = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5041 * cand_root_pcoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_pcoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_pcoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5041, __pyx_L1_error) __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_pcoefs_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_pcoefs_mean.diminfo[0].strides = __pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_pcoefs_mean.diminfo[0].shape = __pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5041, __pyx_L1_error) } __pyx_t_21 = 0; __pyx_v_cand_root_pcoefs_mean = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5042 * cand_root_pcoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_pcoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5042, __pyx_L1_error) __pyx_t_22 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_pcoefs_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_pcoefs_min.diminfo[0].strides = __pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_pcoefs_min.diminfo[0].shape = __pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5042, __pyx_L1_error) } __pyx_t_22 = 0; __pyx_v_cand_root_pcoefs_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5043 * cand_root_pcoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_ncoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_ncoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5043, __pyx_L1_error) __pyx_t_23 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_pcoefs_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_pcoefs_max.diminfo[0].strides = __pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_pcoefs_max.diminfo[0].shape = __pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5043, __pyx_L1_error) } __pyx_t_23 = 0; __pyx_v_cand_root_pcoefs_max = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5044 * cand_root_pcoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_pcoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_root_ncoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5044, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_ncoefs_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_ncoefs_count.diminfo[0].strides = __pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_ncoefs_count.diminfo[0].shape = __pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5044, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_cand_root_ncoefs_count = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5045 * cand_root_pcoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_ncoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_ncoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5045, __pyx_L1_error) __pyx_t_25 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_25, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_ncoefs_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_ncoefs_mean.diminfo[0].strides = __pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_ncoefs_mean.diminfo[0].shape = __pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5045, __pyx_L1_error) } __pyx_t_25 = 0; __pyx_v_cand_root_ncoefs_mean = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5046 * cand_root_ncoefs_count = np.empty(shape=(ncands, ), dtype=np.int32) * cand_root_ncoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_ncoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5046, __pyx_L1_error) __pyx_t_26 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_ncoefs_var, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_ncoefs_var.diminfo[0].strides = __pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_ncoefs_var.diminfo[0].shape = __pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5046, __pyx_L1_error) } __pyx_t_26 = 0; __pyx_v_cand_root_ncoefs_var = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5047 * cand_root_ncoefs_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_root_ncoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_solfracs = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5047, __pyx_L1_error) __pyx_t_27 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_ncoefs_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_root_ncoefs_min.diminfo[0].strides = __pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_ncoefs_min.diminfo[0].shape = __pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5047, __pyx_L1_error) } __pyx_t_27 = 0; __pyx_v_cand_root_ncoefs_min = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5048 * cand_root_ncoefs_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_solfracs = np.empty(shape=(ncands, ), dtype=np.float32) * cand_slack = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5048, __pyx_L1_error) __pyx_t_28 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_root_ncoefs_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_root_ncoefs_max.diminfo[0].strides = __pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_root_ncoefs_max.diminfo[0].shape = __pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5048, __pyx_L1_error) } __pyx_t_28 = 0; __pyx_v_cand_root_ncoefs_max = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5049 * cand_root_ncoefs_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_root_ncoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_solfracs = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_slack = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_up = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_cand_solfracs = __pyx_t_5; __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5050 * cand_root_ncoefs_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_solfracs = np.empty(shape=(ncands, ), dtype=np.float32) * cand_slack = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ps_up = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_down = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5050, __pyx_L1_error) __pyx_t_29 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_slack.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_slack.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_slack.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_slack, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_slack.diminfo[0].strides = __pyx_pybuffernd_cand_slack.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_slack.diminfo[0].shape = __pyx_pybuffernd_cand_slack.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5050, __pyx_L1_error) } __pyx_t_29 = 0; __pyx_v_cand_slack = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5051 * cand_solfracs = np.empty(shape=(ncands, ), dtype=np.float32) * cand_slack = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_up = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ps_down = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_ratio = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5051, __pyx_L1_error) __pyx_t_30 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ps_up, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ps_up.diminfo[0].strides = __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ps_up.diminfo[0].shape = __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5051, __pyx_L1_error) } __pyx_t_30 = 0; __pyx_v_cand_ps_up = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5052 * cand_slack = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_up = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_down = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ps_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_sum = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5052, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ps_down, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_ps_down.diminfo[0].strides = __pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ps_down.diminfo[0].shape = __pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5052, __pyx_L1_error) } __pyx_t_31 = 0; __pyx_v_cand_ps_down = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5053 * cand_ps_up = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_down = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_ratio = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ps_sum = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_product = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5053, __pyx_L1_error) __pyx_t_32 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ps_ratio, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ps_ratio.diminfo[0].strides = __pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ps_ratio.diminfo[0].shape = __pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5053, __pyx_L1_error) } __pyx_t_32 = 0; __pyx_v_cand_ps_ratio = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5054 * cand_ps_down = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_sum = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ps_product = np.empty(shape=(ncands, ), dtype=np.float32) * cand_frac_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5054, __pyx_L1_error) __pyx_t_33 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ps_sum, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_ps_sum.diminfo[0].strides = __pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ps_sum.diminfo[0].shape = __pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5054, __pyx_L1_error) } __pyx_t_33 = 0; __pyx_v_cand_ps_sum = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5055 * cand_ps_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_sum = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_product = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_frac_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_frac_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5055, __pyx_L1_error) __pyx_t_34 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ps_product, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ps_product.diminfo[0].strides = __pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ps_product.diminfo[0].shape = __pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5055, __pyx_L1_error) } __pyx_t_34 = 0; __pyx_v_cand_ps_product = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5056 * cand_ps_sum = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ps_product = np.empty(shape=(ncands, ), dtype=np.float32) * cand_frac_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_frac_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nb_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_cand_frac_up_infeas = __pyx_t_4; __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5057 * cand_ps_product = np.empty(shape=(ncands, ), dtype=np.float32) * cand_frac_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_frac_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_nb_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nb_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cand_frac_down_infeas = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5058 * cand_frac_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_frac_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nb_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_nb_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5058, __pyx_L1_error) __pyx_t_35 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer, (PyObject*)__pyx_t_35, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_nb_up_infeas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].strides = __pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].shape = __pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5058, __pyx_L1_error) } __pyx_t_35 = 0; __pyx_v_cand_nb_up_infeas = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5059 * cand_frac_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nb_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nb_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5059, __pyx_L1_error) __pyx_t_36 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer, (PyObject*)__pyx_t_36, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_nb_down_infeas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].strides = __pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].shape = __pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5059, __pyx_L1_error) } __pyx_t_36 = 0; __pyx_v_cand_nb_down_infeas = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5060 * cand_nb_up_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nb_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5060, __pyx_L1_error) __pyx_t_37 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer, (PyObject*)__pyx_t_37, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_mean, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_cdeg_mean.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_mean.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5060, __pyx_L1_error) } __pyx_t_37 = 0; __pyx_v_cand_cdeg_mean = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5061 * cand_nb_down_infeas = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) * cand_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5061, __pyx_L1_error) __pyx_t_38 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer, (PyObject*)__pyx_t_38, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_var, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_cdeg_var.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_var.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5061, __pyx_L1_error) } __pyx_t_38 = 0; __pyx_v_cand_cdeg_var = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5062 * cand_cdeg_mean = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) * cand_cdeg_mean_ratio = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5062, __pyx_L1_error) __pyx_t_39 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_39, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_cdeg_min.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_min.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5062, __pyx_L1_error) } __pyx_t_39 = 0; __pyx_v_cand_cdeg_min = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5063 * cand_cdeg_var = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) * cand_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) # <<<<<<<<<<<<<< * cand_cdeg_mean_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_min_ratio = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5063, __pyx_L1_error) __pyx_t_40 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_40, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_cdeg_max.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_max.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5063, __pyx_L1_error) } __pyx_t_40 = 0; __pyx_v_cand_cdeg_max = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5064 * cand_cdeg_min = np.empty(shape=(ncands, ), dtype=np.int32) * cand_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) * cand_cdeg_mean_ratio = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_cdeg_min_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_max_ratio = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5064, __pyx_L1_error) __pyx_t_41 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_t_41, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_mean_ratio, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_cdeg_mean_ratio.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_mean_ratio.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5064, __pyx_L1_error) } __pyx_t_41 = 0; __pyx_v_cand_cdeg_mean_ratio = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5065 * cand_cdeg_max = np.empty(shape=(ncands, ), dtype=np.int32) * cand_cdeg_mean_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_min_ratio = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_cdeg_max_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_prhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5065, __pyx_L1_error) __pyx_t_42 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_t_42, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_min_ratio, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_cdeg_min_ratio.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_min_ratio.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5065, __pyx_L1_error) } __pyx_t_42 = 0; __pyx_v_cand_cdeg_min_ratio = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5066 * cand_cdeg_mean_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_min_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_max_ratio = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_prhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_prhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5066, __pyx_L1_error) __pyx_t_43 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_t_43, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_cdeg_max_ratio, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_cdeg_max_ratio.diminfo[0].strides = __pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_cdeg_max_ratio.diminfo[0].shape = __pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5066, __pyx_L1_error) } __pyx_t_43 = 0; __pyx_v_cand_cdeg_max_ratio = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5067 * cand_cdeg_min_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_cdeg_max_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_prhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_prhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nrhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5067, __pyx_L1_error) __pyx_t_44 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_44, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_prhs_ratio_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_prhs_ratio_max.diminfo[0].strides = __pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_prhs_ratio_max.diminfo[0].shape = __pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5067, __pyx_L1_error) } __pyx_t_44 = 0; __pyx_v_cand_prhs_ratio_max = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5068 * cand_cdeg_max_ratio = np.empty(shape=(ncands, ), dtype=np.float32) * cand_prhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_prhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_nrhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nrhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5068, __pyx_L1_error) __pyx_t_45 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_45, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_prhs_ratio_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_prhs_ratio_min.diminfo[0].strides = __pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_prhs_ratio_min.diminfo[0].shape = __pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5068, __pyx_L1_error) } __pyx_t_45 = 0; __pyx_v_cand_prhs_ratio_min = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5069 * cand_prhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_prhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nrhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_nrhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pp_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5069, __pyx_L1_error) __pyx_t_46 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_46, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_nrhs_ratio_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_nrhs_ratio_max.diminfo[0].strides = __pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_nrhs_ratio_max.diminfo[0].shape = __pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5069, __pyx_L1_error) } __pyx_t_46 = 0; __pyx_v_cand_nrhs_ratio_max = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5070 * cand_prhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nrhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nrhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_pp_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pp_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5070, __pyx_L1_error) __pyx_t_47 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_47, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_nrhs_ratio_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_nrhs_ratio_min.diminfo[0].strides = __pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_nrhs_ratio_min.diminfo[0].shape = __pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5070, __pyx_L1_error) } __pyx_t_47 = 0; __pyx_v_cand_nrhs_ratio_min = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5071 * cand_nrhs_ratio_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_nrhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pp_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_pp_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pn_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5071, __pyx_L1_error) __pyx_t_48 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_pp_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ota_pp_max.diminfo[0].strides = __pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_pp_max.diminfo[0].shape = __pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5071, __pyx_L1_error) } __pyx_t_48 = 0; __pyx_v_cand_ota_pp_max = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5072 * cand_nrhs_ratio_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pp_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pp_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_pn_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pn_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5072, __pyx_L1_error) __pyx_t_49 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_49, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_pp_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_ota_pp_min.diminfo[0].strides = __pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_pp_min.diminfo[0].shape = __pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5072, __pyx_L1_error) } __pyx_t_49 = 0; __pyx_v_cand_ota_pp_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5073 * cand_ota_pp_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pp_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pn_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_pn_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_np_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5073, __pyx_L1_error) __pyx_t_50 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_50, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_pn_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ota_pn_max.diminfo[0].strides = __pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_pn_max.diminfo[0].shape = __pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5073, __pyx_L1_error) } __pyx_t_50 = 0; __pyx_v_cand_ota_pn_max = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5074 * cand_ota_pp_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pn_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pn_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_np_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_np_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5074, __pyx_L1_error) __pyx_t_51 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_51, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_pn_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_ota_pn_min.diminfo[0].strides = __pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_pn_min.diminfo[0].shape = __pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5074, __pyx_L1_error) } __pyx_t_51 = 0; __pyx_v_cand_ota_pn_min = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5075 * cand_ota_pn_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_pn_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_np_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_np_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_nn_max = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5075, __pyx_L1_error) __pyx_t_52 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_52, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_np_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ota_np_max.diminfo[0].strides = __pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_np_max.diminfo[0].shape = __pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5075, __pyx_L1_error) } __pyx_t_52 = 0; __pyx_v_cand_ota_np_max = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5076 * cand_ota_pn_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_np_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_np_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_nn_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_nn_min = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5076, __pyx_L1_error) __pyx_t_53 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_53, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_np_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_ota_np_min.diminfo[0].strides = __pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_np_min.diminfo[0].shape = __pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5076, __pyx_L1_error) } __pyx_t_53 = 0; __pyx_v_cand_ota_np_min = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5077 * cand_ota_np_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_np_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_nn_max = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_ota_nn_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum1 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5077, __pyx_L1_error) __pyx_t_54 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer, (PyObject*)__pyx_t_54, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_nn_max, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_ota_nn_max.diminfo[0].strides = __pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_nn_max.diminfo[0].shape = __pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5077, __pyx_L1_error) } __pyx_t_54 = 0; __pyx_v_cand_ota_nn_max = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5078 * cand_ota_np_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_nn_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_nn_min = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_sum1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean1 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5078, __pyx_L1_error) __pyx_t_55 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer, (PyObject*)__pyx_t_55, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_ota_nn_min, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_ota_nn_min.diminfo[0].strides = __pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_ota_nn_min.diminfo[0].shape = __pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5078, __pyx_L1_error) } __pyx_t_55 = 0; __pyx_v_cand_ota_nn_min = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5079 * cand_ota_nn_max = np.empty(shape=(ncands, ), dtype=np.float32) * cand_ota_nn_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum1 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_mean1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var1 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5079, __pyx_L1_error) __pyx_t_56 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer, (PyObject*)__pyx_t_56, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_sum1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_sum1.diminfo[0].strides = __pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_sum1.diminfo[0].shape = __pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5079, __pyx_L1_error) } __pyx_t_56 = 0; __pyx_v_cand_acons_sum1 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5080 * cand_ota_nn_min = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean1 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_var1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max1 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5080, __pyx_L1_error) __pyx_t_57 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer, (PyObject*)__pyx_t_57, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_mean1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_mean1.diminfo[0].strides = __pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_mean1.diminfo[0].shape = __pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5080, __pyx_L1_error) } __pyx_t_57 = 0; __pyx_v_cand_acons_mean1 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5081 * cand_acons_sum1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var1 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_max1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min1 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5081, __pyx_L1_error) __pyx_t_58 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer, (PyObject*)__pyx_t_58, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_var1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_var1.diminfo[0].strides = __pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_var1.diminfo[0].shape = __pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5081, __pyx_L1_error) } __pyx_t_58 = 0; __pyx_v_cand_acons_var1 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5082 * cand_acons_mean1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max1 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_min1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum2 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5082, __pyx_L1_error) __pyx_t_59 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer, (PyObject*)__pyx_t_59, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_max1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_max1.diminfo[0].strides = __pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_max1.diminfo[0].shape = __pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5082, __pyx_L1_error) } __pyx_t_59 = 0; __pyx_v_cand_acons_max1 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5083 * cand_acons_var1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min1 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_sum2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean2 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5083, __pyx_L1_error) __pyx_t_60 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer, (PyObject*)__pyx_t_60, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_min1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_min1.diminfo[0].strides = __pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_min1.diminfo[0].shape = __pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5083, __pyx_L1_error) } __pyx_t_60 = 0; __pyx_v_cand_acons_min1 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5084 * cand_acons_max1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum2 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_mean2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var2 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5084, __pyx_L1_error) __pyx_t_61 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer, (PyObject*)__pyx_t_61, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_sum2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_sum2.diminfo[0].strides = __pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_sum2.diminfo[0].shape = __pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5084, __pyx_L1_error) } __pyx_t_61 = 0; __pyx_v_cand_acons_sum2 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5085 * cand_acons_min1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean2 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_var2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max2 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5085, __pyx_L1_error) __pyx_t_62 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer, (PyObject*)__pyx_t_62, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_mean2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_mean2.diminfo[0].strides = __pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_mean2.diminfo[0].shape = __pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5085, __pyx_L1_error) } __pyx_t_62 = 0; __pyx_v_cand_acons_mean2 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5086 * cand_acons_sum2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var2 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_max2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min2 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5086, __pyx_L1_error) __pyx_t_63 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer, (PyObject*)__pyx_t_63, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_var2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_var2.diminfo[0].strides = __pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_var2.diminfo[0].shape = __pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5086, __pyx_L1_error) } __pyx_t_63 = 0; __pyx_v_cand_acons_var2 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5087 * cand_acons_mean2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max2 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_min2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum3 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5087, __pyx_L1_error) __pyx_t_64 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer, (PyObject*)__pyx_t_64, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_max2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_max2.diminfo[0].strides = __pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_max2.diminfo[0].shape = __pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5087, __pyx_L1_error) } __pyx_t_64 = 0; __pyx_v_cand_acons_max2 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5088 * cand_acons_var2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min2 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_sum3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean3 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5088, __pyx_L1_error) __pyx_t_65 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer, (PyObject*)__pyx_t_65, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_min2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_min2.diminfo[0].strides = __pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_min2.diminfo[0].shape = __pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5088, __pyx_L1_error) } __pyx_t_65 = 0; __pyx_v_cand_acons_min2 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5089 * cand_acons_max2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum3 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_mean3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var3 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5089, __pyx_L1_error) __pyx_t_66 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer, (PyObject*)__pyx_t_66, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_sum3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_sum3.diminfo[0].strides = __pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_sum3.diminfo[0].shape = __pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5089, __pyx_L1_error) } __pyx_t_66 = 0; __pyx_v_cand_acons_sum3 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5090 * cand_acons_min2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean3 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_var3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max3 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5090, __pyx_L1_error) __pyx_t_67 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer, (PyObject*)__pyx_t_67, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_mean3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_mean3.diminfo[0].strides = __pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_mean3.diminfo[0].shape = __pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5090, __pyx_L1_error) } __pyx_t_67 = 0; __pyx_v_cand_acons_mean3 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5091 * cand_acons_sum3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var3 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_max3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min3 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5091, __pyx_L1_error) __pyx_t_68 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer, (PyObject*)__pyx_t_68, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_var3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_var3.diminfo[0].strides = __pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_var3.diminfo[0].shape = __pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5091, __pyx_L1_error) } __pyx_t_68 = 0; __pyx_v_cand_acons_var3 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5092 * cand_acons_mean3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max3 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_min3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum4 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5092, __pyx_L1_error) __pyx_t_69 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer, (PyObject*)__pyx_t_69, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_max3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_max3.diminfo[0].strides = __pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_max3.diminfo[0].shape = __pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5092, __pyx_L1_error) } __pyx_t_69 = 0; __pyx_v_cand_acons_max3 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5093 * cand_acons_var3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min3 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_sum4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean4 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5093, __pyx_L1_error) __pyx_t_70 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer, (PyObject*)__pyx_t_70, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_min3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_min3.diminfo[0].strides = __pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_min3.diminfo[0].shape = __pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5093, __pyx_L1_error) } __pyx_t_70 = 0; __pyx_v_cand_acons_min3 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5094 * cand_acons_max3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum4 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_mean4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var4 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5094, __pyx_L1_error) __pyx_t_71 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer, (PyObject*)__pyx_t_71, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_sum4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_sum4.diminfo[0].strides = __pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_sum4.diminfo[0].shape = __pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5094, __pyx_L1_error) } __pyx_t_71 = 0; __pyx_v_cand_acons_sum4 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5095 * cand_acons_min3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_sum4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean4 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_var4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max4 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5095, __pyx_L1_error) __pyx_t_72 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer, (PyObject*)__pyx_t_72, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_mean4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_mean4.diminfo[0].strides = __pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_mean4.diminfo[0].shape = __pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5095, __pyx_L1_error) } __pyx_t_72 = 0; __pyx_v_cand_acons_mean4 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5096 * cand_acons_sum4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_mean4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var4 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_max4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min4 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5096, __pyx_L1_error) __pyx_t_73 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer, (PyObject*)__pyx_t_73, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_var4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_var4.diminfo[0].strides = __pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_var4.diminfo[0].shape = __pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5096, __pyx_L1_error) } __pyx_t_73 = 0; __pyx_v_cand_acons_var4 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5097 * cand_acons_mean4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_var4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max4 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_min4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb1 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5097, __pyx_L1_error) __pyx_t_74 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer, (PyObject*)__pyx_t_74, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_max4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_max4.diminfo[0].strides = __pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_max4.diminfo[0].shape = __pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5097, __pyx_L1_error) } __pyx_t_74 = 0; __pyx_v_cand_acons_max4 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5098 * cand_acons_var4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_max4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min4 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_nb1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb2 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5098, __pyx_L1_error) __pyx_t_75 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer, (PyObject*)__pyx_t_75, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_min4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_min4.diminfo[0].strides = __pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_min4.diminfo[0].shape = __pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5098, __pyx_L1_error) } __pyx_t_75 = 0; __pyx_v_cand_acons_min4 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5099 * cand_acons_max4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_min4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb1 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_nb2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb3 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5099, __pyx_L1_error) __pyx_t_76 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer, (PyObject*)__pyx_t_76, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_nb1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_nb1.diminfo[0].strides = __pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_nb1.diminfo[0].shape = __pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5099, __pyx_L1_error) } __pyx_t_76 = 0; __pyx_v_cand_acons_nb1 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5100 * cand_acons_min4 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb2 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_nb3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb4 = np.empty(shape=(ncands, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5100, __pyx_L1_error) __pyx_t_77 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer, (PyObject*)__pyx_t_77, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_nb2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_nb2.diminfo[0].strides = __pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_nb2.diminfo[0].shape = __pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5100, __pyx_L1_error) } __pyx_t_77 = 0; __pyx_v_cand_acons_nb2 = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5101 * cand_acons_nb1 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb3 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * cand_acons_nb4 = np.empty(shape=(ncands, ), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5101, __pyx_L1_error) __pyx_t_78 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer, (PyObject*)__pyx_t_78, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_nb3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_cand_acons_nb3.diminfo[0].strides = __pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_nb3.diminfo[0].shape = __pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5101, __pyx_L1_error) } __pyx_t_78 = 0; __pyx_v_cand_acons_nb3 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5102 * cand_acons_nb2 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb3 = np.empty(shape=(ncands, ), dtype=np.float32) * cand_acons_nb4 = np.empty(shape=(ncands, ), dtype=np.float32) # <<<<<<<<<<<<<< * * cdef SCIP_COL** cols = SCIPgetLPCols(scip) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncands); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5102, __pyx_L1_error) __pyx_t_79 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer, (PyObject*)__pyx_t_79, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer, (PyObject*)__pyx_v_cand_acons_nb4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_cand_acons_nb4.diminfo[0].strides = __pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cand_acons_nb4.diminfo[0].shape = __pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5102, __pyx_L1_error) } __pyx_t_79 = 0; __pyx_v_cand_acons_nb4 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5104 * cand_acons_nb4 = np.empty(shape=(ncands, ), dtype=np.float32) * * cdef SCIP_COL** cols = SCIPgetLPCols(scip) # <<<<<<<<<<<<<< * cdef int ncols = SCIPgetNLPCols(scip) * cdef int i, cand_i, col_i */ __pyx_v_cols = SCIPgetLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":5105 * * cdef SCIP_COL** cols = SCIPgetLPCols(scip) * cdef int ncols = SCIPgetNLPCols(scip) # <<<<<<<<<<<<<< * cdef int i, cand_i, col_i * */ __pyx_v_ncols = SCIPgetNLPCols(__pyx_v_scip); /* "pyscipopt/scip.pyx":5123 * * # if at root node, extract root information * if SCIPgetNNodes(scip) == 1: # <<<<<<<<<<<<<< * root_info['col'] = {} * root_info['col']['coefs'] = {} */ __pyx_t_80 = ((SCIPgetNNodes(__pyx_v_scip) == 1) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5124 * # if at root node, extract root information * if SCIPgetNNodes(scip) == 1: * root_info['col'] = {} # <<<<<<<<<<<<<< * root_info['col']['coefs'] = {} * root_info['col']['coefs_pos'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyObject_SetItem(__pyx_v_root_info, __pyx_n_u_col, __pyx_t_3) < 0)) __PYX_ERR(3, 5124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5125 * if SCIPgetNNodes(scip) == 1: * root_info['col'] = {} * root_info['col']['coefs'] = {} # <<<<<<<<<<<<<< * root_info['col']['coefs_pos'] = {} * root_info['col']['coefs_neg'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_coefs, __pyx_t_3) < 0)) __PYX_ERR(3, 5125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5126 * root_info['col'] = {} * root_info['col']['coefs'] = {} * root_info['col']['coefs_pos'] = {} # <<<<<<<<<<<<<< * root_info['col']['coefs_neg'] = {} * root_info['col']['nnzrs'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_coefs_pos, __pyx_t_3) < 0)) __PYX_ERR(3, 5126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5127 * root_info['col']['coefs'] = {} * root_info['col']['coefs_pos'] = {} * root_info['col']['coefs_neg'] = {} # <<<<<<<<<<<<<< * root_info['col']['nnzrs'] = {} * root_info['col']['root_cdeg_mean'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_coefs_neg, __pyx_t_3) < 0)) __PYX_ERR(3, 5127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5128 * root_info['col']['coefs_pos'] = {} * root_info['col']['coefs_neg'] = {} * root_info['col']['nnzrs'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_mean'] = {} * root_info['col']['root_cdeg_var'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_nnzrs, __pyx_t_3) < 0)) __PYX_ERR(3, 5128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5129 * root_info['col']['coefs_neg'] = {} * root_info['col']['nnzrs'] = {} * root_info['col']['root_cdeg_mean'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_var'] = {} * root_info['col']['root_cdeg_min'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_cdeg_mean, __pyx_t_3) < 0)) __PYX_ERR(3, 5129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5130 * root_info['col']['nnzrs'] = {} * root_info['col']['root_cdeg_mean'] = {} * root_info['col']['root_cdeg_var'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_min'] = {} * root_info['col']['root_cdeg_max'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_cdeg_var, __pyx_t_3) < 0)) __PYX_ERR(3, 5130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5131 * root_info['col']['root_cdeg_mean'] = {} * root_info['col']['root_cdeg_var'] = {} * root_info['col']['root_cdeg_min'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_max'] = {} * root_info['col']['root_pcoefs_count'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_cdeg_min, __pyx_t_3) < 0)) __PYX_ERR(3, 5131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5132 * root_info['col']['root_cdeg_var'] = {} * root_info['col']['root_cdeg_min'] = {} * root_info['col']['root_cdeg_max'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_count'] = {} * root_info['col']['root_pcoefs_var'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_cdeg_max, __pyx_t_3) < 0)) __PYX_ERR(3, 5132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5133 * root_info['col']['root_cdeg_min'] = {} * root_info['col']['root_cdeg_max'] = {} * root_info['col']['root_pcoefs_count'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_var'] = {} * root_info['col']['root_pcoefs_mean'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_count, __pyx_t_3) < 0)) __PYX_ERR(3, 5133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5134 * root_info['col']['root_cdeg_max'] = {} * root_info['col']['root_pcoefs_count'] = {} * root_info['col']['root_pcoefs_var'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_mean'] = {} * root_info['col']['root_pcoefs_min'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_var, __pyx_t_3) < 0)) __PYX_ERR(3, 5134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5135 * root_info['col']['root_pcoefs_count'] = {} * root_info['col']['root_pcoefs_var'] = {} * root_info['col']['root_pcoefs_mean'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_min'] = {} * root_info['col']['root_pcoefs_max'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_mean, __pyx_t_3) < 0)) __PYX_ERR(3, 5135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5136 * root_info['col']['root_pcoefs_var'] = {} * root_info['col']['root_pcoefs_mean'] = {} * root_info['col']['root_pcoefs_min'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_max'] = {} * root_info['col']['root_ncoefs_count'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_min, __pyx_t_3) < 0)) __PYX_ERR(3, 5136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5137 * root_info['col']['root_pcoefs_mean'] = {} * root_info['col']['root_pcoefs_min'] = {} * root_info['col']['root_pcoefs_max'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_count'] = {} * root_info['col']['root_ncoefs_mean'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_max, __pyx_t_3) < 0)) __PYX_ERR(3, 5137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5138 * root_info['col']['root_pcoefs_min'] = {} * root_info['col']['root_pcoefs_max'] = {} * root_info['col']['root_ncoefs_count'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_mean'] = {} * root_info['col']['root_ncoefs_var'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_count, __pyx_t_3) < 0)) __PYX_ERR(3, 5138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5139 * root_info['col']['root_pcoefs_max'] = {} * root_info['col']['root_ncoefs_count'] = {} * root_info['col']['root_ncoefs_mean'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_var'] = {} * root_info['col']['root_ncoefs_min'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_mean, __pyx_t_3) < 0)) __PYX_ERR(3, 5139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5140 * root_info['col']['root_ncoefs_count'] = {} * root_info['col']['root_ncoefs_mean'] = {} * root_info['col']['root_ncoefs_var'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_min'] = {} * root_info['col']['root_ncoefs_max'] = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_var, __pyx_t_3) < 0)) __PYX_ERR(3, 5140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5141 * root_info['col']['root_ncoefs_mean'] = {} * root_info['col']['root_ncoefs_var'] = {} * root_info['col']['root_ncoefs_min'] = {} # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_max'] = {} * for i in range(ncols): */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_min, __pyx_t_3) < 0)) __PYX_ERR(3, 5141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5142 * root_info['col']['root_ncoefs_var'] = {} * root_info['col']['root_ncoefs_min'] = {} * root_info['col']['root_ncoefs_max'] = {} # <<<<<<<<<<<<<< * for i in range(ncols): * col = cols[i] */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_max, __pyx_t_3) < 0)) __PYX_ERR(3, 5142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5143 * root_info['col']['root_ncoefs_min'] = {} * root_info['col']['root_ncoefs_max'] = {} * for i in range(ncols): # <<<<<<<<<<<<<< * col = cols[i] * col_i = SCIPcolGetIndex(col) */ __pyx_t_8 = __pyx_v_ncols; __pyx_t_81 = __pyx_t_8; for (__pyx_t_82 = 0; __pyx_t_82 < __pyx_t_81; __pyx_t_82+=1) { __pyx_v_i = __pyx_t_82; /* "pyscipopt/scip.pyx":5144 * root_info['col']['root_ncoefs_max'] = {} * for i in range(ncols): * col = cols[i] # <<<<<<<<<<<<<< * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) */ __pyx_v_col = (__pyx_v_cols[__pyx_v_i]); /* "pyscipopt/scip.pyx":5145 * for i in range(ncols): * col = cols[i] * col_i = SCIPcolGetIndex(col) # <<<<<<<<<<<<<< * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) */ __pyx_v_col_i = SCIPcolGetIndex(__pyx_v_col); /* "pyscipopt/scip.pyx":5146 * col = cols[i] * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) # <<<<<<<<<<<<<< * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) */ __pyx_v_neighbors = SCIPcolGetRows(__pyx_v_col); /* "pyscipopt/scip.pyx":5147 * col_i = SCIPcolGetIndex(col) * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * nonzero_coefs_raw = SCIPcolGetVals(col) * */ __pyx_v_nb_neighbors = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":5148 * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) # <<<<<<<<<<<<<< * * # Objective function coeffs. (3) */ __pyx_v_nonzero_coefs_raw = SCIPcolGetVals(__pyx_v_col); /* "pyscipopt/scip.pyx":5152 * # Objective function coeffs. (3) * # Value of the coefficient (raw, positive only, negative only) * root_info['col']['coefs'][col_i] = SCIPcolGetObj(col) # <<<<<<<<<<<<<< * root_info['col']['coefs_pos'][col_i] = max(root_info['col']['coefs'][col_i], 0) * root_info['col']['coefs_neg'][col_i] = min(root_info['col']['coefs'][col_i], 0) */ __pyx_t_3 = PyFloat_FromDouble(SCIPcolGetObj(__pyx_v_col)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_5, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5153 * # Value of the coefficient (raw, positive only, negative only) * root_info['col']['coefs'][col_i] = SCIPcolGetObj(col) * root_info['col']['coefs_pos'][col_i] = max(root_info['col']['coefs'][col_i], 0) # <<<<<<<<<<<<<< * root_info['col']['coefs_neg'][col_i] = min(root_info['col']['coefs'][col_i], 0) * */ __pyx_t_83 = 0; __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_83); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_80 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_80 < 0)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_80) { __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_83); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_coefs_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5154 * root_info['col']['coefs'][col_i] = SCIPcolGetObj(col) * root_info['col']['coefs_pos'][col_i] = max(root_info['col']['coefs'][col_i], 0) * root_info['col']['coefs_neg'][col_i] = min(root_info['col']['coefs'][col_i], 0) # <<<<<<<<<<<<<< * * # Num. constraints (1) */ __pyx_t_83 = 0; __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_coefs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_83); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_80 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_80 < 0)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_80) { __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_83); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_coefs_neg); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5158 * # Num. constraints (1) * # Number of constraints that the variable participates in (with a non-zero coefficient) * root_info['col']['nnzrs'][col_i] = nb_neighbors # <<<<<<<<<<<<<< * * # Stats. for constraint degrees (4) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nb_neighbors); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_nnzrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5164 * # participate in multiple constraints, and statistics over those constraints degrees are used. * # The constraint degree is computed on the root LP (mean, stdev., min, max) * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 # <<<<<<<<<<<<<< * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): */ __pyx_t_84 = 0.0; __pyx_t_85 = 0.0; __pyx_t_86 = 0; __pyx_t_87 = 0; __pyx_v_cdeg_var = __pyx_t_84; __pyx_v_cdeg_mean = __pyx_t_85; __pyx_v_cdeg_min = __pyx_t_86; __pyx_v_cdeg_max = __pyx_t_87; /* "pyscipopt/scip.pyx":5165 * # The constraint degree is computed on the root LP (mean, stdev., min, max) * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) */ __pyx_t_80 = ((__pyx_v_nb_neighbors > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5166 * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5167 * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) */ __pyx_v_cdeg = SCIProwGetNNonz((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5168 * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg # <<<<<<<<<<<<<< * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) */ __pyx_v_cdeg_mean = (__pyx_v_cdeg_mean + __pyx_v_cdeg); /* "pyscipopt/scip.pyx":5169 * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) # <<<<<<<<<<<<<< * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors */ if (((__pyx_v_neighbor_index == 0) != 0)) { __pyx_t_89 = __pyx_v_cdeg; } else { __pyx_t_90 = __pyx_v_cdeg; __pyx_t_91 = __pyx_v_cdeg_max; if (((__pyx_t_90 > __pyx_t_91) != 0)) { __pyx_t_92 = __pyx_t_90; } else { __pyx_t_92 = __pyx_t_91; } __pyx_t_89 = __pyx_t_92; } __pyx_v_cdeg_max = __pyx_t_89; /* "pyscipopt/scip.pyx":5170 * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) # <<<<<<<<<<<<<< * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): */ if (((__pyx_v_neighbor_index == 0) != 0)) { __pyx_t_89 = __pyx_v_cdeg; } else { __pyx_t_92 = __pyx_v_cdeg; __pyx_t_90 = __pyx_v_cdeg_min; if (((__pyx_t_92 < __pyx_t_90) != 0)) { __pyx_t_91 = __pyx_t_92; } else { __pyx_t_91 = __pyx_t_90; } __pyx_t_89 = __pyx_t_91; } __pyx_v_cdeg_min = __pyx_t_89; } /* "pyscipopt/scip.pyx":5171 * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg_var += (cdeg - cdeg_mean)**2 */ if (unlikely(__pyx_v_nb_neighbors == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5171, __pyx_L1_error) } __pyx_v_cdeg_mean = (__pyx_v_cdeg_mean / __pyx_v_nb_neighbors); /* "pyscipopt/scip.pyx":5172 * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5173 * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): * cdeg_var += (cdeg - cdeg_mean)**2 # <<<<<<<<<<<<<< * cdeg_var /= nb_neighbors * root_info['col']['root_cdeg_mean'][col_i] = cdeg_mean */ __pyx_v_cdeg_var = (__pyx_v_cdeg_var + powf((__pyx_v_cdeg - __pyx_v_cdeg_mean), 2.0)); } /* "pyscipopt/scip.pyx":5174 * for neighbor_index in range(nb_neighbors): * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_mean'][col_i] = cdeg_mean * root_info['col']['root_cdeg_var'][col_i] = cdeg_var */ if (unlikely(__pyx_v_nb_neighbors == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5174, __pyx_L1_error) } __pyx_v_cdeg_var = (__pyx_v_cdeg_var / __pyx_v_nb_neighbors); /* "pyscipopt/scip.pyx":5165 * # The constraint degree is computed on the root LP (mean, stdev., min, max) * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNNonz(neighbors[neighbor_index]) */ } /* "pyscipopt/scip.pyx":5175 * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors * root_info['col']['root_cdeg_mean'][col_i] = cdeg_mean # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_var'][col_i] = cdeg_var * root_info['col']['root_cdeg_min'][col_i] = cdeg_min */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cdeg_mean); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_cdeg_mean); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5176 * cdeg_var /= nb_neighbors * root_info['col']['root_cdeg_mean'][col_i] = cdeg_mean * root_info['col']['root_cdeg_var'][col_i] = cdeg_var # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_min'][col_i] = cdeg_min * root_info['col']['root_cdeg_max'][col_i] = cdeg_max */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_cdeg_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_cdeg_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5177 * root_info['col']['root_cdeg_mean'][col_i] = cdeg_mean * root_info['col']['root_cdeg_var'][col_i] = cdeg_var * root_info['col']['root_cdeg_min'][col_i] = cdeg_min # <<<<<<<<<<<<<< * root_info['col']['root_cdeg_max'][col_i] = cdeg_max * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_cdeg_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_cdeg_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5178 * root_info['col']['root_cdeg_var'][col_i] = cdeg_var * root_info['col']['root_cdeg_min'][col_i] = cdeg_min * root_info['col']['root_cdeg_max'][col_i] = cdeg_max # <<<<<<<<<<<<<< * * # Stats. for constraint coeffs. (10) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_cdeg_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_cdeg_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5183 * # A variables positive (negative) coefficients in the constraints it participates in * # (count, mean, stdev., min, max) * pcoefs_var, pcoefs_mean, pcoefs_min, pcoefs_max = 0, 0, 0, 0. # <<<<<<<<<<<<<< * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. * pcoefs_count, ncoefs_count = 0, 0 */ __pyx_t_85 = 0.0; __pyx_t_84 = 0.0; __pyx_t_93 = 0.0; __pyx_t_94 = 0.; __pyx_v_pcoefs_var = __pyx_t_85; __pyx_v_pcoefs_mean = __pyx_t_84; __pyx_v_pcoefs_min = __pyx_t_93; __pyx_v_pcoefs_max = __pyx_t_94; /* "pyscipopt/scip.pyx":5184 * # (count, mean, stdev., min, max) * pcoefs_var, pcoefs_mean, pcoefs_min, pcoefs_max = 0, 0, 0, 0. * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. # <<<<<<<<<<<<<< * pcoefs_count, ncoefs_count = 0, 0 * for neighbor_index in range(nb_neighbors): */ __pyx_t_93 = 0.0; __pyx_t_84 = 0.0; __pyx_t_85 = 0.0; __pyx_t_94 = 0.; __pyx_v_ncoefs_var = __pyx_t_93; __pyx_v_ncoefs_mean = __pyx_t_84; __pyx_v_ncoefs_min = __pyx_t_85; __pyx_v_ncoefs_max = __pyx_t_94; /* "pyscipopt/scip.pyx":5185 * pcoefs_var, pcoefs_mean, pcoefs_min, pcoefs_max = 0, 0, 0, 0. * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. * pcoefs_count, ncoefs_count = 0, 0 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] */ __pyx_t_87 = 0; __pyx_t_86 = 0; __pyx_v_pcoefs_count = __pyx_t_87; __pyx_v_ncoefs_count = __pyx_t_86; /* "pyscipopt/scip.pyx":5186 * ncoefs_var, ncoefs_mean, ncoefs_min, ncoefs_max = 0, 0, 0, 0. * pcoefs_count, ncoefs_count = 0, 0 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: */ __pyx_t_86 = __pyx_v_nb_neighbors; __pyx_t_87 = __pyx_t_86; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_87; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5187 * pcoefs_count, ncoefs_count = 0, 0 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * if coef > 0: * pcoefs_count += 1 */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":5188 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_count += 1 * pcoefs_mean = coef */ __pyx_t_80 = ((__pyx_v_coef > 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5189 * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: * pcoefs_count += 1 # <<<<<<<<<<<<<< * pcoefs_mean = coef * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) */ __pyx_v_pcoefs_count = (__pyx_v_pcoefs_count + 1); /* "pyscipopt/scip.pyx":5190 * if coef > 0: * pcoefs_count += 1 * pcoefs_mean = coef # <<<<<<<<<<<<<< * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) */ __pyx_v_pcoefs_mean = __pyx_v_coef; /* "pyscipopt/scip.pyx":5191 * pcoefs_count += 1 * pcoefs_mean = coef * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) # <<<<<<<<<<<<<< * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: */ if (((__pyx_v_pcoefs_count == 1) != 0)) { __pyx_t_95 = __pyx_v_coef; } else { __pyx_t_96 = __pyx_v_coef; __pyx_t_85 = __pyx_v_pcoefs_min; if (((__pyx_t_96 < __pyx_t_85) != 0)) { __pyx_t_97 = __pyx_t_96; } else { __pyx_t_97 = __pyx_t_85; } __pyx_t_95 = __pyx_t_97; } __pyx_v_pcoefs_min = __pyx_t_95; /* "pyscipopt/scip.pyx":5192 * pcoefs_mean = coef * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) # <<<<<<<<<<<<<< * if coef < 0: * ncoefs_count += 1 */ if (((__pyx_v_pcoefs_count == 1) != 0)) { __pyx_t_95 = __pyx_v_coef; } else { __pyx_t_97 = __pyx_v_coef; __pyx_t_85 = __pyx_v_pcoefs_max; if (((__pyx_t_97 > __pyx_t_85) != 0)) { __pyx_t_96 = __pyx_t_97; } else { __pyx_t_96 = __pyx_t_85; } __pyx_t_95 = __pyx_t_96; } __pyx_v_pcoefs_max = __pyx_t_95; /* "pyscipopt/scip.pyx":5188 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_count += 1 * pcoefs_mean = coef */ } /* "pyscipopt/scip.pyx":5193 * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_count += 1 * ncoefs_mean += coef */ __pyx_t_80 = ((__pyx_v_coef < 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5194 * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: * ncoefs_count += 1 # <<<<<<<<<<<<<< * ncoefs_mean += coef * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) */ __pyx_v_ncoefs_count = (__pyx_v_ncoefs_count + 1); /* "pyscipopt/scip.pyx":5195 * if coef < 0: * ncoefs_count += 1 * ncoefs_mean += coef # <<<<<<<<<<<<<< * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) */ __pyx_v_ncoefs_mean = (__pyx_v_ncoefs_mean + __pyx_v_coef); /* "pyscipopt/scip.pyx":5196 * ncoefs_count += 1 * ncoefs_mean += coef * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) # <<<<<<<<<<<<<< * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: */ if (((__pyx_v_ncoefs_count == 1) != 0)) { __pyx_t_95 = __pyx_v_coef; } else { __pyx_t_96 = __pyx_v_coef; __pyx_t_85 = __pyx_v_ncoefs_min; if (((__pyx_t_96 < __pyx_t_85) != 0)) { __pyx_t_97 = __pyx_t_96; } else { __pyx_t_97 = __pyx_t_85; } __pyx_t_95 = __pyx_t_97; } __pyx_v_ncoefs_min = __pyx_t_95; /* "pyscipopt/scip.pyx":5197 * ncoefs_mean += coef * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) # <<<<<<<<<<<<<< * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count */ if (((__pyx_v_ncoefs_count == 1) != 0)) { __pyx_t_95 = __pyx_v_coef; } else { __pyx_t_97 = __pyx_v_coef; __pyx_t_85 = __pyx_v_ncoefs_max; if (((__pyx_t_97 > __pyx_t_85) != 0)) { __pyx_t_96 = __pyx_t_97; } else { __pyx_t_96 = __pyx_t_85; } __pyx_t_95 = __pyx_t_96; } __pyx_v_ncoefs_max = __pyx_t_95; /* "pyscipopt/scip.pyx":5193 * pcoefs_min = coef if pcoefs_count == 1 else min(pcoefs_min, coef) * pcoefs_max = coef if pcoefs_count == 1 else max(pcoefs_max, coef) * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_count += 1 * ncoefs_mean += coef */ } } /* "pyscipopt/scip.pyx":5198 * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: */ __pyx_t_80 = ((__pyx_v_pcoefs_count > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5199 * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count # <<<<<<<<<<<<<< * if ncoefs_count > 0: * ncoefs_mean /= ncoefs_count */ if (unlikely(__pyx_v_pcoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5199, __pyx_L1_error) } __pyx_v_pcoefs_mean = (__pyx_v_pcoefs_mean / __pyx_v_pcoefs_count); /* "pyscipopt/scip.pyx":5198 * ncoefs_min = coef if ncoefs_count == 1 else min(ncoefs_min, coef) * ncoefs_max = coef if ncoefs_count == 1 else max(ncoefs_max, coef) * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: */ } /* "pyscipopt/scip.pyx":5200 * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): */ __pyx_t_80 = ((__pyx_v_ncoefs_count > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5201 * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: * ncoefs_mean /= ncoefs_count # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] */ if (unlikely(__pyx_v_ncoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5201, __pyx_L1_error) } __pyx_v_ncoefs_mean = (__pyx_v_ncoefs_mean / __pyx_v_ncoefs_count); /* "pyscipopt/scip.pyx":5200 * if pcoefs_count > 0: * pcoefs_mean /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): */ } /* "pyscipopt/scip.pyx":5202 * if ncoefs_count > 0: * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: */ __pyx_t_86 = __pyx_v_nb_neighbors; __pyx_t_87 = __pyx_t_86; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_87; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5203 * ncoefs_mean /= ncoefs_count * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":5204 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: */ __pyx_t_80 = ((__pyx_v_coef > 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5205 * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 # <<<<<<<<<<<<<< * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 */ __pyx_v_pcoefs_var = (__pyx_v_pcoefs_var + pow((__pyx_v_coef - __pyx_v_pcoefs_mean), 2.0)); /* "pyscipopt/scip.pyx":5204 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: */ } /* "pyscipopt/scip.pyx":5206 * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: */ __pyx_t_80 = ((__pyx_v_coef < 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5207 * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 # <<<<<<<<<<<<<< * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count */ __pyx_v_ncoefs_var = (__pyx_v_ncoefs_var + pow((__pyx_v_coef - __pyx_v_ncoefs_mean), 2.0)); /* "pyscipopt/scip.pyx":5206 * if coef > 0: * pcoefs_var += (coef - pcoefs_mean)**2 * if coef < 0: # <<<<<<<<<<<<<< * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: */ } } /* "pyscipopt/scip.pyx":5208 * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: */ __pyx_t_80 = ((__pyx_v_pcoefs_count > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5209 * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count # <<<<<<<<<<<<<< * if ncoefs_count > 0: * ncoefs_var /= ncoefs_count */ if (unlikely(__pyx_v_pcoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5209, __pyx_L1_error) } __pyx_v_pcoefs_var = (__pyx_v_pcoefs_var / __pyx_v_pcoefs_count); /* "pyscipopt/scip.pyx":5208 * if coef < 0: * ncoefs_var += (coef - ncoefs_mean)**2 * if pcoefs_count > 0: # <<<<<<<<<<<<<< * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: */ } /* "pyscipopt/scip.pyx":5210 * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_var /= ncoefs_count * root_info['col']['root_pcoefs_count'][col_i] = pcoefs_count */ __pyx_t_80 = ((__pyx_v_ncoefs_count > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5211 * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: * ncoefs_var /= ncoefs_count # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_count'][col_i] = pcoefs_count * root_info['col']['root_pcoefs_mean'][col_i] = pcoefs_mean */ if (unlikely(__pyx_v_ncoefs_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5211, __pyx_L1_error) } __pyx_v_ncoefs_var = (__pyx_v_ncoefs_var / __pyx_v_ncoefs_count); /* "pyscipopt/scip.pyx":5210 * if pcoefs_count > 0: * pcoefs_var /= pcoefs_count * if ncoefs_count > 0: # <<<<<<<<<<<<<< * ncoefs_var /= ncoefs_count * root_info['col']['root_pcoefs_count'][col_i] = pcoefs_count */ } /* "pyscipopt/scip.pyx":5212 * if ncoefs_count > 0: * ncoefs_var /= ncoefs_count * root_info['col']['root_pcoefs_count'][col_i] = pcoefs_count # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_mean'][col_i] = pcoefs_mean * root_info['col']['root_pcoefs_var'][col_i] = pcoefs_var */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pcoefs_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_pcoefs_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5213 * ncoefs_var /= ncoefs_count * root_info['col']['root_pcoefs_count'][col_i] = pcoefs_count * root_info['col']['root_pcoefs_mean'][col_i] = pcoefs_mean # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_var'][col_i] = pcoefs_var * root_info['col']['root_pcoefs_min'][col_i] = pcoefs_min */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pcoefs_mean); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_mean); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5214 * root_info['col']['root_pcoefs_count'][col_i] = pcoefs_count * root_info['col']['root_pcoefs_mean'][col_i] = pcoefs_mean * root_info['col']['root_pcoefs_var'][col_i] = pcoefs_var # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_min'][col_i] = pcoefs_min * root_info['col']['root_pcoefs_max'][col_i] = pcoefs_max */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pcoefs_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_pcoefs_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5215 * root_info['col']['root_pcoefs_mean'][col_i] = pcoefs_mean * root_info['col']['root_pcoefs_var'][col_i] = pcoefs_var * root_info['col']['root_pcoefs_min'][col_i] = pcoefs_min # <<<<<<<<<<<<<< * root_info['col']['root_pcoefs_max'][col_i] = pcoefs_max * root_info['col']['root_ncoefs_count'][col_i] = ncoefs_count */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pcoefs_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_pcoefs_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5216 * root_info['col']['root_pcoefs_var'][col_i] = pcoefs_var * root_info['col']['root_pcoefs_min'][col_i] = pcoefs_min * root_info['col']['root_pcoefs_max'][col_i] = pcoefs_max # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_count'][col_i] = ncoefs_count * root_info['col']['root_ncoefs_mean'][col_i] = ncoefs_mean */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pcoefs_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_pcoefs_max); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5217 * root_info['col']['root_pcoefs_min'][col_i] = pcoefs_min * root_info['col']['root_pcoefs_max'][col_i] = pcoefs_max * root_info['col']['root_ncoefs_count'][col_i] = ncoefs_count # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_mean'][col_i] = ncoefs_mean * root_info['col']['root_ncoefs_var'][col_i] = ncoefs_var */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncoefs_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5218 * root_info['col']['root_pcoefs_max'][col_i] = pcoefs_max * root_info['col']['root_ncoefs_count'][col_i] = ncoefs_count * root_info['col']['root_ncoefs_mean'][col_i] = ncoefs_mean # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_var'][col_i] = ncoefs_var * root_info['col']['root_ncoefs_min'][col_i] = ncoefs_min */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ncoefs_mean); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_ncoefs_mean); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5219 * root_info['col']['root_ncoefs_count'][col_i] = ncoefs_count * root_info['col']['root_ncoefs_mean'][col_i] = ncoefs_mean * root_info['col']['root_ncoefs_var'][col_i] = ncoefs_var # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_min'][col_i] = ncoefs_min * root_info['col']['root_ncoefs_max'][col_i] = ncoefs_max */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ncoefs_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5220 * root_info['col']['root_ncoefs_mean'][col_i] = ncoefs_mean * root_info['col']['root_ncoefs_var'][col_i] = ncoefs_var * root_info['col']['root_ncoefs_min'][col_i] = ncoefs_min # <<<<<<<<<<<<<< * root_info['col']['root_ncoefs_max'][col_i] = ncoefs_max * */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ncoefs_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_root_ncoefs_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_4, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5221 * root_info['col']['root_ncoefs_var'][col_i] = ncoefs_var * root_info['col']['root_ncoefs_min'][col_i] = ncoefs_min * root_info['col']['root_ncoefs_max'][col_i] = ncoefs_max # <<<<<<<<<<<<<< * * for cand_i in range(ncands): */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ncoefs_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_root_ncoefs_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_6, __pyx_v_col_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pyscipopt/scip.pyx":5123 * * # if at root node, extract root information * if SCIPgetNNodes(scip) == 1: # <<<<<<<<<<<<<< * root_info['col'] = {} * root_info['col']['coefs'] = {} */ } /* "pyscipopt/scip.pyx":5223 * root_info['col']['root_ncoefs_max'][col_i] = ncoefs_max * * for cand_i in range(ncands): # <<<<<<<<<<<<<< * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) */ __pyx_t_8 = __pyx_v_ncands; __pyx_t_81 = __pyx_t_8; for (__pyx_t_82 = 0; __pyx_t_82 < __pyx_t_81; __pyx_t_82+=1) { __pyx_v_cand_i = __pyx_t_82; /* "pyscipopt/scip.pyx":5224 * * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var # <<<<<<<<<<<<<< * col = SCIPvarGetCol(var) * col_i = SCIPcolGetIndex(col) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_candidates, __pyx_v_cand_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_98 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)->scip_var; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_var = __pyx_t_98; /* "pyscipopt/scip.pyx":5225 * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) # <<<<<<<<<<<<<< * col_i = SCIPcolGetIndex(col) * cand_coefs[cand_i] = root_info['col']['coefs'][col_i] */ __pyx_v_col = SCIPvarGetCol(__pyx_v_var); /* "pyscipopt/scip.pyx":5226 * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) * col_i = SCIPcolGetIndex(col) # <<<<<<<<<<<<<< * cand_coefs[cand_i] = root_info['col']['coefs'][col_i] * cand_coefs_pos[cand_i] = root_info['col']['coefs_pos'][col_i] */ __pyx_v_col_i = SCIPcolGetIndex(__pyx_v_col); /* "pyscipopt/scip.pyx":5227 * col = SCIPvarGetCol(var) * col_i = SCIPcolGetIndex(col) * cand_coefs[cand_i] = root_info['col']['coefs'][col_i] # <<<<<<<<<<<<<< * cand_coefs_pos[cand_i] = root_info['col']['coefs_pos'][col_i] * cand_coefs_neg[cand_i] = root_info['col']['coefs_neg'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_coefs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_coefs.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_coefs.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5227, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_coefs.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5228 * col_i = SCIPcolGetIndex(col) * cand_coefs[cand_i] = root_info['col']['coefs'][col_i] * cand_coefs_pos[cand_i] = root_info['col']['coefs_pos'][col_i] # <<<<<<<<<<<<<< * cand_coefs_neg[cand_i] = root_info['col']['coefs_neg'][col_i] * cand_nnzrs[cand_i] = root_info['col']['nnzrs'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_coefs_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_coefs_pos.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_coefs_pos.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5228, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_coefs_pos.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5229 * cand_coefs[cand_i] = root_info['col']['coefs'][col_i] * cand_coefs_pos[cand_i] = root_info['col']['coefs_pos'][col_i] * cand_coefs_neg[cand_i] = root_info['col']['coefs_neg'][col_i] # <<<<<<<<<<<<<< * cand_nnzrs[cand_i] = root_info['col']['nnzrs'][col_i] * cand_root_cdeg_mean[cand_i] = root_info['col']['root_cdeg_mean'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_coefs_neg); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_coefs_neg.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_coefs_neg.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5229, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_coefs_neg.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5230 * cand_coefs_pos[cand_i] = root_info['col']['coefs_pos'][col_i] * cand_coefs_neg[cand_i] = root_info['col']['coefs_neg'][col_i] * cand_nnzrs[cand_i] = root_info['col']['nnzrs'][col_i] # <<<<<<<<<<<<<< * cand_root_cdeg_mean[cand_i] = root_info['col']['root_cdeg_mean'][col_i] * cand_root_cdeg_var[cand_i] = root_info['col']['root_cdeg_var'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_nnzrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_101 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_101 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nnzrs.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nnzrs.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5230, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nnzrs.diminfo[0].strides) = __pyx_t_101; /* "pyscipopt/scip.pyx":5231 * cand_coefs_neg[cand_i] = root_info['col']['coefs_neg'][col_i] * cand_nnzrs[cand_i] = root_info['col']['nnzrs'][col_i] * cand_root_cdeg_mean[cand_i] = root_info['col']['root_cdeg_mean'][col_i] # <<<<<<<<<<<<<< * cand_root_cdeg_var[cand_i] = root_info['col']['root_cdeg_var'][col_i] * cand_root_cdeg_min[cand_i] = root_info['col']['root_cdeg_min'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_cdeg_mean); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5231, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5231, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5232 * cand_nnzrs[cand_i] = root_info['col']['nnzrs'][col_i] * cand_root_cdeg_mean[cand_i] = root_info['col']['root_cdeg_mean'][col_i] * cand_root_cdeg_var[cand_i] = root_info['col']['root_cdeg_var'][col_i] # <<<<<<<<<<<<<< * cand_root_cdeg_min[cand_i] = root_info['col']['root_cdeg_min'][col_i] * cand_root_cdeg_max[cand_i] = root_info['col']['root_cdeg_max'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_cdeg_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_var.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_var.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5232, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_var.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5233 * cand_root_cdeg_mean[cand_i] = root_info['col']['root_cdeg_mean'][col_i] * cand_root_cdeg_var[cand_i] = root_info['col']['root_cdeg_var'][col_i] * cand_root_cdeg_min[cand_i] = root_info['col']['root_cdeg_min'][col_i] # <<<<<<<<<<<<<< * cand_root_cdeg_max[cand_i] = root_info['col']['root_cdeg_max'][col_i] * cand_root_pcoefs_count[cand_i] = root_info['col']['root_pcoefs_count'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_cdeg_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_101 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_101 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5233, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].strides) = __pyx_t_101; /* "pyscipopt/scip.pyx":5234 * cand_root_cdeg_var[cand_i] = root_info['col']['root_cdeg_var'][col_i] * cand_root_cdeg_min[cand_i] = root_info['col']['root_cdeg_min'][col_i] * cand_root_cdeg_max[cand_i] = root_info['col']['root_cdeg_max'][col_i] # <<<<<<<<<<<<<< * cand_root_pcoefs_count[cand_i] = root_info['col']['root_pcoefs_count'][col_i] * cand_root_pcoefs_mean[cand_i] = root_info['col']['root_pcoefs_mean'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_cdeg_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_101 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_101 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5234, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].strides) = __pyx_t_101; /* "pyscipopt/scip.pyx":5235 * cand_root_cdeg_min[cand_i] = root_info['col']['root_cdeg_min'][col_i] * cand_root_cdeg_max[cand_i] = root_info['col']['root_cdeg_max'][col_i] * cand_root_pcoefs_count[cand_i] = root_info['col']['root_pcoefs_count'][col_i] # <<<<<<<<<<<<<< * cand_root_pcoefs_mean[cand_i] = root_info['col']['root_pcoefs_mean'][col_i] * cand_root_pcoefs_var[cand_i] = root_info['col']['root_pcoefs_var'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_101 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_101 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_pcoefs_count.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_pcoefs_count.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5235, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_pcoefs_count.diminfo[0].strides) = __pyx_t_101; /* "pyscipopt/scip.pyx":5236 * cand_root_cdeg_max[cand_i] = root_info['col']['root_cdeg_max'][col_i] * cand_root_pcoefs_count[cand_i] = root_info['col']['root_pcoefs_count'][col_i] * cand_root_pcoefs_mean[cand_i] = root_info['col']['root_pcoefs_mean'][col_i] # <<<<<<<<<<<<<< * cand_root_pcoefs_var[cand_i] = root_info['col']['root_pcoefs_var'][col_i] * cand_root_pcoefs_min[cand_i] = root_info['col']['root_pcoefs_min'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_mean); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_pcoefs_mean.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_pcoefs_mean.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5236, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_pcoefs_mean.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5237 * cand_root_pcoefs_count[cand_i] = root_info['col']['root_pcoefs_count'][col_i] * cand_root_pcoefs_mean[cand_i] = root_info['col']['root_pcoefs_mean'][col_i] * cand_root_pcoefs_var[cand_i] = root_info['col']['root_pcoefs_var'][col_i] # <<<<<<<<<<<<<< * cand_root_pcoefs_min[cand_i] = root_info['col']['root_pcoefs_min'][col_i] * cand_root_pcoefs_max[cand_i] = root_info['col']['root_pcoefs_max'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_pcoefs_var.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_pcoefs_var.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5237, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_pcoefs_var.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5238 * cand_root_pcoefs_mean[cand_i] = root_info['col']['root_pcoefs_mean'][col_i] * cand_root_pcoefs_var[cand_i] = root_info['col']['root_pcoefs_var'][col_i] * cand_root_pcoefs_min[cand_i] = root_info['col']['root_pcoefs_min'][col_i] # <<<<<<<<<<<<<< * cand_root_pcoefs_max[cand_i] = root_info['col']['root_pcoefs_max'][col_i] * cand_root_ncoefs_count[cand_i] = root_info['col']['root_ncoefs_count'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_pcoefs_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_pcoefs_min.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5238, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_pcoefs_min.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5239 * cand_root_pcoefs_var[cand_i] = root_info['col']['root_pcoefs_var'][col_i] * cand_root_pcoefs_min[cand_i] = root_info['col']['root_pcoefs_min'][col_i] * cand_root_pcoefs_max[cand_i] = root_info['col']['root_pcoefs_max'][col_i] # <<<<<<<<<<<<<< * cand_root_ncoefs_count[cand_i] = root_info['col']['root_ncoefs_count'][col_i] * cand_root_ncoefs_mean[cand_i] = root_info['col']['root_ncoefs_mean'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_pcoefs_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_pcoefs_max.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5239, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_pcoefs_max.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5240 * cand_root_pcoefs_min[cand_i] = root_info['col']['root_pcoefs_min'][col_i] * cand_root_pcoefs_max[cand_i] = root_info['col']['root_pcoefs_max'][col_i] * cand_root_ncoefs_count[cand_i] = root_info['col']['root_ncoefs_count'][col_i] # <<<<<<<<<<<<<< * cand_root_ncoefs_mean[cand_i] = root_info['col']['root_ncoefs_mean'][col_i] * cand_root_ncoefs_var[cand_i] = root_info['col']['root_ncoefs_var'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_101 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_101 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_ncoefs_count.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_ncoefs_count.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5240, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_ncoefs_count.diminfo[0].strides) = __pyx_t_101; /* "pyscipopt/scip.pyx":5241 * cand_root_pcoefs_max[cand_i] = root_info['col']['root_pcoefs_max'][col_i] * cand_root_ncoefs_count[cand_i] = root_info['col']['root_ncoefs_count'][col_i] * cand_root_ncoefs_mean[cand_i] = root_info['col']['root_ncoefs_mean'][col_i] # <<<<<<<<<<<<<< * cand_root_ncoefs_var[cand_i] = root_info['col']['root_ncoefs_var'][col_i] * cand_root_ncoefs_min[cand_i] = root_info['col']['root_ncoefs_min'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_mean); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_ncoefs_mean.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_ncoefs_mean.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5241, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_ncoefs_mean.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5242 * cand_root_ncoefs_count[cand_i] = root_info['col']['root_ncoefs_count'][col_i] * cand_root_ncoefs_mean[cand_i] = root_info['col']['root_ncoefs_mean'][col_i] * cand_root_ncoefs_var[cand_i] = root_info['col']['root_ncoefs_var'][col_i] # <<<<<<<<<<<<<< * cand_root_ncoefs_min[cand_i] = root_info['col']['root_ncoefs_min'][col_i] * cand_root_ncoefs_max[cand_i] = root_info['col']['root_ncoefs_max'][col_i] */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_ncoefs_var.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_ncoefs_var.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5242, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_ncoefs_var.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5243 * cand_root_ncoefs_mean[cand_i] = root_info['col']['root_ncoefs_mean'][col_i] * cand_root_ncoefs_var[cand_i] = root_info['col']['root_ncoefs_var'][col_i] * cand_root_ncoefs_min[cand_i] = root_info['col']['root_ncoefs_min'][col_i] # <<<<<<<<<<<<<< * cand_root_ncoefs_max[cand_i] = root_info['col']['root_ncoefs_max'][col_i] * */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_ncoefs_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_ncoefs_min.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5243, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_ncoefs_min.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5244 * cand_root_ncoefs_var[cand_i] = root_info['col']['root_ncoefs_var'][col_i] * cand_root_ncoefs_min[cand_i] = root_info['col']['root_ncoefs_min'][col_i] * cand_root_ncoefs_max[cand_i] = root_info['col']['root_ncoefs_max'][col_i] # <<<<<<<<<<<<<< * * # Simple dynamic */ __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_root_info, __pyx_n_u_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_col_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_ncoefs_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_ncoefs_max.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5244, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_ncoefs_max.diminfo[0].strides) = __pyx_t_99; } /* "pyscipopt/scip.pyx":5258 * cdef SCIP_Real* neighbor_columns_values * cdef int nbranchings * for cand_i in range(ncands): # <<<<<<<<<<<<<< * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) */ __pyx_t_8 = __pyx_v_ncands; __pyx_t_81 = __pyx_t_8; for (__pyx_t_82 = 0; __pyx_t_82 < __pyx_t_81; __pyx_t_82+=1) { __pyx_v_cand_i = __pyx_t_82; /* "pyscipopt/scip.pyx":5259 * cdef int nbranchings * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var # <<<<<<<<<<<<<< * col = SCIPvarGetCol(var) * neighbors = SCIPcolGetRows(col) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_candidates, __pyx_v_cand_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_98 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)->scip_var; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_var = __pyx_t_98; /* "pyscipopt/scip.pyx":5260 * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) # <<<<<<<<<<<<<< * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) */ __pyx_v_col = SCIPvarGetCol(__pyx_v_var); /* "pyscipopt/scip.pyx":5261 * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) * neighbors = SCIPcolGetRows(col) # <<<<<<<<<<<<<< * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) */ __pyx_v_neighbors = SCIPcolGetRows(__pyx_v_col); /* "pyscipopt/scip.pyx":5262 * col = SCIPvarGetCol(var) * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * nonzero_coefs_raw = SCIPcolGetVals(col) * */ __pyx_v_nb_neighbors = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":5263 * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) # <<<<<<<<<<<<<< * * # Slack and ceil distances (2) */ __pyx_v_nonzero_coefs_raw = SCIPcolGetVals(__pyx_v_col); /* "pyscipopt/scip.pyx":5267 * # Slack and ceil distances (2) * # min{xijfloor(xij),ceil(xij) xij} and ceil(xij) xij * solval = SCIPcolGetPrimsol(col) # <<<<<<<<<<<<<< * cand_solfracs[cand_i] = SCIPfeasFrac(scip, solval) * cand_slack[cand_i] = min(cand_solfracs[cand_i], 1-cand_solfracs[cand_i]) */ __pyx_v_solval = SCIPcolGetPrimsol(__pyx_v_col); /* "pyscipopt/scip.pyx":5268 * # min{xijfloor(xij),ceil(xij) xij} and ceil(xij) xij * solval = SCIPcolGetPrimsol(col) * cand_solfracs[cand_i] = SCIPfeasFrac(scip, solval) # <<<<<<<<<<<<<< * cand_slack[cand_i] = min(cand_solfracs[cand_i], 1-cand_solfracs[cand_i]) * */ __pyx_t_3 = PyFloat_FromDouble(SCIPfeasFrac(__pyx_v_scip, __pyx_v_solval)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_SetItemInt(__pyx_v_cand_solfracs, __pyx_v_cand_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5269 * solval = SCIPcolGetPrimsol(col) * cand_solfracs[cand_i] = SCIPfeasFrac(scip, solval) * cand_slack[cand_i] = min(cand_solfracs[cand_i], 1-cand_solfracs[cand_i]) # <<<<<<<<<<<<<< * * # Pseudocosts (5) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_cand_solfracs, __pyx_v_cand_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_t_3, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_cand_solfracs, __pyx_v_cand_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5269, __pyx_L1_error) __pyx_t_80 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_80 < 0)) __PYX_ERR(3, 5269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_80) { __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_99 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_99 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_slack.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_slack.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5269, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_slack.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_slack.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5274 * # Upwards and downwards values, and their corresponding ratio, sum and product, * # weighted by the fractionality of xj * cand_ps_up[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_UPWARDS) # <<<<<<<<<<<<<< * cand_ps_down[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_DOWNWARDS) * cand_ps_sum[cand_i] = cand_ps_up[cand_i] + cand_ps_down[cand_i] */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ps_up.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ps_up.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5274, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ps_up.diminfo[0].strides) = SCIPgetVarPseudocost(__pyx_v_scip, __pyx_v_var, SCIP_BRANCHDIR_UPWARDS); /* "pyscipopt/scip.pyx":5275 * # weighted by the fractionality of xj * cand_ps_up[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_UPWARDS) * cand_ps_down[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_DOWNWARDS) # <<<<<<<<<<<<<< * cand_ps_sum[cand_i] = cand_ps_up[cand_i] + cand_ps_down[cand_i] * cand_ps_ratio[cand_i] = 0 if cand_ps_up[cand_i] == 0 else cand_ps_up[cand_i] / cand_ps_sum[cand_i] */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ps_down.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ps_down.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5275, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ps_down.diminfo[0].strides) = SCIPgetVarPseudocost(__pyx_v_scip, __pyx_v_var, SCIP_BRANCHDIR_DOWNWARDS); /* "pyscipopt/scip.pyx":5276 * cand_ps_up[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_UPWARDS) * cand_ps_down[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_DOWNWARDS) * cand_ps_sum[cand_i] = cand_ps_up[cand_i] + cand_ps_down[cand_i] # <<<<<<<<<<<<<< * cand_ps_ratio[cand_i] = 0 if cand_ps_up[cand_i] == 0 else cand_ps_up[cand_i] / cand_ps_sum[cand_i] * cand_ps_product[cand_i] = cand_ps_up[cand_i] * cand_ps_down[cand_i] */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ps_up.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ps_up.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5276, __pyx_L1_error) } __pyx_t_102 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_102 < 0) { __pyx_t_102 += __pyx_pybuffernd_cand_ps_down.diminfo[0].shape; if (unlikely(__pyx_t_102 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_102 >= __pyx_pybuffernd_cand_ps_down.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5276, __pyx_L1_error) } __pyx_t_103 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_103 < 0) { __pyx_t_103 += __pyx_pybuffernd_cand_ps_sum.diminfo[0].shape; if (unlikely(__pyx_t_103 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_103 >= __pyx_pybuffernd_cand_ps_sum.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5276, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer.buf, __pyx_t_103, __pyx_pybuffernd_cand_ps_sum.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ps_up.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer.buf, __pyx_t_102, __pyx_pybuffernd_cand_ps_down.diminfo[0].strides))); /* "pyscipopt/scip.pyx":5277 * cand_ps_down[cand_i] = SCIPgetVarPseudocost(scip, var, SCIP_BRANCHDIR_DOWNWARDS) * cand_ps_sum[cand_i] = cand_ps_up[cand_i] + cand_ps_down[cand_i] * cand_ps_ratio[cand_i] = 0 if cand_ps_up[cand_i] == 0 else cand_ps_up[cand_i] / cand_ps_sum[cand_i] # <<<<<<<<<<<<<< * cand_ps_product[cand_i] = cand_ps_up[cand_i] * cand_ps_down[cand_i] * */ __pyx_t_102 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_102 < 0) { __pyx_t_102 += __pyx_pybuffernd_cand_ps_up.diminfo[0].shape; if (unlikely(__pyx_t_102 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_102 >= __pyx_pybuffernd_cand_ps_up.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5277, __pyx_L1_error) } if ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.buf, __pyx_t_102, __pyx_pybuffernd_cand_ps_up.diminfo[0].strides)) == 0.0) != 0)) { __pyx_t_99 = 0.0; } else { __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ps_up.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ps_up.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5277, __pyx_L1_error) } __pyx_t_104 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ps_up.diminfo[0].strides)); __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ps_sum.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ps_sum.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5277, __pyx_L1_error) } __pyx_t_105 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ps_sum.diminfo[0].strides)); if (unlikely(__pyx_t_105 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5277, __pyx_L1_error) } __pyx_t_99 = (__pyx_t_104 / __pyx_t_105); } __pyx_t_102 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_102 < 0) { __pyx_t_102 += __pyx_pybuffernd_cand_ps_ratio.diminfo[0].shape; if (unlikely(__pyx_t_102 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_102 >= __pyx_pybuffernd_cand_ps_ratio.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5277, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer.buf, __pyx_t_102, __pyx_pybuffernd_cand_ps_ratio.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5278 * cand_ps_sum[cand_i] = cand_ps_up[cand_i] + cand_ps_down[cand_i] * cand_ps_ratio[cand_i] = 0 if cand_ps_up[cand_i] == 0 else cand_ps_up[cand_i] / cand_ps_sum[cand_i] * cand_ps_product[cand_i] = cand_ps_up[cand_i] * cand_ps_down[cand_i] # <<<<<<<<<<<<<< * * # Infeasibility statistics (4) */ __pyx_t_102 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_102 < 0) { __pyx_t_102 += __pyx_pybuffernd_cand_ps_up.diminfo[0].shape; if (unlikely(__pyx_t_102 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_102 >= __pyx_pybuffernd_cand_ps_up.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5278, __pyx_L1_error) } __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ps_down.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ps_down.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5278, __pyx_L1_error) } __pyx_t_103 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_103 < 0) { __pyx_t_103 += __pyx_pybuffernd_cand_ps_product.diminfo[0].shape; if (unlikely(__pyx_t_103 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_103 >= __pyx_pybuffernd_cand_ps_product.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5278, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer.buf, __pyx_t_103, __pyx_pybuffernd_cand_ps_product.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer.buf, __pyx_t_102, __pyx_pybuffernd_cand_ps_up.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ps_down.diminfo[0].strides))); /* "pyscipopt/scip.pyx":5284 * # infeasible children (during data collection) * # N.B. replaced by left, right infeasibility * cand_nb_up_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_UPWARDS) # <<<<<<<<<<<<<< * cand_nb_down_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_DOWNWARDS) * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_UPWARDS) */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5284, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].strides) = SCIPvarGetCutoffSum(__pyx_v_var, SCIP_BRANCHDIR_UPWARDS); /* "pyscipopt/scip.pyx":5285 * # N.B. replaced by left, right infeasibility * cand_nb_up_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_UPWARDS) * cand_nb_down_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_DOWNWARDS) # <<<<<<<<<<<<<< * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_UPWARDS) * cand_frac_up_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_up_infeas[cand_i] / nbranchings */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5285, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].strides) = SCIPvarGetCutoffSum(__pyx_v_var, SCIP_BRANCHDIR_DOWNWARDS); /* "pyscipopt/scip.pyx":5286 * cand_nb_up_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_UPWARDS) * cand_nb_down_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_DOWNWARDS) * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_UPWARDS) # <<<<<<<<<<<<<< * cand_frac_up_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_up_infeas[cand_i] / nbranchings * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_DOWNWARDS) */ __pyx_v_nbranchings = SCIPvarGetNBranchings(__pyx_v_var, SCIP_BRANCHDIR_UPWARDS); /* "pyscipopt/scip.pyx":5287 * cand_nb_down_infeas[cand_i] = SCIPvarGetCutoffSum(var, SCIP_BRANCHDIR_DOWNWARDS) * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_UPWARDS) * cand_frac_up_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_up_infeas[cand_i] / nbranchings # <<<<<<<<<<<<<< * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_DOWNWARDS) * cand_frac_down_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_down_infeas[cand_i] / nbranchings */ if (((__pyx_v_nbranchings == 0) != 0)) { __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; } else { __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5287, __pyx_L1_error) } __pyx_t_99 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nb_up_infeas.diminfo[0].strides)); if (unlikely(__pyx_v_nbranchings == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5287, __pyx_L1_error) } __pyx_t_6 = PyFloat_FromDouble((__pyx_t_99 / ((__pyx_t_5numpy_float32_t)__pyx_v_nbranchings))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; } if (unlikely(__Pyx_SetItemInt(__pyx_v_cand_frac_up_infeas, __pyx_v_cand_i, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5288 * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_UPWARDS) * cand_frac_up_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_up_infeas[cand_i] / nbranchings * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_DOWNWARDS) # <<<<<<<<<<<<<< * cand_frac_down_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_down_infeas[cand_i] / nbranchings * */ __pyx_v_nbranchings = SCIPvarGetNBranchings(__pyx_v_var, SCIP_BRANCHDIR_DOWNWARDS); /* "pyscipopt/scip.pyx":5289 * cand_frac_up_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_up_infeas[cand_i] / nbranchings * nbranchings = SCIPvarGetNBranchings(var, SCIP_BRANCHDIR_DOWNWARDS) * cand_frac_down_infeas[cand_i] = 0 if nbranchings == 0 else cand_nb_down_infeas[cand_i] / nbranchings # <<<<<<<<<<<<<< * * # Stats. for constraint degrees (7) */ if (((__pyx_v_nbranchings == 0) != 0)) { __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; } else { __pyx_t_100 = __pyx_v_cand_i; __pyx_t_86 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_86 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].shape)) __pyx_t_86 = 0; if (unlikely(__pyx_t_86 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_86); __PYX_ERR(3, 5289, __pyx_L1_error) } __pyx_t_99 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nb_down_infeas.diminfo[0].strides)); if (unlikely(__pyx_v_nbranchings == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5289, __pyx_L1_error) } __pyx_t_6 = PyFloat_FromDouble((__pyx_t_99 / ((__pyx_t_5numpy_float32_t)__pyx_v_nbranchings))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; } if (unlikely(__Pyx_SetItemInt(__pyx_v_cand_frac_down_infeas, __pyx_v_cand_i, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5295 * # on the current nodes LP.The ratios of the static mean, maximum and minimum to * # their dynamic counterparts are also features * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 # <<<<<<<<<<<<<< * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): */ __pyx_t_85 = 0.0; __pyx_t_84 = 0.0; __pyx_t_86 = 0; __pyx_t_87 = 0; __pyx_v_cdeg_var = __pyx_t_85; __pyx_v_cdeg_mean = __pyx_t_84; __pyx_v_cdeg_min = __pyx_t_86; __pyx_v_cdeg_max = __pyx_t_87; /* "pyscipopt/scip.pyx":5296 * # their dynamic counterparts are also features * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) */ __pyx_t_80 = ((__pyx_v_nb_neighbors > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5297 * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5298 * if nb_neighbors > 0: * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) */ __pyx_v_cdeg = SCIProwGetNLPNonz((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5299 * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg # <<<<<<<<<<<<<< * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) */ __pyx_v_cdeg_mean = (__pyx_v_cdeg_mean + __pyx_v_cdeg); /* "pyscipopt/scip.pyx":5300 * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) # <<<<<<<<<<<<<< * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors */ if (((__pyx_v_neighbor_index == 0) != 0)) { __pyx_t_89 = __pyx_v_cdeg; } else { __pyx_t_91 = __pyx_v_cdeg; __pyx_t_92 = __pyx_v_cdeg_max; if (((__pyx_t_91 > __pyx_t_92) != 0)) { __pyx_t_90 = __pyx_t_91; } else { __pyx_t_90 = __pyx_t_92; } __pyx_t_89 = __pyx_t_90; } __pyx_v_cdeg_max = __pyx_t_89; /* "pyscipopt/scip.pyx":5301 * cdeg_mean += cdeg * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) # <<<<<<<<<<<<<< * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): */ if (((__pyx_v_neighbor_index == 0) != 0)) { __pyx_t_89 = __pyx_v_cdeg; } else { __pyx_t_90 = __pyx_v_cdeg; __pyx_t_91 = __pyx_v_cdeg_min; if (((__pyx_t_90 < __pyx_t_91) != 0)) { __pyx_t_92 = __pyx_t_90; } else { __pyx_t_92 = __pyx_t_91; } __pyx_t_89 = __pyx_t_92; } __pyx_v_cdeg_min = __pyx_t_89; } /* "pyscipopt/scip.pyx":5302 * cdeg_max = cdeg if neighbor_index == 0 else max(cdeg_max, cdeg) * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) */ if (unlikely(__pyx_v_nb_neighbors == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5302, __pyx_L1_error) } __pyx_v_cdeg_mean = (__pyx_v_cdeg_mean / __pyx_v_nb_neighbors); /* "pyscipopt/scip.pyx":5303 * cdeg_min = cdeg if neighbor_index == 0 else min(cdeg_min, cdeg) * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) * cdeg_var += (cdeg - cdeg_mean)**2 */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5304 * cdeg_mean /= nb_neighbors * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors */ __pyx_v_cdeg = SCIProwGetNLPNonz((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5305 * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) * cdeg_var += (cdeg - cdeg_mean)**2 # <<<<<<<<<<<<<< * cdeg_var /= nb_neighbors * cand_cdeg_mean[cand_i] = cdeg_mean */ __pyx_v_cdeg_var = (__pyx_v_cdeg_var + powf((__pyx_v_cdeg - __pyx_v_cdeg_mean), 2.0)); } /* "pyscipopt/scip.pyx":5306 * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors # <<<<<<<<<<<<<< * cand_cdeg_mean[cand_i] = cdeg_mean * cand_cdeg_var[cand_i] = cdeg_var */ if (unlikely(__pyx_v_nb_neighbors == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5306, __pyx_L1_error) } __pyx_v_cdeg_var = (__pyx_v_cdeg_var / __pyx_v_nb_neighbors); /* "pyscipopt/scip.pyx":5296 * # their dynamic counterparts are also features * cdeg_var, cdeg_mean, cdeg_min, cdeg_max = 0, 0, 0, 0 * if nb_neighbors > 0: # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * cdeg = SCIProwGetNLPNonz(neighbors[neighbor_index]) */ } /* "pyscipopt/scip.pyx":5307 * cdeg_var += (cdeg - cdeg_mean)**2 * cdeg_var /= nb_neighbors * cand_cdeg_mean[cand_i] = cdeg_mean # <<<<<<<<<<<<<< * cand_cdeg_var[cand_i] = cdeg_var * cand_cdeg_min[cand_i] = cdeg_min */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_mean.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_mean.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5307, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_mean.diminfo[0].strides) = __pyx_v_cdeg_mean; /* "pyscipopt/scip.pyx":5308 * cdeg_var /= nb_neighbors * cand_cdeg_mean[cand_i] = cdeg_mean * cand_cdeg_var[cand_i] = cdeg_var # <<<<<<<<<<<<<< * cand_cdeg_min[cand_i] = cdeg_min * cand_cdeg_max[cand_i] = cdeg_max */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_var.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_var.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5308, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_var.diminfo[0].strides) = __pyx_v_cdeg_var; /* "pyscipopt/scip.pyx":5309 * cand_cdeg_mean[cand_i] = cdeg_mean * cand_cdeg_var[cand_i] = cdeg_var * cand_cdeg_min[cand_i] = cdeg_min # <<<<<<<<<<<<<< * cand_cdeg_max[cand_i] = cdeg_max * cand_cdeg_mean_ratio[cand_i] = 0 if cdeg_mean == 0 else cdeg_mean / (cand_root_cdeg_mean[cand_i] + cdeg_mean) */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5309, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_min.diminfo[0].strides) = __pyx_v_cdeg_min; /* "pyscipopt/scip.pyx":5310 * cand_cdeg_var[cand_i] = cdeg_var * cand_cdeg_min[cand_i] = cdeg_min * cand_cdeg_max[cand_i] = cdeg_max # <<<<<<<<<<<<<< * cand_cdeg_mean_ratio[cand_i] = 0 if cdeg_mean == 0 else cdeg_mean / (cand_root_cdeg_mean[cand_i] + cdeg_mean) * cand_cdeg_min_ratio[cand_i] = 0 if cdeg_min == 0 else cdeg_min / (cand_root_cdeg_min[cand_i] + cdeg_min) */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5310, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_max.diminfo[0].strides) = __pyx_v_cdeg_max; /* "pyscipopt/scip.pyx":5311 * cand_cdeg_min[cand_i] = cdeg_min * cand_cdeg_max[cand_i] = cdeg_max * cand_cdeg_mean_ratio[cand_i] = 0 if cdeg_mean == 0 else cdeg_mean / (cand_root_cdeg_mean[cand_i] + cdeg_mean) # <<<<<<<<<<<<<< * cand_cdeg_min_ratio[cand_i] = 0 if cdeg_min == 0 else cdeg_min / (cand_root_cdeg_min[cand_i] + cdeg_min) * cand_cdeg_max_ratio[cand_i] = 0 if cdeg_max == 0 else cdeg_max / (cand_root_cdeg_max[cand_i] + cdeg_max) */ if (((__pyx_v_cdeg_mean == 0.0) != 0)) { __pyx_t_99 = 0.0; } else { __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5311, __pyx_L1_error) } __pyx_t_105 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_mean.diminfo[0].strides)) + __pyx_v_cdeg_mean); if (unlikely(__pyx_t_105 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5311, __pyx_L1_error) } __pyx_t_99 = (((__pyx_t_5numpy_float32_t)__pyx_v_cdeg_mean) / __pyx_t_105); } __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_mean_ratio.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_mean_ratio.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5311, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_mean_ratio.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5312 * cand_cdeg_max[cand_i] = cdeg_max * cand_cdeg_mean_ratio[cand_i] = 0 if cdeg_mean == 0 else cdeg_mean / (cand_root_cdeg_mean[cand_i] + cdeg_mean) * cand_cdeg_min_ratio[cand_i] = 0 if cdeg_min == 0 else cdeg_min / (cand_root_cdeg_min[cand_i] + cdeg_min) # <<<<<<<<<<<<<< * cand_cdeg_max_ratio[cand_i] = 0 if cdeg_max == 0 else cdeg_max / (cand_root_cdeg_max[cand_i] + cdeg_max) * */ if (((__pyx_v_cdeg_min == 0) != 0)) { __pyx_t_94 = 0.0; } else { __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5312, __pyx_L1_error) } __pyx_t_101 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_min.diminfo[0].strides)) + __pyx_v_cdeg_min); if (unlikely(__pyx_t_101 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5312, __pyx_L1_error) } __pyx_t_94 = (((double)__pyx_v_cdeg_min) / ((double)__pyx_t_101)); } __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_min_ratio.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_min_ratio.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5312, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_min_ratio.diminfo[0].strides) = __pyx_t_94; /* "pyscipopt/scip.pyx":5313 * cand_cdeg_mean_ratio[cand_i] = 0 if cdeg_mean == 0 else cdeg_mean / (cand_root_cdeg_mean[cand_i] + cdeg_mean) * cand_cdeg_min_ratio[cand_i] = 0 if cdeg_min == 0 else cdeg_min / (cand_root_cdeg_min[cand_i] + cdeg_min) * cand_cdeg_max_ratio[cand_i] = 0 if cdeg_max == 0 else cdeg_max / (cand_root_cdeg_max[cand_i] + cdeg_max) # <<<<<<<<<<<<<< * * # Min/max for ratios of constraint coeffs. to RHS (4) */ if (((__pyx_v_cdeg_max == 0) != 0)) { __pyx_t_94 = 0.0; } else { __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5313, __pyx_L1_error) } __pyx_t_101 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_root_cdeg_max.diminfo[0].strides)) + __pyx_v_cdeg_max); if (unlikely(__pyx_t_101 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5313, __pyx_L1_error) } __pyx_t_94 = (((double)__pyx_v_cdeg_max) / ((double)__pyx_t_101)); } __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_cdeg_max_ratio.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_cdeg_max_ratio.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5313, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_cdeg_max_ratio.diminfo[0].strides) = __pyx_t_94; /* "pyscipopt/scip.pyx":5317 * # Min/max for ratios of constraint coeffs. to RHS (4) * # Minimum and maximum ratios across positive and negative right-hand-sides (RHS) * prhs_ratio_max, prhs_ratio_min = -1, 1 # <<<<<<<<<<<<<< * nrhs_ratio_max, nrhs_ratio_min = -1, 1 * for neighbor_index in range(nb_neighbors): */ __pyx_t_84 = -1.0; __pyx_t_85 = 1.0; __pyx_v_prhs_ratio_max = __pyx_t_84; __pyx_v_prhs_ratio_min = __pyx_t_85; /* "pyscipopt/scip.pyx":5318 * # Minimum and maximum ratios across positive and negative right-hand-sides (RHS) * prhs_ratio_max, prhs_ratio_min = -1, 1 * nrhs_ratio_max, nrhs_ratio_min = -1, 1 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] */ __pyx_t_85 = -1.0; __pyx_t_84 = 1.0; __pyx_v_nrhs_ratio_max = __pyx_t_85; __pyx_v_nrhs_ratio_min = __pyx_t_84; /* "pyscipopt/scip.pyx":5319 * prhs_ratio_max, prhs_ratio_min = -1, 1 * nrhs_ratio_max, nrhs_ratio_min = -1, 1 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * rhs = SCIProwGetRhs(neighbors[neighbor_index]) */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5320 * nrhs_ratio_max, nrhs_ratio_min = -1, 1 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":5321 * for neighbor_index in range(nb_neighbors): * coef = nonzero_coefs_raw[neighbor_index] * rhs = SCIProwGetRhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): */ __pyx_v_rhs = SCIProwGetRhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5322 * coef = nonzero_coefs_raw[neighbor_index] * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) */ __pyx_v_lhs = SCIProwGetLhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5323 * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: */ __pyx_t_80 = ((!(SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_rhs)) != 0)) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5324 * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) # <<<<<<<<<<<<<< * if rhs >= 0: * rhs_ratio_max = max(prhs_ratio_max, value) */ if (((__pyx_v_coef == 0.0) != 0)) { __pyx_t_95 = 0.0; } else { __pyx_t_96 = (REALABS(__pyx_v_coef) + REALABS(__pyx_v_rhs)); if (unlikely(__pyx_t_96 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5324, __pyx_L1_error) } __pyx_t_95 = (__pyx_v_coef / __pyx_t_96); } __pyx_v_value = __pyx_t_95; /* "pyscipopt/scip.pyx":5325 * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: # <<<<<<<<<<<<<< * rhs_ratio_max = max(prhs_ratio_max, value) * rhs_ratio_min = min(prhs_ratio_min, value) */ __pyx_t_80 = ((__pyx_v_rhs >= 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5326 * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: * rhs_ratio_max = max(prhs_ratio_max, value) # <<<<<<<<<<<<<< * rhs_ratio_min = min(prhs_ratio_min, value) * else: */ __pyx_t_84 = __pyx_v_value; __pyx_t_85 = __pyx_v_prhs_ratio_max; if (((__pyx_t_84 > __pyx_t_85) != 0)) { __pyx_t_93 = __pyx_t_84; } else { __pyx_t_93 = __pyx_t_85; } __pyx_t_4 = PyFloat_FromDouble(__pyx_t_93); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_rhs_ratio_max, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5327 * if rhs >= 0: * rhs_ratio_max = max(prhs_ratio_max, value) * rhs_ratio_min = min(prhs_ratio_min, value) # <<<<<<<<<<<<<< * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) */ __pyx_t_93 = __pyx_v_value; __pyx_t_84 = __pyx_v_prhs_ratio_min; if (((__pyx_t_93 < __pyx_t_84) != 0)) { __pyx_t_85 = __pyx_t_93; } else { __pyx_t_85 = __pyx_t_84; } __pyx_t_4 = PyFloat_FromDouble(__pyx_t_85); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_rhs_ratio_min, __pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5325 * if not SCIPisInfinity(scip, REALABS(rhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: # <<<<<<<<<<<<<< * rhs_ratio_max = max(prhs_ratio_max, value) * rhs_ratio_min = min(prhs_ratio_min, value) */ goto __pyx_L35; } /* "pyscipopt/scip.pyx":5329 * rhs_ratio_min = min(prhs_ratio_min, value) * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) # <<<<<<<<<<<<<< * nrhs_ratio_min = min(nrhs_ratio_min, value) * if not SCIPisInfinity(scip, REALABS(lhs)): */ /*else*/ { __pyx_t_85 = __pyx_v_value; __pyx_t_93 = __pyx_v_nrhs_ratio_max; if (((__pyx_t_85 > __pyx_t_93) != 0)) { __pyx_t_84 = __pyx_t_85; } else { __pyx_t_84 = __pyx_t_93; } __pyx_v_nrhs_ratio_max = __pyx_t_84; /* "pyscipopt/scip.pyx":5330 * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) # <<<<<<<<<<<<<< * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) */ __pyx_t_84 = __pyx_v_value; __pyx_t_85 = __pyx_v_nrhs_ratio_min; if (((__pyx_t_84 < __pyx_t_85) != 0)) { __pyx_t_93 = __pyx_t_84; } else { __pyx_t_93 = __pyx_t_85; } __pyx_v_nrhs_ratio_min = __pyx_t_93; } __pyx_L35:; /* "pyscipopt/scip.pyx":5323 * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * if not SCIPisInfinity(scip, REALABS(rhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(rhs)) * if rhs >= 0: */ } /* "pyscipopt/scip.pyx":5331 * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) * if not SCIPisInfinity(scip, REALABS(lhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if -lhs >= 0: */ __pyx_t_80 = ((!(SCIPisInfinity(__pyx_v_scip, REALABS(__pyx_v_lhs)) != 0)) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5332 * nrhs_ratio_min = min(nrhs_ratio_min, value) * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) # <<<<<<<<<<<<<< * if -lhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) */ if (((__pyx_v_coef == 0.0) != 0)) { __pyx_t_95 = 0.0; } else { __pyx_t_96 = (REALABS(__pyx_v_coef) + REALABS(__pyx_v_lhs)); if (unlikely(__pyx_t_96 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5332, __pyx_L1_error) } __pyx_t_95 = (__pyx_v_coef / __pyx_t_96); } __pyx_v_value = __pyx_t_95; /* "pyscipopt/scip.pyx":5333 * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if -lhs >= 0: # <<<<<<<<<<<<<< * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) */ __pyx_t_80 = (((-__pyx_v_lhs) >= 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5334 * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if -lhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) # <<<<<<<<<<<<<< * prhs_ratio_min = min(prhs_ratio_min, value) * else: */ __pyx_t_93 = __pyx_v_value; __pyx_t_84 = __pyx_v_prhs_ratio_max; if (((__pyx_t_93 > __pyx_t_84) != 0)) { __pyx_t_85 = __pyx_t_93; } else { __pyx_t_85 = __pyx_t_84; } __pyx_v_prhs_ratio_max = __pyx_t_85; /* "pyscipopt/scip.pyx":5335 * if -lhs >= 0: * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) # <<<<<<<<<<<<<< * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) */ __pyx_t_85 = __pyx_v_value; __pyx_t_93 = __pyx_v_prhs_ratio_min; if (((__pyx_t_85 < __pyx_t_93) != 0)) { __pyx_t_84 = __pyx_t_85; } else { __pyx_t_84 = __pyx_t_93; } __pyx_v_prhs_ratio_min = __pyx_t_84; /* "pyscipopt/scip.pyx":5333 * if not SCIPisInfinity(scip, REALABS(lhs)): * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if -lhs >= 0: # <<<<<<<<<<<<<< * prhs_ratio_max = max(prhs_ratio_max, value) * prhs_ratio_min = min(prhs_ratio_min, value) */ goto __pyx_L37; } /* "pyscipopt/scip.pyx":5337 * prhs_ratio_min = min(prhs_ratio_min, value) * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) # <<<<<<<<<<<<<< * nrhs_ratio_min = min(nrhs_ratio_min, value) * cand_prhs_ratio_max[cand_i] = prhs_ratio_max */ /*else*/ { __pyx_t_84 = __pyx_v_value; __pyx_t_85 = __pyx_v_nrhs_ratio_max; if (((__pyx_t_84 > __pyx_t_85) != 0)) { __pyx_t_93 = __pyx_t_84; } else { __pyx_t_93 = __pyx_t_85; } __pyx_v_nrhs_ratio_max = __pyx_t_93; /* "pyscipopt/scip.pyx":5338 * else: * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) # <<<<<<<<<<<<<< * cand_prhs_ratio_max[cand_i] = prhs_ratio_max * cand_prhs_ratio_min[cand_i] = prhs_ratio_min */ __pyx_t_93 = __pyx_v_value; __pyx_t_84 = __pyx_v_nrhs_ratio_min; if (((__pyx_t_93 < __pyx_t_84) != 0)) { __pyx_t_85 = __pyx_t_93; } else { __pyx_t_85 = __pyx_t_84; } __pyx_v_nrhs_ratio_min = __pyx_t_85; } __pyx_L37:; /* "pyscipopt/scip.pyx":5331 * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) * if not SCIPisInfinity(scip, REALABS(lhs)): # <<<<<<<<<<<<<< * value = 0 if coef == 0 else coef / (REALABS(coef) + REALABS(lhs)) * if -lhs >= 0: */ } } /* "pyscipopt/scip.pyx":5339 * nrhs_ratio_max = max(nrhs_ratio_max, value) * nrhs_ratio_min = min(nrhs_ratio_min, value) * cand_prhs_ratio_max[cand_i] = prhs_ratio_max # <<<<<<<<<<<<<< * cand_prhs_ratio_min[cand_i] = prhs_ratio_min * cand_nrhs_ratio_max[cand_i] = nrhs_ratio_max */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_prhs_ratio_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_prhs_ratio_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5339, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_prhs_ratio_max.diminfo[0].strides) = __pyx_v_prhs_ratio_max; /* "pyscipopt/scip.pyx":5340 * nrhs_ratio_min = min(nrhs_ratio_min, value) * cand_prhs_ratio_max[cand_i] = prhs_ratio_max * cand_prhs_ratio_min[cand_i] = prhs_ratio_min # <<<<<<<<<<<<<< * cand_nrhs_ratio_max[cand_i] = nrhs_ratio_max * cand_nrhs_ratio_min[cand_i] = nrhs_ratio_min */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_prhs_ratio_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_prhs_ratio_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5340, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_prhs_ratio_min.diminfo[0].strides) = __pyx_v_prhs_ratio_min; /* "pyscipopt/scip.pyx":5341 * cand_prhs_ratio_max[cand_i] = prhs_ratio_max * cand_prhs_ratio_min[cand_i] = prhs_ratio_min * cand_nrhs_ratio_max[cand_i] = nrhs_ratio_max # <<<<<<<<<<<<<< * cand_nrhs_ratio_min[cand_i] = nrhs_ratio_min * */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nrhs_ratio_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nrhs_ratio_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5341, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nrhs_ratio_max.diminfo[0].strides) = __pyx_v_nrhs_ratio_max; /* "pyscipopt/scip.pyx":5342 * cand_prhs_ratio_min[cand_i] = prhs_ratio_min * cand_nrhs_ratio_max[cand_i] = nrhs_ratio_max * cand_nrhs_ratio_min[cand_i] = nrhs_ratio_min # <<<<<<<<<<<<<< * * # Min/max for one-to-all coefficient ratios (8) */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_nrhs_ratio_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_nrhs_ratio_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5342, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_nrhs_ratio_min.diminfo[0].strides) = __pyx_v_nrhs_ratio_min; /* "pyscipopt/scip.pyx":5348 * # other variables coefficients, for a given constraint. Four versions of these ratios * # are considered: positive (negative) coefficient to sum of positive (negative) coefficients * ota_pp_max, ota_pp_min, ota_pn_max, ota_pn_min = 0, 1, 0, 1 # <<<<<<<<<<<<<< * ota_np_max, ota_np_min, ota_nn_max, ota_nn_min = 0, 1, 0, 1 * for neighbor_index in range(nb_neighbors): */ __pyx_t_85 = 0.0; __pyx_t_93 = 1.0; __pyx_t_84 = 0.0; __pyx_t_106 = 1.0; __pyx_v_ota_pp_max = __pyx_t_85; __pyx_v_ota_pp_min = __pyx_t_93; __pyx_v_ota_pn_max = __pyx_t_84; __pyx_v_ota_pn_min = __pyx_t_106; /* "pyscipopt/scip.pyx":5349 * # are considered: positive (negative) coefficient to sum of positive (negative) coefficients * ota_pp_max, ota_pp_min, ota_pn_max, ota_pn_min = 0, 1, 0, 1 * ota_np_max, ota_np_min, ota_nn_max, ota_nn_min = 0, 1, 0, 1 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * all_coefs_raw = SCIProwGetVals(neighbors[neighbor_index]) */ __pyx_t_106 = 0.0; __pyx_t_84 = 1.0; __pyx_t_93 = 0.0; __pyx_t_85 = 1.0; __pyx_v_ota_np_max = __pyx_t_106; __pyx_v_ota_np_min = __pyx_t_84; __pyx_v_ota_nn_max = __pyx_t_93; __pyx_v_ota_nn_min = __pyx_t_85; /* "pyscipopt/scip.pyx":5350 * ota_pp_max, ota_pp_min, ota_pn_max, ota_pn_min = 0, 1, 0, 1 * ota_np_max, ota_np_min, ota_nn_max, ota_nn_min = 0, 1, 0, 1 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * all_coefs_raw = SCIProwGetVals(neighbors[neighbor_index]) * neighbor_ncolumns = SCIProwGetNNonz(neighbors[neighbor_index]) */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5351 * ota_np_max, ota_np_min, ota_nn_max, ota_nn_min = 0, 1, 0, 1 * for neighbor_index in range(nb_neighbors): * all_coefs_raw = SCIProwGetVals(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * neighbor_ncolumns = SCIProwGetNNonz(neighbors[neighbor_index]) * pos_coef_sum, neg_coef_sum = 0, 0 */ __pyx_v_all_coefs_raw = SCIProwGetVals((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5352 * for neighbor_index in range(nb_neighbors): * all_coefs_raw = SCIProwGetVals(neighbors[neighbor_index]) * neighbor_ncolumns = SCIProwGetNNonz(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * pos_coef_sum, neg_coef_sum = 0, 0 * for neighbor_column_index in range(neighbor_ncolumns): */ __pyx_v_neighbor_ncolumns = SCIProwGetNNonz((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5353 * all_coefs_raw = SCIProwGetVals(neighbors[neighbor_index]) * neighbor_ncolumns = SCIProwGetNNonz(neighbors[neighbor_index]) * pos_coef_sum, neg_coef_sum = 0, 0 # <<<<<<<<<<<<<< * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_coef = all_coefs_raw[neighbor_column_index] */ __pyx_t_85 = 0.0; __pyx_t_93 = 0.0; __pyx_v_pos_coef_sum = __pyx_t_85; __pyx_v_neg_coef_sum = __pyx_t_93; /* "pyscipopt/scip.pyx":5354 * neighbor_ncolumns = SCIProwGetNNonz(neighbors[neighbor_index]) * pos_coef_sum, neg_coef_sum = 0, 0 * for neighbor_column_index in range(neighbor_ncolumns): # <<<<<<<<<<<<<< * neighbor_coef = all_coefs_raw[neighbor_column_index] * if neighbor_coef > 0: */ __pyx_t_89 = __pyx_v_neighbor_ncolumns; __pyx_t_92 = __pyx_t_89; for (__pyx_t_90 = 0; __pyx_t_90 < __pyx_t_92; __pyx_t_90+=1) { __pyx_v_neighbor_column_index = __pyx_t_90; /* "pyscipopt/scip.pyx":5355 * pos_coef_sum, neg_coef_sum = 0, 0 * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_coef = all_coefs_raw[neighbor_column_index] # <<<<<<<<<<<<<< * if neighbor_coef > 0: * pos_coef_sum += neighbor_coef */ __pyx_v_neighbor_coef = (__pyx_v_all_coefs_raw[__pyx_v_neighbor_column_index]); /* "pyscipopt/scip.pyx":5356 * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_coef = all_coefs_raw[neighbor_column_index] * if neighbor_coef > 0: # <<<<<<<<<<<<<< * pos_coef_sum += neighbor_coef * else: */ __pyx_t_80 = ((__pyx_v_neighbor_coef > 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5357 * neighbor_coef = all_coefs_raw[neighbor_column_index] * if neighbor_coef > 0: * pos_coef_sum += neighbor_coef # <<<<<<<<<<<<<< * else: * neg_coef_sum += neighbor_coef */ __pyx_v_pos_coef_sum = (__pyx_v_pos_coef_sum + __pyx_v_neighbor_coef); /* "pyscipopt/scip.pyx":5356 * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_coef = all_coefs_raw[neighbor_column_index] * if neighbor_coef > 0: # <<<<<<<<<<<<<< * pos_coef_sum += neighbor_coef * else: */ goto __pyx_L42; } /* "pyscipopt/scip.pyx":5359 * pos_coef_sum += neighbor_coef * else: * neg_coef_sum += neighbor_coef # <<<<<<<<<<<<<< * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: */ /*else*/ { __pyx_v_neg_coef_sum = (__pyx_v_neg_coef_sum + __pyx_v_neighbor_coef); } __pyx_L42:; } /* "pyscipopt/scip.pyx":5360 * else: * neg_coef_sum += neighbor_coef * coef = nonzero_coefs_raw[neighbor_index] # <<<<<<<<<<<<<< * if coef > 0: * pratio = coef / pos_coef_sum */ __pyx_v_coef = (__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index]); /* "pyscipopt/scip.pyx":5361 * neg_coef_sum += neighbor_coef * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pratio = coef / pos_coef_sum * nratio = coef / (coef - neg_coef_sum) */ __pyx_t_80 = ((__pyx_v_coef > 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5362 * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: * pratio = coef / pos_coef_sum # <<<<<<<<<<<<<< * nratio = coef / (coef - neg_coef_sum) * ota_pp_max = max(ota_pp_max, pratio) */ if (unlikely(__pyx_v_pos_coef_sum == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5362, __pyx_L1_error) } __pyx_v_pratio = (__pyx_v_coef / ((SCIP_Real)__pyx_v_pos_coef_sum)); /* "pyscipopt/scip.pyx":5363 * if coef > 0: * pratio = coef / pos_coef_sum * nratio = coef / (coef - neg_coef_sum) # <<<<<<<<<<<<<< * ota_pp_max = max(ota_pp_max, pratio) * ota_pp_min = min(ota_pp_min, pratio) */ __pyx_t_95 = (__pyx_v_coef - __pyx_v_neg_coef_sum); if (unlikely(__pyx_t_95 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5363, __pyx_L1_error) } __pyx_v_nratio = (__pyx_v_coef / __pyx_t_95); /* "pyscipopt/scip.pyx":5364 * pratio = coef / pos_coef_sum * nratio = coef / (coef - neg_coef_sum) * ota_pp_max = max(ota_pp_max, pratio) # <<<<<<<<<<<<<< * ota_pp_min = min(ota_pp_min, pratio) * ota_pn_max = max(ota_pn_max, nratio) */ __pyx_t_93 = __pyx_v_pratio; __pyx_t_85 = __pyx_v_ota_pp_max; if (((__pyx_t_93 > __pyx_t_85) != 0)) { __pyx_t_84 = __pyx_t_93; } else { __pyx_t_84 = __pyx_t_85; } __pyx_v_ota_pp_max = __pyx_t_84; /* "pyscipopt/scip.pyx":5365 * nratio = coef / (coef - neg_coef_sum) * ota_pp_max = max(ota_pp_max, pratio) * ota_pp_min = min(ota_pp_min, pratio) # <<<<<<<<<<<<<< * ota_pn_max = max(ota_pn_max, nratio) * ota_pn_min = min(ota_pn_min, nratio) */ __pyx_t_84 = __pyx_v_pratio; __pyx_t_93 = __pyx_v_ota_pp_min; if (((__pyx_t_84 < __pyx_t_93) != 0)) { __pyx_t_85 = __pyx_t_84; } else { __pyx_t_85 = __pyx_t_93; } __pyx_v_ota_pp_min = __pyx_t_85; /* "pyscipopt/scip.pyx":5366 * ota_pp_max = max(ota_pp_max, pratio) * ota_pp_min = min(ota_pp_min, pratio) * ota_pn_max = max(ota_pn_max, nratio) # <<<<<<<<<<<<<< * ota_pn_min = min(ota_pn_min, nratio) * if coef < 0: */ __pyx_t_85 = __pyx_v_nratio; __pyx_t_84 = __pyx_v_ota_pn_max; if (((__pyx_t_85 > __pyx_t_84) != 0)) { __pyx_t_93 = __pyx_t_85; } else { __pyx_t_93 = __pyx_t_84; } __pyx_v_ota_pn_max = __pyx_t_93; /* "pyscipopt/scip.pyx":5367 * ota_pp_min = min(ota_pp_min, pratio) * ota_pn_max = max(ota_pn_max, nratio) * ota_pn_min = min(ota_pn_min, nratio) # <<<<<<<<<<<<<< * if coef < 0: * pratio = coef / (coef - pos_coef_sum) */ __pyx_t_93 = __pyx_v_nratio; __pyx_t_85 = __pyx_v_ota_pn_min; if (((__pyx_t_93 < __pyx_t_85) != 0)) { __pyx_t_84 = __pyx_t_93; } else { __pyx_t_84 = __pyx_t_85; } __pyx_v_ota_pn_min = __pyx_t_84; /* "pyscipopt/scip.pyx":5361 * neg_coef_sum += neighbor_coef * coef = nonzero_coefs_raw[neighbor_index] * if coef > 0: # <<<<<<<<<<<<<< * pratio = coef / pos_coef_sum * nratio = coef / (coef - neg_coef_sum) */ } /* "pyscipopt/scip.pyx":5368 * ota_pn_max = max(ota_pn_max, nratio) * ota_pn_min = min(ota_pn_min, nratio) * if coef < 0: # <<<<<<<<<<<<<< * pratio = coef / (coef - pos_coef_sum) * nratio = coef / neg_coef_sum */ __pyx_t_80 = ((__pyx_v_coef < 0.0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5369 * ota_pn_min = min(ota_pn_min, nratio) * if coef < 0: * pratio = coef / (coef - pos_coef_sum) # <<<<<<<<<<<<<< * nratio = coef / neg_coef_sum * ota_np_max = max(ota_np_max, pratio) */ __pyx_t_95 = (__pyx_v_coef - __pyx_v_pos_coef_sum); if (unlikely(__pyx_t_95 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5369, __pyx_L1_error) } __pyx_v_pratio = (__pyx_v_coef / __pyx_t_95); /* "pyscipopt/scip.pyx":5370 * if coef < 0: * pratio = coef / (coef - pos_coef_sum) * nratio = coef / neg_coef_sum # <<<<<<<<<<<<<< * ota_np_max = max(ota_np_max, pratio) * ota_np_min = min(ota_np_min, pratio) */ if (unlikely(__pyx_v_neg_coef_sum == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5370, __pyx_L1_error) } __pyx_v_nratio = (__pyx_v_coef / ((SCIP_Real)__pyx_v_neg_coef_sum)); /* "pyscipopt/scip.pyx":5371 * pratio = coef / (coef - pos_coef_sum) * nratio = coef / neg_coef_sum * ota_np_max = max(ota_np_max, pratio) # <<<<<<<<<<<<<< * ota_np_min = min(ota_np_min, pratio) * ota_nn_max = max(ota_nn_max, nratio) */ __pyx_t_84 = __pyx_v_pratio; __pyx_t_93 = __pyx_v_ota_np_max; if (((__pyx_t_84 > __pyx_t_93) != 0)) { __pyx_t_85 = __pyx_t_84; } else { __pyx_t_85 = __pyx_t_93; } __pyx_v_ota_np_max = __pyx_t_85; /* "pyscipopt/scip.pyx":5372 * nratio = coef / neg_coef_sum * ota_np_max = max(ota_np_max, pratio) * ota_np_min = min(ota_np_min, pratio) # <<<<<<<<<<<<<< * ota_nn_max = max(ota_nn_max, nratio) * ota_nn_min = min(ota_nn_min, nratio) */ __pyx_t_85 = __pyx_v_pratio; __pyx_t_84 = __pyx_v_ota_np_min; if (((__pyx_t_85 < __pyx_t_84) != 0)) { __pyx_t_93 = __pyx_t_85; } else { __pyx_t_93 = __pyx_t_84; } __pyx_v_ota_np_min = __pyx_t_93; /* "pyscipopt/scip.pyx":5373 * ota_np_max = max(ota_np_max, pratio) * ota_np_min = min(ota_np_min, pratio) * ota_nn_max = max(ota_nn_max, nratio) # <<<<<<<<<<<<<< * ota_nn_min = min(ota_nn_min, nratio) * cand_ota_pp_max[cand_i] = ota_pp_max */ __pyx_t_93 = __pyx_v_nratio; __pyx_t_85 = __pyx_v_ota_nn_max; if (((__pyx_t_93 > __pyx_t_85) != 0)) { __pyx_t_84 = __pyx_t_93; } else { __pyx_t_84 = __pyx_t_85; } __pyx_v_ota_nn_max = __pyx_t_84; /* "pyscipopt/scip.pyx":5374 * ota_np_min = min(ota_np_min, pratio) * ota_nn_max = max(ota_nn_max, nratio) * ota_nn_min = min(ota_nn_min, nratio) # <<<<<<<<<<<<<< * cand_ota_pp_max[cand_i] = ota_pp_max * cand_ota_pp_min[cand_i] = ota_pp_min */ __pyx_t_84 = __pyx_v_nratio; __pyx_t_93 = __pyx_v_ota_nn_min; if (((__pyx_t_84 < __pyx_t_93) != 0)) { __pyx_t_85 = __pyx_t_84; } else { __pyx_t_85 = __pyx_t_93; } __pyx_v_ota_nn_min = __pyx_t_85; /* "pyscipopt/scip.pyx":5368 * ota_pn_max = max(ota_pn_max, nratio) * ota_pn_min = min(ota_pn_min, nratio) * if coef < 0: # <<<<<<<<<<<<<< * pratio = coef / (coef - pos_coef_sum) * nratio = coef / neg_coef_sum */ } } /* "pyscipopt/scip.pyx":5375 * ota_nn_max = max(ota_nn_max, nratio) * ota_nn_min = min(ota_nn_min, nratio) * cand_ota_pp_max[cand_i] = ota_pp_max # <<<<<<<<<<<<<< * cand_ota_pp_min[cand_i] = ota_pp_min * cand_ota_pn_max[cand_i] = ota_pn_max */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_pp_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_pp_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5375, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_pp_max.diminfo[0].strides) = __pyx_v_ota_pp_max; /* "pyscipopt/scip.pyx":5376 * ota_nn_min = min(ota_nn_min, nratio) * cand_ota_pp_max[cand_i] = ota_pp_max * cand_ota_pp_min[cand_i] = ota_pp_min # <<<<<<<<<<<<<< * cand_ota_pn_max[cand_i] = ota_pn_max * cand_ota_pn_min[cand_i] = ota_pn_min */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_pp_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_pp_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5376, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_pp_min.diminfo[0].strides) = __pyx_v_ota_pp_min; /* "pyscipopt/scip.pyx":5377 * cand_ota_pp_max[cand_i] = ota_pp_max * cand_ota_pp_min[cand_i] = ota_pp_min * cand_ota_pn_max[cand_i] = ota_pn_max # <<<<<<<<<<<<<< * cand_ota_pn_min[cand_i] = ota_pn_min * cand_ota_np_max[cand_i] = ota_np_max */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_pn_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_pn_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5377, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_pn_max.diminfo[0].strides) = __pyx_v_ota_pn_max; /* "pyscipopt/scip.pyx":5378 * cand_ota_pp_min[cand_i] = ota_pp_min * cand_ota_pn_max[cand_i] = ota_pn_max * cand_ota_pn_min[cand_i] = ota_pn_min # <<<<<<<<<<<<<< * cand_ota_np_max[cand_i] = ota_np_max * cand_ota_np_min[cand_i] = ota_np_min */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_pn_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_pn_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5378, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_pn_min.diminfo[0].strides) = __pyx_v_ota_pn_min; /* "pyscipopt/scip.pyx":5379 * cand_ota_pn_max[cand_i] = ota_pn_max * cand_ota_pn_min[cand_i] = ota_pn_min * cand_ota_np_max[cand_i] = ota_np_max # <<<<<<<<<<<<<< * cand_ota_np_min[cand_i] = ota_np_min * cand_ota_nn_max[cand_i] = ota_nn_max */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_np_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_np_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5379, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_np_max.diminfo[0].strides) = __pyx_v_ota_np_max; /* "pyscipopt/scip.pyx":5380 * cand_ota_pn_min[cand_i] = ota_pn_min * cand_ota_np_max[cand_i] = ota_np_max * cand_ota_np_min[cand_i] = ota_np_min # <<<<<<<<<<<<<< * cand_ota_nn_max[cand_i] = ota_nn_max * cand_ota_nn_min[cand_i] = ota_nn_min */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_np_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_np_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5380, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_np_min.diminfo[0].strides) = __pyx_v_ota_np_min; /* "pyscipopt/scip.pyx":5381 * cand_ota_np_max[cand_i] = ota_np_max * cand_ota_np_min[cand_i] = ota_np_min * cand_ota_nn_max[cand_i] = ota_nn_max # <<<<<<<<<<<<<< * cand_ota_nn_min[cand_i] = ota_nn_min * */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_nn_max.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_nn_max.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5381, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_nn_max.diminfo[0].strides) = __pyx_v_ota_nn_max; /* "pyscipopt/scip.pyx":5382 * cand_ota_np_min[cand_i] = ota_np_min * cand_ota_nn_max[cand_i] = ota_nn_max * cand_ota_nn_min[cand_i] = ota_nn_min # <<<<<<<<<<<<<< * * # Active dynamic */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_ota_nn_min.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_ota_nn_min.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5382, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_ota_nn_min.diminfo[0].strides) = __pyx_v_ota_nn_min; } /* "pyscipopt/scip.pyx":5395 * # number of active constraints that xj is in, with the same 4 weightings * cdef int row_index * cdef int nrows = SCIPgetNLPRows(scip) # <<<<<<<<<<<<<< * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) * cdef float constraint_sum, abs_coef */ __pyx_v_nrows = SCIPgetNLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":5396 * cdef int row_index * cdef int nrows = SCIPgetNLPRows(scip) * cdef SCIP_ROW** rows = SCIPgetLPRows(scip) # <<<<<<<<<<<<<< * cdef float constraint_sum, abs_coef * cdef SCIP_COL** neighbor_columns */ __pyx_v_rows = SCIPgetLPRows(__pyx_v_scip); /* "pyscipopt/scip.pyx":5408 * cdef np.ndarray[np.float32_t, ndim=1] act_cons_w1, act_cons_w2, act_cons_w3, act_cons_w4 * * act_cons_w1 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * act_cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5408, __pyx_L1_error) __pyx_t_107 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer, (PyObject*)__pyx_t_107, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer, (PyObject*)__pyx_v_act_cons_w1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_act_cons_w1.diminfo[0].strides = __pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_act_cons_w1.diminfo[0].shape = __pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5408, __pyx_L1_error) } __pyx_t_107 = 0; __pyx_v_act_cons_w1 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5409 * * act_cons_w1 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * act_cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w4 = np.zeros(shape=(nrows, ), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5409, __pyx_L1_error) __pyx_t_107 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer, (PyObject*)__pyx_t_107, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer, (PyObject*)__pyx_v_act_cons_w2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_act_cons_w2.diminfo[0].strides = __pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_act_cons_w2.diminfo[0].shape = __pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5409, __pyx_L1_error) } __pyx_t_107 = 0; __pyx_v_act_cons_w2 = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":5410 * act_cons_w1 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * act_cons_w4 = np.zeros(shape=(nrows, ), dtype=np.float32) * for row_index in range(nrows): */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5410, __pyx_L1_error) __pyx_t_107 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer, (PyObject*)__pyx_t_107, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer, (PyObject*)__pyx_v_act_cons_w3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_act_cons_w3.diminfo[0].strides = __pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_act_cons_w3.diminfo[0].shape = __pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5410, __pyx_L1_error) } __pyx_t_107 = 0; __pyx_v_act_cons_w3 = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5411 * act_cons_w2 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w4 = np.zeros(shape=(nrows, ), dtype=np.float32) # <<<<<<<<<<<<<< * for row_index in range(nrows): * row = rows[row_index] */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5411, __pyx_L1_error) __pyx_t_107 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer, (PyObject*)__pyx_t_107, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer, (PyObject*)__pyx_v_act_cons_w4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_act_cons_w4.diminfo[0].strides = __pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_act_cons_w4.diminfo[0].shape = __pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(3, 5411, __pyx_L1_error) } __pyx_t_107 = 0; __pyx_v_act_cons_w4 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5412 * act_cons_w3 = np.zeros(shape=(nrows, ), dtype=np.float32) * act_cons_w4 = np.zeros(shape=(nrows, ), dtype=np.float32) * for row_index in range(nrows): # <<<<<<<<<<<<<< * row = rows[row_index] * rhs = SCIProwGetRhs(row) */ __pyx_t_8 = __pyx_v_nrows; __pyx_t_81 = __pyx_t_8; for (__pyx_t_82 = 0; __pyx_t_82 < __pyx_t_81; __pyx_t_82+=1) { __pyx_v_row_index = __pyx_t_82; /* "pyscipopt/scip.pyx":5413 * act_cons_w4 = np.zeros(shape=(nrows, ), dtype=np.float32) * for row_index in range(nrows): * row = rows[row_index] # <<<<<<<<<<<<<< * rhs = SCIProwGetRhs(row) * lhs = SCIProwGetLhs(row) */ __pyx_v_row = (__pyx_v_rows[__pyx_v_row_index]); /* "pyscipopt/scip.pyx":5414 * for row_index in range(nrows): * row = rows[row_index] * rhs = SCIProwGetRhs(row) # <<<<<<<<<<<<<< * lhs = SCIProwGetLhs(row) * activity = SCIPgetRowActivity(scip, row) */ __pyx_v_rhs = SCIProwGetRhs(__pyx_v_row); /* "pyscipopt/scip.pyx":5415 * row = rows[row_index] * rhs = SCIProwGetRhs(row) * lhs = SCIProwGetLhs(row) # <<<<<<<<<<<<<< * activity = SCIPgetRowActivity(scip, row) * # N.B. active if activity = lhs or rhs */ __pyx_v_lhs = SCIProwGetLhs(__pyx_v_row); /* "pyscipopt/scip.pyx":5416 * rhs = SCIProwGetRhs(row) * lhs = SCIProwGetLhs(row) * activity = SCIPgetRowActivity(scip, row) # <<<<<<<<<<<<<< * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): */ __pyx_v_activity = SCIPgetRowActivity(__pyx_v_scip, __pyx_v_row); /* "pyscipopt/scip.pyx":5418 * activity = SCIPgetRowActivity(scip, row) * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): # <<<<<<<<<<<<<< * neighbor_columns = SCIProwGetCols(row) * neighbor_ncolumns = SCIProwGetNNonz(row) */ __pyx_t_108 = (SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_rhs) != 0); if (!__pyx_t_108) { } else { __pyx_t_80 = __pyx_t_108; goto __pyx_L48_bool_binop_done; } __pyx_t_108 = (SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_lhs) != 0); __pyx_t_80 = __pyx_t_108; __pyx_L48_bool_binop_done:; if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5419 * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): * neighbor_columns = SCIProwGetCols(row) # <<<<<<<<<<<<<< * neighbor_ncolumns = SCIProwGetNNonz(row) * neighbor_columns_values = SCIProwGetVals(row) */ __pyx_v_neighbor_columns = SCIProwGetCols(__pyx_v_row); /* "pyscipopt/scip.pyx":5420 * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): * neighbor_columns = SCIProwGetCols(row) * neighbor_ncolumns = SCIProwGetNNonz(row) # <<<<<<<<<<<<<< * neighbor_columns_values = SCIProwGetVals(row) * */ __pyx_v_neighbor_ncolumns = SCIProwGetNNonz(__pyx_v_row); /* "pyscipopt/scip.pyx":5421 * neighbor_columns = SCIProwGetCols(row) * neighbor_ncolumns = SCIProwGetNNonz(row) * neighbor_columns_values = SCIProwGetVals(row) # <<<<<<<<<<<<<< * * # weight no. 1 */ __pyx_v_neighbor_columns_values = SCIProwGetVals(__pyx_v_row); /* "pyscipopt/scip.pyx":5425 * # weight no. 1 * # unit weight * act_cons_w1[row_index] = 1 # <<<<<<<<<<<<<< * * # weight no. 2 */ __pyx_t_100 = __pyx_v_row_index; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5425, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w1.diminfo[0].strides) = 1.0; /* "pyscipopt/scip.pyx":5429 * # weight no. 2 * # inverse of the sum of the coefficients of all variables in constraint * constraint_sum = 0 # <<<<<<<<<<<<<< * for neighbor_column_index in range(neighbor_ncolumns): * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) */ __pyx_v_constraint_sum = 0.0; /* "pyscipopt/scip.pyx":5430 * # inverse of the sum of the coefficients of all variables in constraint * constraint_sum = 0 * for neighbor_column_index in range(neighbor_ncolumns): # <<<<<<<<<<<<<< * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * act_cons_w2[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum */ __pyx_t_87 = __pyx_v_neighbor_ncolumns; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_column_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5431 * constraint_sum = 0 * for neighbor_column_index in range(neighbor_ncolumns): * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) # <<<<<<<<<<<<<< * act_cons_w2[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum * */ __pyx_v_constraint_sum = (__pyx_v_constraint_sum + REALABS((__pyx_v_neighbor_columns_values[__pyx_v_neighbor_column_index]))); } /* "pyscipopt/scip.pyx":5432 * for neighbor_column_index in range(neighbor_ncolumns): * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * act_cons_w2[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum # <<<<<<<<<<<<<< * * # weight no. 3 */ if (((__pyx_v_constraint_sum == 0.0) != 0)) { __pyx_t_99 = 1.0; } else { if (unlikely(__pyx_v_constraint_sum == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5432, __pyx_L1_error) } __pyx_t_99 = (1.0 / __pyx_v_constraint_sum); } __pyx_t_100 = __pyx_v_row_index; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5432, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w2.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5436 * # weight no. 3 * # inverse of the sum of the coefficients of only candidate variables in constraint * constraint_sum = 0 # <<<<<<<<<<<<<< * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_var = SCIPcolGetVar(neighbor_columns[neighbor_column_index]) */ __pyx_v_constraint_sum = 0.0; /* "pyscipopt/scip.pyx":5437 * # inverse of the sum of the coefficients of only candidate variables in constraint * constraint_sum = 0 * for neighbor_column_index in range(neighbor_ncolumns): # <<<<<<<<<<<<<< * neighbor_var = SCIPcolGetVar(neighbor_columns[neighbor_column_index]) * neighbor_var_index = SCIPvarGetIndex(neighbor_var) */ __pyx_t_87 = __pyx_v_neighbor_ncolumns; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_column_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5438 * constraint_sum = 0 * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_var = SCIPcolGetVar(neighbor_columns[neighbor_column_index]) # <<<<<<<<<<<<<< * neighbor_var_index = SCIPvarGetIndex(neighbor_var) * for cand_i in range(ncands): */ __pyx_v_neighbor_var = SCIPcolGetVar((__pyx_v_neighbor_columns[__pyx_v_neighbor_column_index])); /* "pyscipopt/scip.pyx":5439 * for neighbor_column_index in range(neighbor_ncolumns): * neighbor_var = SCIPcolGetVar(neighbor_columns[neighbor_column_index]) * neighbor_var_index = SCIPvarGetIndex(neighbor_var) # <<<<<<<<<<<<<< * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var */ __pyx_v_neighbor_var_index = SCIPvarGetIndex(__pyx_v_neighbor_var); /* "pyscipopt/scip.pyx":5440 * neighbor_var = SCIPcolGetVar(neighbor_columns[neighbor_column_index]) * neighbor_var_index = SCIPvarGetIndex(neighbor_var) * for cand_i in range(ncands): # <<<<<<<<<<<<<< * var = (<Variable>candidates[cand_i]).scip_var * if SCIPvarGetIndex(var) == neighbor_var_index: */ __pyx_t_89 = __pyx_v_ncands; __pyx_t_92 = __pyx_t_89; for (__pyx_t_90 = 0; __pyx_t_90 < __pyx_t_92; __pyx_t_90+=1) { __pyx_v_cand_i = __pyx_t_90; /* "pyscipopt/scip.pyx":5441 * neighbor_var_index = SCIPvarGetIndex(neighbor_var) * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var # <<<<<<<<<<<<<< * if SCIPvarGetIndex(var) == neighbor_var_index: * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_candidates, __pyx_v_cand_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_98 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)->scip_var; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_var = __pyx_t_98; /* "pyscipopt/scip.pyx":5442 * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var * if SCIPvarGetIndex(var) == neighbor_var_index: # <<<<<<<<<<<<<< * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * break */ __pyx_t_80 = ((SCIPvarGetIndex(__pyx_v_var) == __pyx_v_neighbor_var_index) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5443 * var = (<Variable>candidates[cand_i]).scip_var * if SCIPvarGetIndex(var) == neighbor_var_index: * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) # <<<<<<<<<<<<<< * break * act_cons_w3[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum */ __pyx_v_constraint_sum = (__pyx_v_constraint_sum + REALABS((__pyx_v_neighbor_columns_values[__pyx_v_neighbor_column_index]))); /* "pyscipopt/scip.pyx":5444 * if SCIPvarGetIndex(var) == neighbor_var_index: * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * break # <<<<<<<<<<<<<< * act_cons_w3[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum * */ goto __pyx_L55_break; /* "pyscipopt/scip.pyx":5442 * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var * if SCIPvarGetIndex(var) == neighbor_var_index: # <<<<<<<<<<<<<< * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * break */ } } __pyx_L55_break:; } /* "pyscipopt/scip.pyx":5445 * constraint_sum += REALABS(neighbor_columns_values[neighbor_column_index]) * break * act_cons_w3[row_index] = 1 if constraint_sum == 0 else 1 / constraint_sum # <<<<<<<<<<<<<< * * # weight no. 4 */ if (((__pyx_v_constraint_sum == 0.0) != 0)) { __pyx_t_99 = 1.0; } else { if (unlikely(__pyx_v_constraint_sum == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5445, __pyx_L1_error) } __pyx_t_99 = (1.0 / __pyx_v_constraint_sum); } __pyx_t_100 = __pyx_v_row_index; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5445, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w3.diminfo[0].strides) = __pyx_t_99; /* "pyscipopt/scip.pyx":5449 * # weight no. 4 * # dual cost of the constraint * act_cons_w4[row_index] = REALABS(SCIProwGetDualsol(row)) # <<<<<<<<<<<<<< * * for cand_i in range(ncands): */ __pyx_t_100 = __pyx_v_row_index; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5449, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w4.diminfo[0].strides) = REALABS(SCIProwGetDualsol(__pyx_v_row)); /* "pyscipopt/scip.pyx":5418 * activity = SCIPgetRowActivity(scip, row) * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): # <<<<<<<<<<<<<< * neighbor_columns = SCIProwGetCols(row) * neighbor_ncolumns = SCIProwGetNNonz(row) */ } } /* "pyscipopt/scip.pyx":5451 * act_cons_w4[row_index] = REALABS(SCIProwGetDualsol(row)) * * for cand_i in range(ncands): # <<<<<<<<<<<<<< * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) */ __pyx_t_8 = __pyx_v_ncands; __pyx_t_81 = __pyx_t_8; for (__pyx_t_82 = 0; __pyx_t_82 < __pyx_t_81; __pyx_t_82+=1) { __pyx_v_cand_i = __pyx_t_82; /* "pyscipopt/scip.pyx":5452 * * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var # <<<<<<<<<<<<<< * col = SCIPvarGetCol(var) * neighbors = SCIPcolGetRows(col) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_candidates, __pyx_v_cand_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_98 = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)__pyx_t_3)->scip_var; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_var = __pyx_t_98; /* "pyscipopt/scip.pyx":5453 * for cand_i in range(ncands): * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) # <<<<<<<<<<<<<< * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) */ __pyx_v_col = SCIPvarGetCol(__pyx_v_var); /* "pyscipopt/scip.pyx":5454 * var = (<Variable>candidates[cand_i]).scip_var * col = SCIPvarGetCol(var) * neighbors = SCIPcolGetRows(col) # <<<<<<<<<<<<<< * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) */ __pyx_v_neighbors = SCIPcolGetRows(__pyx_v_col); /* "pyscipopt/scip.pyx":5455 * col = SCIPvarGetCol(var) * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) # <<<<<<<<<<<<<< * nonzero_coefs_raw = SCIPcolGetVals(col) * */ __pyx_v_nb_neighbors = SCIPcolGetNNonz(__pyx_v_col); /* "pyscipopt/scip.pyx":5456 * neighbors = SCIPcolGetRows(col) * nb_neighbors = SCIPcolGetNNonz(col) * nonzero_coefs_raw = SCIPcolGetVals(col) # <<<<<<<<<<<<<< * * acons_sum1, acons_mean1, acons_var1, acons_max1, acons_min1 = 0, 0, 0, 0, 0 */ __pyx_v_nonzero_coefs_raw = SCIPcolGetVals(__pyx_v_col); /* "pyscipopt/scip.pyx":5458 * nonzero_coefs_raw = SCIPcolGetVals(col) * * acons_sum1, acons_mean1, acons_var1, acons_max1, acons_min1 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * acons_sum2, acons_mean2, acons_var2, acons_max2, acons_min2 = 0, 0, 0, 0, 0 * acons_sum3, acons_mean3, acons_var3, acons_max3, acons_min3 = 0, 0, 0, 0, 0 */ __pyx_t_85 = 0.0; __pyx_t_84 = 0.0; __pyx_t_93 = 0.0; __pyx_t_106 = 0.0; __pyx_t_109 = 0.0; __pyx_v_acons_sum1 = __pyx_t_85; __pyx_v_acons_mean1 = __pyx_t_84; __pyx_v_acons_var1 = __pyx_t_93; __pyx_v_acons_max1 = __pyx_t_106; __pyx_v_acons_min1 = __pyx_t_109; /* "pyscipopt/scip.pyx":5459 * * acons_sum1, acons_mean1, acons_var1, acons_max1, acons_min1 = 0, 0, 0, 0, 0 * acons_sum2, acons_mean2, acons_var2, acons_max2, acons_min2 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * acons_sum3, acons_mean3, acons_var3, acons_max3, acons_min3 = 0, 0, 0, 0, 0 * acons_sum4, acons_mean4, acons_var4, acons_max4, acons_min4 = 0, 0, 0, 0, 0 */ __pyx_t_109 = 0.0; __pyx_t_106 = 0.0; __pyx_t_93 = 0.0; __pyx_t_84 = 0.0; __pyx_t_85 = 0.0; __pyx_v_acons_sum2 = __pyx_t_109; __pyx_v_acons_mean2 = __pyx_t_106; __pyx_v_acons_var2 = __pyx_t_93; __pyx_v_acons_max2 = __pyx_t_84; __pyx_v_acons_min2 = __pyx_t_85; /* "pyscipopt/scip.pyx":5460 * acons_sum1, acons_mean1, acons_var1, acons_max1, acons_min1 = 0, 0, 0, 0, 0 * acons_sum2, acons_mean2, acons_var2, acons_max2, acons_min2 = 0, 0, 0, 0, 0 * acons_sum3, acons_mean3, acons_var3, acons_max3, acons_min3 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * acons_sum4, acons_mean4, acons_var4, acons_max4, acons_min4 = 0, 0, 0, 0, 0 * acons_nb1, acons_nb2, acons_nb3, acons_nb4 = 0, 0, 0, 0 */ __pyx_t_85 = 0.0; __pyx_t_84 = 0.0; __pyx_t_93 = 0.0; __pyx_t_106 = 0.0; __pyx_t_109 = 0.0; __pyx_v_acons_sum3 = __pyx_t_85; __pyx_v_acons_mean3 = __pyx_t_84; __pyx_v_acons_var3 = __pyx_t_93; __pyx_v_acons_max3 = __pyx_t_106; __pyx_v_acons_min3 = __pyx_t_109; /* "pyscipopt/scip.pyx":5461 * acons_sum2, acons_mean2, acons_var2, acons_max2, acons_min2 = 0, 0, 0, 0, 0 * acons_sum3, acons_mean3, acons_var3, acons_max3, acons_min3 = 0, 0, 0, 0, 0 * acons_sum4, acons_mean4, acons_var4, acons_max4, acons_min4 = 0, 0, 0, 0, 0 # <<<<<<<<<<<<<< * acons_nb1, acons_nb2, acons_nb3, acons_nb4 = 0, 0, 0, 0 * active_count = 0 */ __pyx_t_109 = 0.0; __pyx_t_106 = 0.0; __pyx_t_93 = 0.0; __pyx_t_84 = 0.0; __pyx_t_85 = 0.0; __pyx_v_acons_sum4 = __pyx_t_109; __pyx_v_acons_mean4 = __pyx_t_106; __pyx_v_acons_var4 = __pyx_t_93; __pyx_v_acons_max4 = __pyx_t_84; __pyx_v_acons_min4 = __pyx_t_85; /* "pyscipopt/scip.pyx":5462 * acons_sum3, acons_mean3, acons_var3, acons_max3, acons_min3 = 0, 0, 0, 0, 0 * acons_sum4, acons_mean4, acons_var4, acons_max4, acons_min4 = 0, 0, 0, 0, 0 * acons_nb1, acons_nb2, acons_nb3, acons_nb4 = 0, 0, 0, 0 # <<<<<<<<<<<<<< * active_count = 0 * for neighbor_index in range(nb_neighbors): */ __pyx_t_85 = 0.0; __pyx_t_84 = 0.0; __pyx_t_93 = 0.0; __pyx_t_106 = 0.0; __pyx_v_acons_nb1 = __pyx_t_85; __pyx_v_acons_nb2 = __pyx_t_84; __pyx_v_acons_nb3 = __pyx_t_93; __pyx_v_acons_nb4 = __pyx_t_106; /* "pyscipopt/scip.pyx":5463 * acons_sum4, acons_mean4, acons_var4, acons_max4, acons_min4 = 0, 0, 0, 0, 0 * acons_nb1, acons_nb2, acons_nb3, acons_nb4 = 0, 0, 0, 0 * active_count = 0 # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * rhs = SCIProwGetRhs(neighbors[neighbor_index]) */ __pyx_v_active_count = 0; /* "pyscipopt/scip.pyx":5464 * acons_nb1, acons_nb2, acons_nb3, acons_nb4 = 0, 0, 0, 0 * active_count = 0 * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5465 * active_count = 0 * for neighbor_index in range(nb_neighbors): * rhs = SCIProwGetRhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) */ __pyx_v_rhs = SCIProwGetRhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5466 * for neighbor_index in range(nb_neighbors): * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) * # N.B. active if activity = lhs or rhs */ __pyx_v_lhs = SCIProwGetLhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5467 * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) # <<<<<<<<<<<<<< * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): */ __pyx_v_activity = SCIPgetRowActivity(__pyx_v_scip, (__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5469 * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): # <<<<<<<<<<<<<< * active_count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) */ __pyx_t_108 = (SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_rhs) != 0); if (!__pyx_t_108) { } else { __pyx_t_80 = __pyx_t_108; goto __pyx_L62_bool_binop_done; } __pyx_t_108 = (SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_lhs) != 0); __pyx_t_80 = __pyx_t_108; __pyx_L62_bool_binop_done:; if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5470 * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): * active_count += 1 # <<<<<<<<<<<<<< * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) */ __pyx_v_active_count = (__pyx_v_active_count + 1); /* "pyscipopt/scip.pyx":5471 * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): * active_count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * */ __pyx_v_neighbor_row_index = SCIProwGetLPPos((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5472 * active_count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) # <<<<<<<<<<<<<< * * acons_nb1 += act_cons_w1[neighbor_row_index] */ __pyx_v_abs_coef = REALABS((__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5474 * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * * acons_nb1 += act_cons_w1[neighbor_row_index] # <<<<<<<<<<<<<< * value = act_cons_w1[neighbor_row_index] * abs_coef * acons_sum1 += value */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w1.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5474, __pyx_L1_error) } __pyx_v_acons_nb1 = (__pyx_v_acons_nb1 + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w1.diminfo[0].strides))); /* "pyscipopt/scip.pyx":5475 * * acons_nb1 += act_cons_w1[neighbor_row_index] * value = act_cons_w1[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_sum1 += value * acons_max1 = value if active_count == 1 else max(acons_max1, value) */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w1.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5475, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w1.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5476 * acons_nb1 += act_cons_w1[neighbor_row_index] * value = act_cons_w1[neighbor_row_index] * abs_coef * acons_sum1 += value # <<<<<<<<<<<<<< * acons_max1 = value if active_count == 1 else max(acons_max1, value) * acons_min1 = value if active_count == 1 else min(acons_min1, value) */ __pyx_v_acons_sum1 = (__pyx_v_acons_sum1 + __pyx_v_value); /* "pyscipopt/scip.pyx":5477 * value = act_cons_w1[neighbor_row_index] * abs_coef * acons_sum1 += value * acons_max1 = value if active_count == 1 else max(acons_max1, value) # <<<<<<<<<<<<<< * acons_min1 = value if active_count == 1 else min(acons_min1, value) * */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_93 = __pyx_v_value; __pyx_t_84 = __pyx_v_acons_max1; if (((__pyx_t_93 > __pyx_t_84) != 0)) { __pyx_t_85 = __pyx_t_93; } else { __pyx_t_85 = __pyx_t_84; } __pyx_t_106 = __pyx_t_85; } __pyx_v_acons_max1 = __pyx_t_106; /* "pyscipopt/scip.pyx":5478 * acons_sum1 += value * acons_max1 = value if active_count == 1 else max(acons_max1, value) * acons_min1 = value if active_count == 1 else min(acons_min1, value) # <<<<<<<<<<<<<< * * acons_nb2 += act_cons_w2[neighbor_row_index] */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_85 = __pyx_v_value; __pyx_t_93 = __pyx_v_acons_min1; if (((__pyx_t_85 < __pyx_t_93) != 0)) { __pyx_t_84 = __pyx_t_85; } else { __pyx_t_84 = __pyx_t_93; } __pyx_t_106 = __pyx_t_84; } __pyx_v_acons_min1 = __pyx_t_106; /* "pyscipopt/scip.pyx":5480 * acons_min1 = value if active_count == 1 else min(acons_min1, value) * * acons_nb2 += act_cons_w2[neighbor_row_index] # <<<<<<<<<<<<<< * value = act_cons_w2[neighbor_row_index] * abs_coef * acons_sum2 += value */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w2.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5480, __pyx_L1_error) } __pyx_v_acons_nb2 = (__pyx_v_acons_nb2 + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w2.diminfo[0].strides))); /* "pyscipopt/scip.pyx":5481 * * acons_nb2 += act_cons_w2[neighbor_row_index] * value = act_cons_w2[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_sum2 += value * acons_max2 = value if active_count == 1 else max(acons_max2, value) */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w2.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5481, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w2.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5482 * acons_nb2 += act_cons_w2[neighbor_row_index] * value = act_cons_w2[neighbor_row_index] * abs_coef * acons_sum2 += value # <<<<<<<<<<<<<< * acons_max2 = value if active_count == 1 else max(acons_max2, value) * acons_min2 = value if active_count == 1 else min(acons_min2, value) */ __pyx_v_acons_sum2 = (__pyx_v_acons_sum2 + __pyx_v_value); /* "pyscipopt/scip.pyx":5483 * value = act_cons_w2[neighbor_row_index] * abs_coef * acons_sum2 += value * acons_max2 = value if active_count == 1 else max(acons_max2, value) # <<<<<<<<<<<<<< * acons_min2 = value if active_count == 1 else min(acons_min2, value) * */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_84 = __pyx_v_value; __pyx_t_85 = __pyx_v_acons_max2; if (((__pyx_t_84 > __pyx_t_85) != 0)) { __pyx_t_93 = __pyx_t_84; } else { __pyx_t_93 = __pyx_t_85; } __pyx_t_106 = __pyx_t_93; } __pyx_v_acons_max2 = __pyx_t_106; /* "pyscipopt/scip.pyx":5484 * acons_sum2 += value * acons_max2 = value if active_count == 1 else max(acons_max2, value) * acons_min2 = value if active_count == 1 else min(acons_min2, value) # <<<<<<<<<<<<<< * * acons_nb3 += act_cons_w3[neighbor_row_index] */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_93 = __pyx_v_value; __pyx_t_84 = __pyx_v_acons_min2; if (((__pyx_t_93 < __pyx_t_84) != 0)) { __pyx_t_85 = __pyx_t_93; } else { __pyx_t_85 = __pyx_t_84; } __pyx_t_106 = __pyx_t_85; } __pyx_v_acons_min2 = __pyx_t_106; /* "pyscipopt/scip.pyx":5486 * acons_min2 = value if active_count == 1 else min(acons_min2, value) * * acons_nb3 += act_cons_w3[neighbor_row_index] # <<<<<<<<<<<<<< * value = act_cons_w3[neighbor_row_index] * abs_coef * acons_sum3 += value */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w3.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5486, __pyx_L1_error) } __pyx_v_acons_nb3 = (__pyx_v_acons_nb3 + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w3.diminfo[0].strides))); /* "pyscipopt/scip.pyx":5487 * * acons_nb3 += act_cons_w3[neighbor_row_index] * value = act_cons_w3[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_sum3 += value * acons_max3 = value if active_count == 1 else max(acons_max3, value) */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w3.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5487, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w3.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5488 * acons_nb3 += act_cons_w3[neighbor_row_index] * value = act_cons_w3[neighbor_row_index] * abs_coef * acons_sum3 += value # <<<<<<<<<<<<<< * acons_max3 = value if active_count == 1 else max(acons_max3, value) * acons_min3 = value if active_count == 1 else min(acons_min3, value) */ __pyx_v_acons_sum3 = (__pyx_v_acons_sum3 + __pyx_v_value); /* "pyscipopt/scip.pyx":5489 * value = act_cons_w3[neighbor_row_index] * abs_coef * acons_sum3 += value * acons_max3 = value if active_count == 1 else max(acons_max3, value) # <<<<<<<<<<<<<< * acons_min3 = value if active_count == 1 else min(acons_min3, value) * */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_85 = __pyx_v_value; __pyx_t_93 = __pyx_v_acons_max3; if (((__pyx_t_85 > __pyx_t_93) != 0)) { __pyx_t_84 = __pyx_t_85; } else { __pyx_t_84 = __pyx_t_93; } __pyx_t_106 = __pyx_t_84; } __pyx_v_acons_max3 = __pyx_t_106; /* "pyscipopt/scip.pyx":5490 * acons_sum3 += value * acons_max3 = value if active_count == 1 else max(acons_max3, value) * acons_min3 = value if active_count == 1 else min(acons_min3, value) # <<<<<<<<<<<<<< * * acons_nb4 += act_cons_w4[neighbor_row_index] */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_84 = __pyx_v_value; __pyx_t_85 = __pyx_v_acons_min3; if (((__pyx_t_84 < __pyx_t_85) != 0)) { __pyx_t_93 = __pyx_t_84; } else { __pyx_t_93 = __pyx_t_85; } __pyx_t_106 = __pyx_t_93; } __pyx_v_acons_min3 = __pyx_t_106; /* "pyscipopt/scip.pyx":5492 * acons_min3 = value if active_count == 1 else min(acons_min3, value) * * acons_nb4 += act_cons_w4[neighbor_row_index] # <<<<<<<<<<<<<< * value = act_cons_w4[neighbor_row_index] * abs_coef * acons_sum4 += value */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w4.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5492, __pyx_L1_error) } __pyx_v_acons_nb4 = (__pyx_v_acons_nb4 + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w4.diminfo[0].strides))); /* "pyscipopt/scip.pyx":5493 * * acons_nb4 += act_cons_w4[neighbor_row_index] * value = act_cons_w4[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_sum4 += value * acons_max4 = value if active_count == 1 else max(acons_max4, value) */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w4.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5493, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w4.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5494 * acons_nb4 += act_cons_w4[neighbor_row_index] * value = act_cons_w4[neighbor_row_index] * abs_coef * acons_sum4 += value # <<<<<<<<<<<<<< * acons_max4 = value if active_count == 1 else max(acons_max4, value) * acons_min4 = value if active_count == 1 else min(acons_min4, value) */ __pyx_v_acons_sum4 = (__pyx_v_acons_sum4 + __pyx_v_value); /* "pyscipopt/scip.pyx":5495 * value = act_cons_w4[neighbor_row_index] * abs_coef * acons_sum4 += value * acons_max4 = value if active_count == 1 else max(acons_max4, value) # <<<<<<<<<<<<<< * acons_min4 = value if active_count == 1 else min(acons_min4, value) * */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_93 = __pyx_v_value; __pyx_t_84 = __pyx_v_acons_max4; if (((__pyx_t_93 > __pyx_t_84) != 0)) { __pyx_t_85 = __pyx_t_93; } else { __pyx_t_85 = __pyx_t_84; } __pyx_t_106 = __pyx_t_85; } __pyx_v_acons_max4 = __pyx_t_106; /* "pyscipopt/scip.pyx":5496 * acons_sum4 += value * acons_max4 = value if active_count == 1 else max(acons_max4, value) * acons_min4 = value if active_count == 1 else min(acons_min4, value) # <<<<<<<<<<<<<< * * if active_count > 0: */ if (((__pyx_v_active_count == 1) != 0)) { __pyx_t_106 = __pyx_v_value; } else { __pyx_t_85 = __pyx_v_value; __pyx_t_93 = __pyx_v_acons_min4; if (((__pyx_t_85 < __pyx_t_93) != 0)) { __pyx_t_84 = __pyx_t_85; } else { __pyx_t_84 = __pyx_t_93; } __pyx_t_106 = __pyx_t_84; } __pyx_v_acons_min4 = __pyx_t_106; /* "pyscipopt/scip.pyx":5469 * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): # <<<<<<<<<<<<<< * active_count += 1 * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) */ } } /* "pyscipopt/scip.pyx":5498 * acons_min4 = value if active_count == 1 else min(acons_min4, value) * * if active_count > 0: # <<<<<<<<<<<<<< * acons_mean1 = acons_sum1 / active_count * acons_mean2 = acons_sum2 / active_count */ __pyx_t_80 = ((__pyx_v_active_count > 0) != 0); if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5499 * * if active_count > 0: * acons_mean1 = acons_sum1 / active_count # <<<<<<<<<<<<<< * acons_mean2 = acons_sum2 / active_count * acons_mean3 = acons_sum3 / active_count */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5499, __pyx_L1_error) } __pyx_v_acons_mean1 = (__pyx_v_acons_sum1 / ((float)__pyx_v_active_count)); /* "pyscipopt/scip.pyx":5500 * if active_count > 0: * acons_mean1 = acons_sum1 / active_count * acons_mean2 = acons_sum2 / active_count # <<<<<<<<<<<<<< * acons_mean3 = acons_sum3 / active_count * acons_mean4 = acons_sum4 / active_count */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5500, __pyx_L1_error) } __pyx_v_acons_mean2 = (__pyx_v_acons_sum2 / ((float)__pyx_v_active_count)); /* "pyscipopt/scip.pyx":5501 * acons_mean1 = acons_sum1 / active_count * acons_mean2 = acons_sum2 / active_count * acons_mean3 = acons_sum3 / active_count # <<<<<<<<<<<<<< * acons_mean4 = acons_sum4 / active_count * for neighbor_index in range(nb_neighbors): */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5501, __pyx_L1_error) } __pyx_v_acons_mean3 = (__pyx_v_acons_sum3 / ((float)__pyx_v_active_count)); /* "pyscipopt/scip.pyx":5502 * acons_mean2 = acons_sum2 / active_count * acons_mean3 = acons_sum3 / active_count * acons_mean4 = acons_sum4 / active_count # <<<<<<<<<<<<<< * for neighbor_index in range(nb_neighbors): * rhs = SCIProwGetRhs(neighbors[neighbor_index]) */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5502, __pyx_L1_error) } __pyx_v_acons_mean4 = (__pyx_v_acons_sum4 / ((float)__pyx_v_active_count)); /* "pyscipopt/scip.pyx":5503 * acons_mean3 = acons_sum3 / active_count * acons_mean4 = acons_sum4 / active_count * for neighbor_index in range(nb_neighbors): # <<<<<<<<<<<<<< * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) */ __pyx_t_87 = __pyx_v_nb_neighbors; __pyx_t_86 = __pyx_t_87; for (__pyx_t_88 = 0; __pyx_t_88 < __pyx_t_86; __pyx_t_88+=1) { __pyx_v_neighbor_index = __pyx_t_88; /* "pyscipopt/scip.pyx":5504 * acons_mean4 = acons_sum4 / active_count * for neighbor_index in range(nb_neighbors): * rhs = SCIProwGetRhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) */ __pyx_v_rhs = SCIProwGetRhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5505 * for neighbor_index in range(nb_neighbors): * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) * # N.B. active if activity = lhs or rhs */ __pyx_v_lhs = SCIProwGetLhs((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5506 * rhs = SCIProwGetRhs(neighbors[neighbor_index]) * lhs = SCIProwGetLhs(neighbors[neighbor_index]) * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) # <<<<<<<<<<<<<< * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): */ __pyx_v_activity = SCIPgetRowActivity(__pyx_v_scip, (__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5508 * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): # <<<<<<<<<<<<<< * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) */ __pyx_t_108 = (SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_rhs) != 0); if (!__pyx_t_108) { } else { __pyx_t_80 = __pyx_t_108; goto __pyx_L68_bool_binop_done; } __pyx_t_108 = (SCIPisEQ(__pyx_v_scip, __pyx_v_activity, __pyx_v_lhs) != 0); __pyx_t_80 = __pyx_t_108; __pyx_L68_bool_binop_done:; if (__pyx_t_80) { /* "pyscipopt/scip.pyx":5509 * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) # <<<<<<<<<<<<<< * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * */ __pyx_v_neighbor_row_index = SCIProwGetLPPos((__pyx_v_neighbors[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5510 * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) # <<<<<<<<<<<<<< * * value = act_cons_w1[neighbor_row_index] * abs_coef */ __pyx_v_abs_coef = REALABS((__pyx_v_nonzero_coefs_raw[__pyx_v_neighbor_index])); /* "pyscipopt/scip.pyx":5512 * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) * * value = act_cons_w1[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_var1 += (value - acons_mean1)**2 * */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w1.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5512, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w1.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5513 * * value = act_cons_w1[neighbor_row_index] * abs_coef * acons_var1 += (value - acons_mean1)**2 # <<<<<<<<<<<<<< * * value = act_cons_w2[neighbor_row_index] * abs_coef */ __pyx_v_acons_var1 = (__pyx_v_acons_var1 + powf((__pyx_v_value - __pyx_v_acons_mean1), 2.0)); /* "pyscipopt/scip.pyx":5515 * acons_var1 += (value - acons_mean1)**2 * * value = act_cons_w2[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_var2 += (value - acons_mean2)**2 * */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w2.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5515, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w2.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5516 * * value = act_cons_w2[neighbor_row_index] * abs_coef * acons_var2 += (value - acons_mean2)**2 # <<<<<<<<<<<<<< * * value = act_cons_w3[neighbor_row_index] * abs_coef */ __pyx_v_acons_var2 = (__pyx_v_acons_var2 + powf((__pyx_v_value - __pyx_v_acons_mean2), 2.0)); /* "pyscipopt/scip.pyx":5518 * acons_var2 += (value - acons_mean2)**2 * * value = act_cons_w3[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_var3 += (value - acons_mean3)**2 * */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w3.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5518, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w3.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5519 * * value = act_cons_w3[neighbor_row_index] * abs_coef * acons_var3 += (value - acons_mean3)**2 # <<<<<<<<<<<<<< * * value = act_cons_w4[neighbor_row_index] * abs_coef */ __pyx_v_acons_var3 = (__pyx_v_acons_var3 + powf((__pyx_v_value - __pyx_v_acons_mean3), 2.0)); /* "pyscipopt/scip.pyx":5521 * acons_var3 += (value - acons_mean3)**2 * * value = act_cons_w4[neighbor_row_index] * abs_coef # <<<<<<<<<<<<<< * acons_var4 += (value - acons_mean4)**2 * acons_var1 /= active_count */ __pyx_t_100 = __pyx_v_neighbor_row_index; __pyx_t_89 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_act_cons_w4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_89 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_act_cons_w4.diminfo[0].shape)) __pyx_t_89 = 0; if (unlikely(__pyx_t_89 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_89); __PYX_ERR(3, 5521, __pyx_L1_error) } __pyx_v_value = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_act_cons_w4.diminfo[0].strides)) * __pyx_v_abs_coef); /* "pyscipopt/scip.pyx":5522 * * value = act_cons_w4[neighbor_row_index] * abs_coef * acons_var4 += (value - acons_mean4)**2 # <<<<<<<<<<<<<< * acons_var1 /= active_count * acons_var2 /= active_count */ __pyx_v_acons_var4 = (__pyx_v_acons_var4 + powf((__pyx_v_value - __pyx_v_acons_mean4), 2.0)); /* "pyscipopt/scip.pyx":5508 * activity = SCIPgetRowActivity(scip, neighbors[neighbor_index]) * # N.B. active if activity = lhs or rhs * if SCIPisEQ(scip, activity, rhs) or SCIPisEQ(scip, activity, lhs): # <<<<<<<<<<<<<< * neighbor_row_index = SCIProwGetLPPos(neighbors[neighbor_index]) * abs_coef = REALABS(nonzero_coefs_raw[neighbor_index]) */ } } /* "pyscipopt/scip.pyx":5523 * value = act_cons_w4[neighbor_row_index] * abs_coef * acons_var4 += (value - acons_mean4)**2 * acons_var1 /= active_count # <<<<<<<<<<<<<< * acons_var2 /= active_count * acons_var3 /= active_count */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5523, __pyx_L1_error) } __pyx_v_acons_var1 = (__pyx_v_acons_var1 / __pyx_v_active_count); /* "pyscipopt/scip.pyx":5524 * acons_var4 += (value - acons_mean4)**2 * acons_var1 /= active_count * acons_var2 /= active_count # <<<<<<<<<<<<<< * acons_var3 /= active_count * acons_var4 /= active_count */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5524, __pyx_L1_error) } __pyx_v_acons_var2 = (__pyx_v_acons_var2 / __pyx_v_active_count); /* "pyscipopt/scip.pyx":5525 * acons_var1 /= active_count * acons_var2 /= active_count * acons_var3 /= active_count # <<<<<<<<<<<<<< * acons_var4 /= active_count * */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5525, __pyx_L1_error) } __pyx_v_acons_var3 = (__pyx_v_acons_var3 / __pyx_v_active_count); /* "pyscipopt/scip.pyx":5526 * acons_var2 /= active_count * acons_var3 /= active_count * acons_var4 /= active_count # <<<<<<<<<<<<<< * * cand_acons_sum1[cand_i] = acons_sum1 */ if (unlikely(__pyx_v_active_count == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(3, 5526, __pyx_L1_error) } __pyx_v_acons_var4 = (__pyx_v_acons_var4 / __pyx_v_active_count); /* "pyscipopt/scip.pyx":5498 * acons_min4 = value if active_count == 1 else min(acons_min4, value) * * if active_count > 0: # <<<<<<<<<<<<<< * acons_mean1 = acons_sum1 / active_count * acons_mean2 = acons_sum2 / active_count */ } /* "pyscipopt/scip.pyx":5528 * acons_var4 /= active_count * * cand_acons_sum1[cand_i] = acons_sum1 # <<<<<<<<<<<<<< * cand_acons_sum2[cand_i] = acons_sum2 * cand_acons_sum3[cand_i] = acons_sum3 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_sum1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_sum1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5528, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_sum1.diminfo[0].strides) = __pyx_v_acons_sum1; /* "pyscipopt/scip.pyx":5529 * * cand_acons_sum1[cand_i] = acons_sum1 * cand_acons_sum2[cand_i] = acons_sum2 # <<<<<<<<<<<<<< * cand_acons_sum3[cand_i] = acons_sum3 * cand_acons_sum4[cand_i] = acons_sum4 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_sum2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_sum2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5529, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_sum2.diminfo[0].strides) = __pyx_v_acons_sum2; /* "pyscipopt/scip.pyx":5530 * cand_acons_sum1[cand_i] = acons_sum1 * cand_acons_sum2[cand_i] = acons_sum2 * cand_acons_sum3[cand_i] = acons_sum3 # <<<<<<<<<<<<<< * cand_acons_sum4[cand_i] = acons_sum4 * cand_acons_mean1[cand_i] = acons_mean1 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_sum3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_sum3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5530, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_sum3.diminfo[0].strides) = __pyx_v_acons_sum3; /* "pyscipopt/scip.pyx":5531 * cand_acons_sum2[cand_i] = acons_sum2 * cand_acons_sum3[cand_i] = acons_sum3 * cand_acons_sum4[cand_i] = acons_sum4 # <<<<<<<<<<<<<< * cand_acons_mean1[cand_i] = acons_mean1 * cand_acons_mean2[cand_i] = acons_mean2 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_sum4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_sum4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5531, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_sum4.diminfo[0].strides) = __pyx_v_acons_sum4; /* "pyscipopt/scip.pyx":5532 * cand_acons_sum3[cand_i] = acons_sum3 * cand_acons_sum4[cand_i] = acons_sum4 * cand_acons_mean1[cand_i] = acons_mean1 # <<<<<<<<<<<<<< * cand_acons_mean2[cand_i] = acons_mean2 * cand_acons_mean3[cand_i] = acons_mean3 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_mean1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_mean1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5532, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_mean1.diminfo[0].strides) = __pyx_v_acons_mean1; /* "pyscipopt/scip.pyx":5533 * cand_acons_sum4[cand_i] = acons_sum4 * cand_acons_mean1[cand_i] = acons_mean1 * cand_acons_mean2[cand_i] = acons_mean2 # <<<<<<<<<<<<<< * cand_acons_mean3[cand_i] = acons_mean3 * cand_acons_mean4[cand_i] = acons_mean4 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_mean2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_mean2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5533, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_mean2.diminfo[0].strides) = __pyx_v_acons_mean2; /* "pyscipopt/scip.pyx":5534 * cand_acons_mean1[cand_i] = acons_mean1 * cand_acons_mean2[cand_i] = acons_mean2 * cand_acons_mean3[cand_i] = acons_mean3 # <<<<<<<<<<<<<< * cand_acons_mean4[cand_i] = acons_mean4 * cand_acons_max1[cand_i] = acons_max1 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_mean3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_mean3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5534, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_mean3.diminfo[0].strides) = __pyx_v_acons_mean3; /* "pyscipopt/scip.pyx":5535 * cand_acons_mean2[cand_i] = acons_mean2 * cand_acons_mean3[cand_i] = acons_mean3 * cand_acons_mean4[cand_i] = acons_mean4 # <<<<<<<<<<<<<< * cand_acons_max1[cand_i] = acons_max1 * cand_acons_max2[cand_i] = acons_max2 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_mean4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_mean4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5535, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_mean4.diminfo[0].strides) = __pyx_v_acons_mean4; /* "pyscipopt/scip.pyx":5536 * cand_acons_mean3[cand_i] = acons_mean3 * cand_acons_mean4[cand_i] = acons_mean4 * cand_acons_max1[cand_i] = acons_max1 # <<<<<<<<<<<<<< * cand_acons_max2[cand_i] = acons_max2 * cand_acons_max3[cand_i] = acons_max3 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_max1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_max1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5536, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_max1.diminfo[0].strides) = __pyx_v_acons_max1; /* "pyscipopt/scip.pyx":5537 * cand_acons_mean4[cand_i] = acons_mean4 * cand_acons_max1[cand_i] = acons_max1 * cand_acons_max2[cand_i] = acons_max2 # <<<<<<<<<<<<<< * cand_acons_max3[cand_i] = acons_max3 * cand_acons_max4[cand_i] = acons_max4 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_max2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_max2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5537, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_max2.diminfo[0].strides) = __pyx_v_acons_max2; /* "pyscipopt/scip.pyx":5538 * cand_acons_max1[cand_i] = acons_max1 * cand_acons_max2[cand_i] = acons_max2 * cand_acons_max3[cand_i] = acons_max3 # <<<<<<<<<<<<<< * cand_acons_max4[cand_i] = acons_max4 * cand_acons_min1[cand_i] = acons_min1 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_max3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_max3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5538, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_max3.diminfo[0].strides) = __pyx_v_acons_max3; /* "pyscipopt/scip.pyx":5539 * cand_acons_max2[cand_i] = acons_max2 * cand_acons_max3[cand_i] = acons_max3 * cand_acons_max4[cand_i] = acons_max4 # <<<<<<<<<<<<<< * cand_acons_min1[cand_i] = acons_min1 * cand_acons_min2[cand_i] = acons_min2 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_max4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_max4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5539, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_max4.diminfo[0].strides) = __pyx_v_acons_max4; /* "pyscipopt/scip.pyx":5540 * cand_acons_max3[cand_i] = acons_max3 * cand_acons_max4[cand_i] = acons_max4 * cand_acons_min1[cand_i] = acons_min1 # <<<<<<<<<<<<<< * cand_acons_min2[cand_i] = acons_min2 * cand_acons_min3[cand_i] = acons_min3 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_min1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_min1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5540, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_min1.diminfo[0].strides) = __pyx_v_acons_min1; /* "pyscipopt/scip.pyx":5541 * cand_acons_max4[cand_i] = acons_max4 * cand_acons_min1[cand_i] = acons_min1 * cand_acons_min2[cand_i] = acons_min2 # <<<<<<<<<<<<<< * cand_acons_min3[cand_i] = acons_min3 * cand_acons_min4[cand_i] = acons_min4 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_min2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_min2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5541, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_min2.diminfo[0].strides) = __pyx_v_acons_min2; /* "pyscipopt/scip.pyx":5542 * cand_acons_min1[cand_i] = acons_min1 * cand_acons_min2[cand_i] = acons_min2 * cand_acons_min3[cand_i] = acons_min3 # <<<<<<<<<<<<<< * cand_acons_min4[cand_i] = acons_min4 * cand_acons_var1[cand_i] = acons_var1 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_min3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_min3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5542, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_min3.diminfo[0].strides) = __pyx_v_acons_min3; /* "pyscipopt/scip.pyx":5543 * cand_acons_min2[cand_i] = acons_min2 * cand_acons_min3[cand_i] = acons_min3 * cand_acons_min4[cand_i] = acons_min4 # <<<<<<<<<<<<<< * cand_acons_var1[cand_i] = acons_var1 * cand_acons_var2[cand_i] = acons_var2 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_min4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_min4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5543, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_min4.diminfo[0].strides) = __pyx_v_acons_min4; /* "pyscipopt/scip.pyx":5544 * cand_acons_min3[cand_i] = acons_min3 * cand_acons_min4[cand_i] = acons_min4 * cand_acons_var1[cand_i] = acons_var1 # <<<<<<<<<<<<<< * cand_acons_var2[cand_i] = acons_var2 * cand_acons_var3[cand_i] = acons_var3 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_var1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_var1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5544, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_var1.diminfo[0].strides) = __pyx_v_acons_var1; /* "pyscipopt/scip.pyx":5545 * cand_acons_min4[cand_i] = acons_min4 * cand_acons_var1[cand_i] = acons_var1 * cand_acons_var2[cand_i] = acons_var2 # <<<<<<<<<<<<<< * cand_acons_var3[cand_i] = acons_var3 * cand_acons_var4[cand_i] = acons_var4 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_var2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_var2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5545, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_var2.diminfo[0].strides) = __pyx_v_acons_var2; /* "pyscipopt/scip.pyx":5546 * cand_acons_var1[cand_i] = acons_var1 * cand_acons_var2[cand_i] = acons_var2 * cand_acons_var3[cand_i] = acons_var3 # <<<<<<<<<<<<<< * cand_acons_var4[cand_i] = acons_var4 * cand_acons_nb1[cand_i] = acons_nb1 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_var3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_var3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5546, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_var3.diminfo[0].strides) = __pyx_v_acons_var3; /* "pyscipopt/scip.pyx":5547 * cand_acons_var2[cand_i] = acons_var2 * cand_acons_var3[cand_i] = acons_var3 * cand_acons_var4[cand_i] = acons_var4 # <<<<<<<<<<<<<< * cand_acons_nb1[cand_i] = acons_nb1 * cand_acons_nb2[cand_i] = acons_nb2 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_var4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_var4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5547, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_var4.diminfo[0].strides) = __pyx_v_acons_var4; /* "pyscipopt/scip.pyx":5548 * cand_acons_var3[cand_i] = acons_var3 * cand_acons_var4[cand_i] = acons_var4 * cand_acons_nb1[cand_i] = acons_nb1 # <<<<<<<<<<<<<< * cand_acons_nb2[cand_i] = acons_nb2 * cand_acons_nb3[cand_i] = acons_nb3 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_nb1.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_nb1.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5548, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_nb1.diminfo[0].strides) = __pyx_v_acons_nb1; /* "pyscipopt/scip.pyx":5549 * cand_acons_var4[cand_i] = acons_var4 * cand_acons_nb1[cand_i] = acons_nb1 * cand_acons_nb2[cand_i] = acons_nb2 # <<<<<<<<<<<<<< * cand_acons_nb3[cand_i] = acons_nb3 * cand_acons_nb4[cand_i] = acons_nb4 */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_nb2.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_nb2.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5549, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_nb2.diminfo[0].strides) = __pyx_v_acons_nb2; /* "pyscipopt/scip.pyx":5550 * cand_acons_nb1[cand_i] = acons_nb1 * cand_acons_nb2[cand_i] = acons_nb2 * cand_acons_nb3[cand_i] = acons_nb3 # <<<<<<<<<<<<<< * cand_acons_nb4[cand_i] = acons_nb4 * */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_nb3.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_nb3.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5550, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_nb3.diminfo[0].strides) = __pyx_v_acons_nb3; /* "pyscipopt/scip.pyx":5551 * cand_acons_nb2[cand_i] = acons_nb2 * cand_acons_nb3[cand_i] = acons_nb3 * cand_acons_nb4[cand_i] = acons_nb4 # <<<<<<<<<<<<<< * * return { */ __pyx_t_100 = __pyx_v_cand_i; __pyx_t_87 = -1; if (__pyx_t_100 < 0) { __pyx_t_100 += __pyx_pybuffernd_cand_acons_nb4.diminfo[0].shape; if (unlikely(__pyx_t_100 < 0)) __pyx_t_87 = 0; } else if (unlikely(__pyx_t_100 >= __pyx_pybuffernd_cand_acons_nb4.diminfo[0].shape)) __pyx_t_87 = 0; if (unlikely(__pyx_t_87 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_87); __PYX_ERR(3, 5551, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer.buf, __pyx_t_100, __pyx_pybuffernd_cand_acons_nb4.diminfo[0].strides) = __pyx_v_acons_nb4; } /* "pyscipopt/scip.pyx":5553 * cand_acons_nb4[cand_i] = acons_nb4 * * return { # <<<<<<<<<<<<<< * 'coefs': cand_coefs, * 'coefs_pos': cand_coefs_pos, */ __Pyx_XDECREF(__pyx_r); /* "pyscipopt/scip.pyx":5554 * * return { * 'coefs': cand_coefs, # <<<<<<<<<<<<<< * 'coefs_pos': cand_coefs_pos, * 'coefs_neg': cand_coefs_neg, */ __pyx_t_3 = __Pyx_PyDict_NewPresized(72); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_coefs, ((PyObject *)__pyx_v_cand_coefs)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5555 * return { * 'coefs': cand_coefs, * 'coefs_pos': cand_coefs_pos, # <<<<<<<<<<<<<< * 'coefs_neg': cand_coefs_neg, * 'nnzrs': cand_nnzrs, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_coefs_pos, ((PyObject *)__pyx_v_cand_coefs_pos)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5556 * 'coefs': cand_coefs, * 'coefs_pos': cand_coefs_pos, * 'coefs_neg': cand_coefs_neg, # <<<<<<<<<<<<<< * 'nnzrs': cand_nnzrs, * 'root_cdeg_mean': cand_root_cdeg_mean, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_coefs_neg, ((PyObject *)__pyx_v_cand_coefs_neg)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5557 * 'coefs_pos': cand_coefs_pos, * 'coefs_neg': cand_coefs_neg, * 'nnzrs': cand_nnzrs, # <<<<<<<<<<<<<< * 'root_cdeg_mean': cand_root_cdeg_mean, * 'root_cdeg_var': cand_root_cdeg_var, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnzrs, ((PyObject *)__pyx_v_cand_nnzrs)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5558 * 'coefs_neg': cand_coefs_neg, * 'nnzrs': cand_nnzrs, * 'root_cdeg_mean': cand_root_cdeg_mean, # <<<<<<<<<<<<<< * 'root_cdeg_var': cand_root_cdeg_var, * 'root_cdeg_min': cand_root_cdeg_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_cdeg_mean, ((PyObject *)__pyx_v_cand_root_cdeg_mean)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5559 * 'nnzrs': cand_nnzrs, * 'root_cdeg_mean': cand_root_cdeg_mean, * 'root_cdeg_var': cand_root_cdeg_var, # <<<<<<<<<<<<<< * 'root_cdeg_min': cand_root_cdeg_min, * 'root_cdeg_max': cand_root_cdeg_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_cdeg_var, ((PyObject *)__pyx_v_cand_root_cdeg_var)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5560 * 'root_cdeg_mean': cand_root_cdeg_mean, * 'root_cdeg_var': cand_root_cdeg_var, * 'root_cdeg_min': cand_root_cdeg_min, # <<<<<<<<<<<<<< * 'root_cdeg_max': cand_root_cdeg_max, * 'root_pcoefs_count': cand_root_pcoefs_count, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_cdeg_min, ((PyObject *)__pyx_v_cand_root_cdeg_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5561 * 'root_cdeg_var': cand_root_cdeg_var, * 'root_cdeg_min': cand_root_cdeg_min, * 'root_cdeg_max': cand_root_cdeg_max, # <<<<<<<<<<<<<< * 'root_pcoefs_count': cand_root_pcoefs_count, * 'root_pcoefs_mean': cand_root_pcoefs_mean, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_cdeg_max, ((PyObject *)__pyx_v_cand_root_cdeg_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5562 * 'root_cdeg_min': cand_root_cdeg_min, * 'root_cdeg_max': cand_root_cdeg_max, * 'root_pcoefs_count': cand_root_pcoefs_count, # <<<<<<<<<<<<<< * 'root_pcoefs_mean': cand_root_pcoefs_mean, * 'root_pcoefs_var': cand_root_pcoefs_var, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_count, ((PyObject *)__pyx_v_cand_root_pcoefs_count)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5563 * 'root_cdeg_max': cand_root_cdeg_max, * 'root_pcoefs_count': cand_root_pcoefs_count, * 'root_pcoefs_mean': cand_root_pcoefs_mean, # <<<<<<<<<<<<<< * 'root_pcoefs_var': cand_root_pcoefs_var, * 'root_pcoefs_min': cand_root_pcoefs_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_mean, ((PyObject *)__pyx_v_cand_root_pcoefs_mean)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5564 * 'root_pcoefs_count': cand_root_pcoefs_count, * 'root_pcoefs_mean': cand_root_pcoefs_mean, * 'root_pcoefs_var': cand_root_pcoefs_var, # <<<<<<<<<<<<<< * 'root_pcoefs_min': cand_root_pcoefs_min, * 'root_pcoefs_max': cand_root_pcoefs_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_var, ((PyObject *)__pyx_v_cand_root_pcoefs_var)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5565 * 'root_pcoefs_mean': cand_root_pcoefs_mean, * 'root_pcoefs_var': cand_root_pcoefs_var, * 'root_pcoefs_min': cand_root_pcoefs_min, # <<<<<<<<<<<<<< * 'root_pcoefs_max': cand_root_pcoefs_max, * 'root_ncoefs_count': cand_root_ncoefs_count, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_min, ((PyObject *)__pyx_v_cand_root_pcoefs_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5566 * 'root_pcoefs_var': cand_root_pcoefs_var, * 'root_pcoefs_min': cand_root_pcoefs_min, * 'root_pcoefs_max': cand_root_pcoefs_max, # <<<<<<<<<<<<<< * 'root_ncoefs_count': cand_root_ncoefs_count, * 'root_ncoefs_mean': cand_root_ncoefs_mean, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_pcoefs_max, ((PyObject *)__pyx_v_cand_root_pcoefs_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5567 * 'root_pcoefs_min': cand_root_pcoefs_min, * 'root_pcoefs_max': cand_root_pcoefs_max, * 'root_ncoefs_count': cand_root_ncoefs_count, # <<<<<<<<<<<<<< * 'root_ncoefs_mean': cand_root_ncoefs_mean, * 'root_ncoefs_var': cand_root_ncoefs_var, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_count, ((PyObject *)__pyx_v_cand_root_ncoefs_count)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5568 * 'root_pcoefs_max': cand_root_pcoefs_max, * 'root_ncoefs_count': cand_root_ncoefs_count, * 'root_ncoefs_mean': cand_root_ncoefs_mean, # <<<<<<<<<<<<<< * 'root_ncoefs_var': cand_root_ncoefs_var, * 'root_ncoefs_min': cand_root_ncoefs_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_mean, ((PyObject *)__pyx_v_cand_root_ncoefs_mean)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5569 * 'root_ncoefs_count': cand_root_ncoefs_count, * 'root_ncoefs_mean': cand_root_ncoefs_mean, * 'root_ncoefs_var': cand_root_ncoefs_var, # <<<<<<<<<<<<<< * 'root_ncoefs_min': cand_root_ncoefs_min, * 'root_ncoefs_max': cand_root_ncoefs_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_var, ((PyObject *)__pyx_v_cand_root_ncoefs_var)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5570 * 'root_ncoefs_mean': cand_root_ncoefs_mean, * 'root_ncoefs_var': cand_root_ncoefs_var, * 'root_ncoefs_min': cand_root_ncoefs_min, # <<<<<<<<<<<<<< * 'root_ncoefs_max': cand_root_ncoefs_max, * 'solfracs': cand_solfracs, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_min, ((PyObject *)__pyx_v_cand_root_ncoefs_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5571 * 'root_ncoefs_var': cand_root_ncoefs_var, * 'root_ncoefs_min': cand_root_ncoefs_min, * 'root_ncoefs_max': cand_root_ncoefs_max, # <<<<<<<<<<<<<< * 'solfracs': cand_solfracs, * 'slack': cand_slack, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_root_ncoefs_max, ((PyObject *)__pyx_v_cand_root_ncoefs_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5572 * 'root_ncoefs_min': cand_root_ncoefs_min, * 'root_ncoefs_max': cand_root_ncoefs_max, * 'solfracs': cand_solfracs, # <<<<<<<<<<<<<< * 'slack': cand_slack, * 'ps_up': cand_ps_up, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_solfracs, __pyx_v_cand_solfracs) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5573 * 'root_ncoefs_max': cand_root_ncoefs_max, * 'solfracs': cand_solfracs, * 'slack': cand_slack, # <<<<<<<<<<<<<< * 'ps_up': cand_ps_up, * 'ps_down': cand_ps_down, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_slack, ((PyObject *)__pyx_v_cand_slack)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5574 * 'solfracs': cand_solfracs, * 'slack': cand_slack, * 'ps_up': cand_ps_up, # <<<<<<<<<<<<<< * 'ps_down': cand_ps_down, * 'ps_ratio': cand_ps_ratio, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ps_up, ((PyObject *)__pyx_v_cand_ps_up)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5575 * 'slack': cand_slack, * 'ps_up': cand_ps_up, * 'ps_down': cand_ps_down, # <<<<<<<<<<<<<< * 'ps_ratio': cand_ps_ratio, * 'ps_sum': cand_ps_sum, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ps_down, ((PyObject *)__pyx_v_cand_ps_down)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5576 * 'ps_up': cand_ps_up, * 'ps_down': cand_ps_down, * 'ps_ratio': cand_ps_ratio, # <<<<<<<<<<<<<< * 'ps_sum': cand_ps_sum, * 'ps_product': cand_ps_product, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ps_ratio, ((PyObject *)__pyx_v_cand_ps_ratio)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5577 * 'ps_down': cand_ps_down, * 'ps_ratio': cand_ps_ratio, * 'ps_sum': cand_ps_sum, # <<<<<<<<<<<<<< * 'ps_product': cand_ps_product, * 'nb_up_infeas': cand_nb_up_infeas, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ps_sum, ((PyObject *)__pyx_v_cand_ps_sum)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5578 * 'ps_ratio': cand_ps_ratio, * 'ps_sum': cand_ps_sum, * 'ps_product': cand_ps_product, # <<<<<<<<<<<<<< * 'nb_up_infeas': cand_nb_up_infeas, * 'nb_down_infeas': cand_nb_down_infeas, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ps_product, ((PyObject *)__pyx_v_cand_ps_product)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5579 * 'ps_sum': cand_ps_sum, * 'ps_product': cand_ps_product, * 'nb_up_infeas': cand_nb_up_infeas, # <<<<<<<<<<<<<< * 'nb_down_infeas': cand_nb_down_infeas, * 'frac_up_infeas': cand_frac_up_infeas, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nb_up_infeas, ((PyObject *)__pyx_v_cand_nb_up_infeas)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5580 * 'ps_product': cand_ps_product, * 'nb_up_infeas': cand_nb_up_infeas, * 'nb_down_infeas': cand_nb_down_infeas, # <<<<<<<<<<<<<< * 'frac_up_infeas': cand_frac_up_infeas, * 'frac_down_infeas': cand_frac_down_infeas, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nb_down_infeas, ((PyObject *)__pyx_v_cand_nb_down_infeas)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5581 * 'nb_up_infeas': cand_nb_up_infeas, * 'nb_down_infeas': cand_nb_down_infeas, * 'frac_up_infeas': cand_frac_up_infeas, # <<<<<<<<<<<<<< * 'frac_down_infeas': cand_frac_down_infeas, * 'cdeg_mean': cand_cdeg_mean, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_frac_up_infeas, __pyx_v_cand_frac_up_infeas) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5582 * 'nb_down_infeas': cand_nb_down_infeas, * 'frac_up_infeas': cand_frac_up_infeas, * 'frac_down_infeas': cand_frac_down_infeas, # <<<<<<<<<<<<<< * 'cdeg_mean': cand_cdeg_mean, * 'cdeg_var': cand_cdeg_var, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_frac_down_infeas, __pyx_v_cand_frac_down_infeas) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5583 * 'frac_up_infeas': cand_frac_up_infeas, * 'frac_down_infeas': cand_frac_down_infeas, * 'cdeg_mean': cand_cdeg_mean, # <<<<<<<<<<<<<< * 'cdeg_var': cand_cdeg_var, * 'cdeg_min': cand_cdeg_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_mean, ((PyObject *)__pyx_v_cand_cdeg_mean)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5584 * 'frac_down_infeas': cand_frac_down_infeas, * 'cdeg_mean': cand_cdeg_mean, * 'cdeg_var': cand_cdeg_var, # <<<<<<<<<<<<<< * 'cdeg_min': cand_cdeg_min, * 'cdeg_max': cand_cdeg_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_var, ((PyObject *)__pyx_v_cand_cdeg_var)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5585 * 'cdeg_mean': cand_cdeg_mean, * 'cdeg_var': cand_cdeg_var, * 'cdeg_min': cand_cdeg_min, # <<<<<<<<<<<<<< * 'cdeg_max': cand_cdeg_max, * 'cdeg_mean_ratio': cand_cdeg_mean_ratio, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_min, ((PyObject *)__pyx_v_cand_cdeg_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5586 * 'cdeg_var': cand_cdeg_var, * 'cdeg_min': cand_cdeg_min, * 'cdeg_max': cand_cdeg_max, # <<<<<<<<<<<<<< * 'cdeg_mean_ratio': cand_cdeg_mean_ratio, * 'cdeg_min_ratio': cand_cdeg_min_ratio, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_max, ((PyObject *)__pyx_v_cand_cdeg_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5587 * 'cdeg_min': cand_cdeg_min, * 'cdeg_max': cand_cdeg_max, * 'cdeg_mean_ratio': cand_cdeg_mean_ratio, # <<<<<<<<<<<<<< * 'cdeg_min_ratio': cand_cdeg_min_ratio, * 'cdeg_max_ratio': cand_cdeg_max_ratio, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_mean_ratio, ((PyObject *)__pyx_v_cand_cdeg_mean_ratio)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5588 * 'cdeg_max': cand_cdeg_max, * 'cdeg_mean_ratio': cand_cdeg_mean_ratio, * 'cdeg_min_ratio': cand_cdeg_min_ratio, # <<<<<<<<<<<<<< * 'cdeg_max_ratio': cand_cdeg_max_ratio, * 'prhs_ratio_max': cand_prhs_ratio_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_min_ratio, ((PyObject *)__pyx_v_cand_cdeg_min_ratio)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5589 * 'cdeg_mean_ratio': cand_cdeg_mean_ratio, * 'cdeg_min_ratio': cand_cdeg_min_ratio, * 'cdeg_max_ratio': cand_cdeg_max_ratio, # <<<<<<<<<<<<<< * 'prhs_ratio_max': cand_prhs_ratio_max, * 'prhs_ratio_min': cand_prhs_ratio_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cdeg_max_ratio, ((PyObject *)__pyx_v_cand_cdeg_max_ratio)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5590 * 'cdeg_min_ratio': cand_cdeg_min_ratio, * 'cdeg_max_ratio': cand_cdeg_max_ratio, * 'prhs_ratio_max': cand_prhs_ratio_max, # <<<<<<<<<<<<<< * 'prhs_ratio_min': cand_prhs_ratio_min, * 'nrhs_ratio_max': cand_nrhs_ratio_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_prhs_ratio_max, ((PyObject *)__pyx_v_cand_prhs_ratio_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5591 * 'cdeg_max_ratio': cand_cdeg_max_ratio, * 'prhs_ratio_max': cand_prhs_ratio_max, * 'prhs_ratio_min': cand_prhs_ratio_min, # <<<<<<<<<<<<<< * 'nrhs_ratio_max': cand_nrhs_ratio_max, * 'nrhs_ratio_min': cand_nrhs_ratio_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_prhs_ratio_min, ((PyObject *)__pyx_v_cand_prhs_ratio_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5592 * 'prhs_ratio_max': cand_prhs_ratio_max, * 'prhs_ratio_min': cand_prhs_ratio_min, * 'nrhs_ratio_max': cand_nrhs_ratio_max, # <<<<<<<<<<<<<< * 'nrhs_ratio_min': cand_nrhs_ratio_min, * 'ota_pp_max': cand_ota_pp_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nrhs_ratio_max, ((PyObject *)__pyx_v_cand_nrhs_ratio_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5593 * 'prhs_ratio_min': cand_prhs_ratio_min, * 'nrhs_ratio_max': cand_nrhs_ratio_max, * 'nrhs_ratio_min': cand_nrhs_ratio_min, # <<<<<<<<<<<<<< * 'ota_pp_max': cand_ota_pp_max, * 'ota_pp_min': cand_ota_pp_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nrhs_ratio_min, ((PyObject *)__pyx_v_cand_nrhs_ratio_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5594 * 'nrhs_ratio_max': cand_nrhs_ratio_max, * 'nrhs_ratio_min': cand_nrhs_ratio_min, * 'ota_pp_max': cand_ota_pp_max, # <<<<<<<<<<<<<< * 'ota_pp_min': cand_ota_pp_min, * 'ota_pn_max': cand_ota_pn_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_pp_max, ((PyObject *)__pyx_v_cand_ota_pp_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5595 * 'nrhs_ratio_min': cand_nrhs_ratio_min, * 'ota_pp_max': cand_ota_pp_max, * 'ota_pp_min': cand_ota_pp_min, # <<<<<<<<<<<<<< * 'ota_pn_max': cand_ota_pn_max, * 'ota_pn_min': cand_ota_pn_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_pp_min, ((PyObject *)__pyx_v_cand_ota_pp_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5596 * 'ota_pp_max': cand_ota_pp_max, * 'ota_pp_min': cand_ota_pp_min, * 'ota_pn_max': cand_ota_pn_max, # <<<<<<<<<<<<<< * 'ota_pn_min': cand_ota_pn_min, * 'ota_np_max': cand_ota_np_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_pn_max, ((PyObject *)__pyx_v_cand_ota_pn_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5597 * 'ota_pp_min': cand_ota_pp_min, * 'ota_pn_max': cand_ota_pn_max, * 'ota_pn_min': cand_ota_pn_min, # <<<<<<<<<<<<<< * 'ota_np_max': cand_ota_np_max, * 'ota_np_min': cand_ota_np_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_pn_min, ((PyObject *)__pyx_v_cand_ota_pn_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5598 * 'ota_pn_max': cand_ota_pn_max, * 'ota_pn_min': cand_ota_pn_min, * 'ota_np_max': cand_ota_np_max, # <<<<<<<<<<<<<< * 'ota_np_min': cand_ota_np_min, * 'ota_nn_max': cand_ota_nn_max, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_np_max, ((PyObject *)__pyx_v_cand_ota_np_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5599 * 'ota_pn_min': cand_ota_pn_min, * 'ota_np_max': cand_ota_np_max, * 'ota_np_min': cand_ota_np_min, # <<<<<<<<<<<<<< * 'ota_nn_max': cand_ota_nn_max, * 'ota_nn_min': cand_ota_nn_min, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_np_min, ((PyObject *)__pyx_v_cand_ota_np_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5600 * 'ota_np_max': cand_ota_np_max, * 'ota_np_min': cand_ota_np_min, * 'ota_nn_max': cand_ota_nn_max, # <<<<<<<<<<<<<< * 'ota_nn_min': cand_ota_nn_min, * 'acons_sum1': cand_acons_sum1, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_nn_max, ((PyObject *)__pyx_v_cand_ota_nn_max)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5601 * 'ota_np_min': cand_ota_np_min, * 'ota_nn_max': cand_ota_nn_max, * 'ota_nn_min': cand_ota_nn_min, # <<<<<<<<<<<<<< * 'acons_sum1': cand_acons_sum1, * 'acons_mean1': cand_acons_mean1, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ota_nn_min, ((PyObject *)__pyx_v_cand_ota_nn_min)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5602 * 'ota_nn_max': cand_ota_nn_max, * 'ota_nn_min': cand_ota_nn_min, * 'acons_sum1': cand_acons_sum1, # <<<<<<<<<<<<<< * 'acons_mean1': cand_acons_mean1, * 'acons_var1': cand_acons_var1, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_sum1, ((PyObject *)__pyx_v_cand_acons_sum1)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5603 * 'ota_nn_min': cand_ota_nn_min, * 'acons_sum1': cand_acons_sum1, * 'acons_mean1': cand_acons_mean1, # <<<<<<<<<<<<<< * 'acons_var1': cand_acons_var1, * 'acons_max1': cand_acons_max1, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_mean1, ((PyObject *)__pyx_v_cand_acons_mean1)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5604 * 'acons_sum1': cand_acons_sum1, * 'acons_mean1': cand_acons_mean1, * 'acons_var1': cand_acons_var1, # <<<<<<<<<<<<<< * 'acons_max1': cand_acons_max1, * 'acons_min1': cand_acons_min1, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_var1, ((PyObject *)__pyx_v_cand_acons_var1)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5605 * 'acons_mean1': cand_acons_mean1, * 'acons_var1': cand_acons_var1, * 'acons_max1': cand_acons_max1, # <<<<<<<<<<<<<< * 'acons_min1': cand_acons_min1, * 'acons_sum2': cand_acons_sum2, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_max1, ((PyObject *)__pyx_v_cand_acons_max1)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5606 * 'acons_var1': cand_acons_var1, * 'acons_max1': cand_acons_max1, * 'acons_min1': cand_acons_min1, # <<<<<<<<<<<<<< * 'acons_sum2': cand_acons_sum2, * 'acons_mean2': cand_acons_mean2, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_min1, ((PyObject *)__pyx_v_cand_acons_min1)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5607 * 'acons_max1': cand_acons_max1, * 'acons_min1': cand_acons_min1, * 'acons_sum2': cand_acons_sum2, # <<<<<<<<<<<<<< * 'acons_mean2': cand_acons_mean2, * 'acons_var2': cand_acons_var2, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_sum2, ((PyObject *)__pyx_v_cand_acons_sum2)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5608 * 'acons_min1': cand_acons_min1, * 'acons_sum2': cand_acons_sum2, * 'acons_mean2': cand_acons_mean2, # <<<<<<<<<<<<<< * 'acons_var2': cand_acons_var2, * 'acons_max2': cand_acons_max2, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_mean2, ((PyObject *)__pyx_v_cand_acons_mean2)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5609 * 'acons_sum2': cand_acons_sum2, * 'acons_mean2': cand_acons_mean2, * 'acons_var2': cand_acons_var2, # <<<<<<<<<<<<<< * 'acons_max2': cand_acons_max2, * 'acons_min2': cand_acons_min2, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_var2, ((PyObject *)__pyx_v_cand_acons_var2)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5610 * 'acons_mean2': cand_acons_mean2, * 'acons_var2': cand_acons_var2, * 'acons_max2': cand_acons_max2, # <<<<<<<<<<<<<< * 'acons_min2': cand_acons_min2, * 'acons_sum3': cand_acons_sum3, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_max2, ((PyObject *)__pyx_v_cand_acons_max2)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5611 * 'acons_var2': cand_acons_var2, * 'acons_max2': cand_acons_max2, * 'acons_min2': cand_acons_min2, # <<<<<<<<<<<<<< * 'acons_sum3': cand_acons_sum3, * 'acons_mean3': cand_acons_mean3, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_min2, ((PyObject *)__pyx_v_cand_acons_min2)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5612 * 'acons_max2': cand_acons_max2, * 'acons_min2': cand_acons_min2, * 'acons_sum3': cand_acons_sum3, # <<<<<<<<<<<<<< * 'acons_mean3': cand_acons_mean3, * 'acons_var3': cand_acons_var3, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_sum3, ((PyObject *)__pyx_v_cand_acons_sum3)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5613 * 'acons_min2': cand_acons_min2, * 'acons_sum3': cand_acons_sum3, * 'acons_mean3': cand_acons_mean3, # <<<<<<<<<<<<<< * 'acons_var3': cand_acons_var3, * 'acons_max3': cand_acons_max3, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_mean3, ((PyObject *)__pyx_v_cand_acons_mean3)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5614 * 'acons_sum3': cand_acons_sum3, * 'acons_mean3': cand_acons_mean3, * 'acons_var3': cand_acons_var3, # <<<<<<<<<<<<<< * 'acons_max3': cand_acons_max3, * 'acons_min3': cand_acons_min3, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_var3, ((PyObject *)__pyx_v_cand_acons_var3)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5615 * 'acons_mean3': cand_acons_mean3, * 'acons_var3': cand_acons_var3, * 'acons_max3': cand_acons_max3, # <<<<<<<<<<<<<< * 'acons_min3': cand_acons_min3, * 'acons_sum4': cand_acons_sum4, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_max3, ((PyObject *)__pyx_v_cand_acons_max3)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5616 * 'acons_var3': cand_acons_var3, * 'acons_max3': cand_acons_max3, * 'acons_min3': cand_acons_min3, # <<<<<<<<<<<<<< * 'acons_sum4': cand_acons_sum4, * 'acons_mean4': cand_acons_mean4, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_min3, ((PyObject *)__pyx_v_cand_acons_min3)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5617 * 'acons_max3': cand_acons_max3, * 'acons_min3': cand_acons_min3, * 'acons_sum4': cand_acons_sum4, # <<<<<<<<<<<<<< * 'acons_mean4': cand_acons_mean4, * 'acons_var4': cand_acons_var4, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_sum4, ((PyObject *)__pyx_v_cand_acons_sum4)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5618 * 'acons_min3': cand_acons_min3, * 'acons_sum4': cand_acons_sum4, * 'acons_mean4': cand_acons_mean4, # <<<<<<<<<<<<<< * 'acons_var4': cand_acons_var4, * 'acons_max4': cand_acons_max4, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_mean4, ((PyObject *)__pyx_v_cand_acons_mean4)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5619 * 'acons_sum4': cand_acons_sum4, * 'acons_mean4': cand_acons_mean4, * 'acons_var4': cand_acons_var4, # <<<<<<<<<<<<<< * 'acons_max4': cand_acons_max4, * 'acons_min4': cand_acons_min4, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_var4, ((PyObject *)__pyx_v_cand_acons_var4)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5620 * 'acons_mean4': cand_acons_mean4, * 'acons_var4': cand_acons_var4, * 'acons_max4': cand_acons_max4, # <<<<<<<<<<<<<< * 'acons_min4': cand_acons_min4, * 'acons_nb1': cand_acons_nb1, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_max4, ((PyObject *)__pyx_v_cand_acons_max4)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5621 * 'acons_var4': cand_acons_var4, * 'acons_max4': cand_acons_max4, * 'acons_min4': cand_acons_min4, # <<<<<<<<<<<<<< * 'acons_nb1': cand_acons_nb1, * 'acons_nb2': cand_acons_nb2, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_min4, ((PyObject *)__pyx_v_cand_acons_min4)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5622 * 'acons_max4': cand_acons_max4, * 'acons_min4': cand_acons_min4, * 'acons_nb1': cand_acons_nb1, # <<<<<<<<<<<<<< * 'acons_nb2': cand_acons_nb2, * 'acons_nb3': cand_acons_nb3, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_nb1, ((PyObject *)__pyx_v_cand_acons_nb1)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5623 * 'acons_min4': cand_acons_min4, * 'acons_nb1': cand_acons_nb1, * 'acons_nb2': cand_acons_nb2, # <<<<<<<<<<<<<< * 'acons_nb3': cand_acons_nb3, * 'acons_nb4': cand_acons_nb4, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_nb2, ((PyObject *)__pyx_v_cand_acons_nb2)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5624 * 'acons_nb1': cand_acons_nb1, * 'acons_nb2': cand_acons_nb2, * 'acons_nb3': cand_acons_nb3, # <<<<<<<<<<<<<< * 'acons_nb4': cand_acons_nb4, * } */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_nb3, ((PyObject *)__pyx_v_cand_acons_nb3)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) /* "pyscipopt/scip.pyx":5625 * 'acons_nb2': cand_acons_nb2, * 'acons_nb3': cand_acons_nb3, * 'acons_nb4': cand_acons_nb4, # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_acons_nb4, ((PyObject *)__pyx_v_cand_acons_nb4)) < 0) __PYX_ERR(3, 5554, __pyx_L1_error) __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":4956 * } * * def getKhalilState(self, root_info, candidates): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_slack.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getKhalilState", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_act_cons_w4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_max4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_mean4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_min4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_nb4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_sum4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var2.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var3.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_acons_var4.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_max_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_mean_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_min_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_cdeg_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs_neg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_coefs_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nb_down_infeas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nb_up_infeas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nnzrs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nrhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_nrhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_nn_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_nn_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_np_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_np_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pn_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pn_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pp_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ota_pp_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_prhs_ratio_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_prhs_ratio_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_down.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_product.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_ratio.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_sum.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_ps_up.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_cdeg_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_ncoefs_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_max.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_mean.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_min.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_root_pcoefs_var.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cand_slack.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cand_coefs); __Pyx_XDECREF((PyObject *)__pyx_v_cand_coefs_pos); __Pyx_XDECREF((PyObject *)__pyx_v_cand_coefs_neg); __Pyx_XDECREF((PyObject *)__pyx_v_cand_nnzrs); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_cdeg_mean); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_cdeg_var); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_cdeg_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_cdeg_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_pcoefs_count); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_pcoefs_mean); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_pcoefs_var); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_pcoefs_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_pcoefs_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_ncoefs_count); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_ncoefs_mean); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_ncoefs_var); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_ncoefs_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_root_ncoefs_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_slack); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ps_up); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ps_down); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ps_ratio); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ps_sum); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ps_product); __Pyx_XDECREF((PyObject *)__pyx_v_cand_nb_up_infeas); __Pyx_XDECREF((PyObject *)__pyx_v_cand_nb_down_infeas); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_mean); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_var); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_mean_ratio); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_min_ratio); __Pyx_XDECREF((PyObject *)__pyx_v_cand_cdeg_max_ratio); __Pyx_XDECREF((PyObject *)__pyx_v_cand_prhs_ratio_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_prhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_nrhs_ratio_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_nrhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_pp_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_pp_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_pn_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_pn_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_np_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_np_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_nn_max); __Pyx_XDECREF((PyObject *)__pyx_v_cand_ota_nn_min); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_sum1); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_mean1); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_var1); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_max1); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_min1); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_sum2); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_mean2); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_var2); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_max2); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_min2); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_sum3); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_mean3); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_var3); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_max3); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_min3); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_sum4); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_mean4); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_var4); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_max4); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_min4); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_nb1); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_nb2); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_nb3); __Pyx_XDECREF((PyObject *)__pyx_v_cand_acons_nb4); __Pyx_XDECREF(__pyx_v_cand_solfracs); __Pyx_XDECREF(__pyx_v_cand_frac_up_infeas); __Pyx_XDECREF(__pyx_v_cand_frac_down_infeas); __Pyx_XDECREF(__pyx_v_rhs_ratio_max); __Pyx_XDECREF(__pyx_v_rhs_ratio_min); __Pyx_XDECREF((PyObject *)__pyx_v_act_cons_w1); __Pyx_XDECREF((PyObject *)__pyx_v_act_cons_w2); __Pyx_XDECREF((PyObject *)__pyx_v_act_cons_w3); __Pyx_XDECREF((PyObject *)__pyx_v_act_cons_w4); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":5628 * } * * def getSolvingStats(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_513getSolvingStats(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_513getSolvingStats(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSolvingStats (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_512getSolvingStats(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_512getSolvingStats(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP *__pyx_v_scip; SCIP_NODE **__pyx_v_leaves; SCIP_NODE **__pyx_v_children; SCIP_NODE **__pyx_v_siblings; int __pyx_v_nleaves; int __pyx_v_nchildren; int __pyx_v_nsiblings; int __pyx_v_i; CYTHON_UNUSED __pyx_t_5numpy_float_t __pyx_v_primalbound; __pyx_t_5numpy_float_t __pyx_v_dualbound; PyArrayObject *__pyx_v_lowerbounds = 0; PyObject *__pyx_v_percentiles = NULL; PyObject *__pyx_v_qs = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_lowerbounds; __Pyx_Buffer __pyx_pybuffer_lowerbounds; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; SCIP_Real __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolvingStats", 0); __pyx_pybuffer_lowerbounds.pybuffer.buf = NULL; __pyx_pybuffer_lowerbounds.refcount = 0; __pyx_pybuffernd_lowerbounds.data = NULL; __pyx_pybuffernd_lowerbounds.rcbuffer = &__pyx_pybuffer_lowerbounds; /* "pyscipopt/scip.pyx":5629 * * def getSolvingStats(self): * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * * # recover open nodes */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":5637 * cdef int nleaves, nchildren, nsiblings, i * * PY_SCIP_CALL(SCIPgetOpenNodesData(scip, &leaves, &children, &siblings, &nleaves, &nchildren, &nsiblings)) # <<<<<<<<<<<<<< * * # recover upper and lower bounds */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PY_SCIP_CALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_SCIP_RETCODE(SCIPgetOpenNodesData(__pyx_v_scip, (&__pyx_v_leaves), (&__pyx_v_children), (&__pyx_v_siblings), (&__pyx_v_nleaves), (&__pyx_v_nchildren), (&__pyx_v_nsiblings))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5640 * * # recover upper and lower bounds * cdef np.float_t primalbound = SCIPgetPrimalbound(scip) # <<<<<<<<<<<<<< * cdef np.float_t dualbound = SCIPgetDualbound(scip) * */ __pyx_v_primalbound = SCIPgetPrimalbound(__pyx_v_scip); /* "pyscipopt/scip.pyx":5641 * # recover upper and lower bounds * cdef np.float_t primalbound = SCIPgetPrimalbound(scip) * cdef np.float_t dualbound = SCIPgetDualbound(scip) # <<<<<<<<<<<<<< * * # record open node quantiles */ __pyx_v_dualbound = SCIPgetDualbound(__pyx_v_scip); /* "pyscipopt/scip.pyx":5644 * * # record open node quantiles * cdef np.ndarray[np.float_t, ndim=1] lowerbounds = np.empty([nleaves+nchildren+nsiblings+1], dtype=np.float) # <<<<<<<<<<<<<< * * lowerbounds[0] = dualbound */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_long((((__pyx_v_nleaves + __pyx_v_nchildren) + __pyx_v_nsiblings) + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5644, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_lowerbounds = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.buf = NULL; __PYX_ERR(3, 5644, __pyx_L1_error) } else {__pyx_pybuffernd_lowerbounds.diminfo[0].strides = __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lowerbounds.diminfo[0].shape = __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_lowerbounds = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":5646 * cdef np.ndarray[np.float_t, ndim=1] lowerbounds = np.empty([nleaves+nchildren+nsiblings+1], dtype=np.float) * * lowerbounds[0] = dualbound # <<<<<<<<<<<<<< * for i in range(nleaves): * lowerbounds[1+i] = leaves[i].lowerbound */ __pyx_t_8 = 0; __pyx_t_9 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_lowerbounds.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_lowerbounds.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); __PYX_ERR(3, 5646, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lowerbounds.diminfo[0].strides) = __pyx_v_dualbound; /* "pyscipopt/scip.pyx":5647 * * lowerbounds[0] = dualbound * for i in range(nleaves): # <<<<<<<<<<<<<< * lowerbounds[1+i] = leaves[i].lowerbound * for i in range(nchildren): */ __pyx_t_9 = __pyx_v_nleaves; __pyx_t_10 = __pyx_t_9; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pyscipopt/scip.pyx":5648 * lowerbounds[0] = dualbound * for i in range(nleaves): * lowerbounds[1+i] = leaves[i].lowerbound # <<<<<<<<<<<<<< * for i in range(nchildren): * lowerbounds[1+nleaves+i] = children[i].lowerbound */ __pyx_t_12 = (__pyx_v_leaves[__pyx_v_i])->lowerbound; __pyx_t_8 = (1 + __pyx_v_i); __pyx_t_13 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_lowerbounds.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_lowerbounds.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); __PYX_ERR(3, 5648, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lowerbounds.diminfo[0].strides) = __pyx_t_12; } /* "pyscipopt/scip.pyx":5649 * for i in range(nleaves): * lowerbounds[1+i] = leaves[i].lowerbound * for i in range(nchildren): # <<<<<<<<<<<<<< * lowerbounds[1+nleaves+i] = children[i].lowerbound * for i in range(nsiblings): */ __pyx_t_9 = __pyx_v_nchildren; __pyx_t_10 = __pyx_t_9; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pyscipopt/scip.pyx":5650 * lowerbounds[1+i] = leaves[i].lowerbound * for i in range(nchildren): * lowerbounds[1+nleaves+i] = children[i].lowerbound # <<<<<<<<<<<<<< * for i in range(nsiblings): * lowerbounds[1+nleaves+nchildren+i] = siblings[i].lowerbound */ __pyx_t_12 = (__pyx_v_children[__pyx_v_i])->lowerbound; __pyx_t_8 = ((1 + __pyx_v_nleaves) + __pyx_v_i); __pyx_t_13 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_lowerbounds.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_lowerbounds.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); __PYX_ERR(3, 5650, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lowerbounds.diminfo[0].strides) = __pyx_t_12; } /* "pyscipopt/scip.pyx":5651 * for i in range(nchildren): * lowerbounds[1+nleaves+i] = children[i].lowerbound * for i in range(nsiblings): # <<<<<<<<<<<<<< * lowerbounds[1+nleaves+nchildren+i] = siblings[i].lowerbound * */ __pyx_t_9 = __pyx_v_nsiblings; __pyx_t_10 = __pyx_t_9; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pyscipopt/scip.pyx":5652 * lowerbounds[1+nleaves+i] = children[i].lowerbound * for i in range(nsiblings): * lowerbounds[1+nleaves+nchildren+i] = siblings[i].lowerbound # <<<<<<<<<<<<<< * * percentiles = (10, 25, 50, 75, 90) */ __pyx_t_12 = (__pyx_v_siblings[__pyx_v_i])->lowerbound; __pyx_t_8 = (((1 + __pyx_v_nleaves) + __pyx_v_nchildren) + __pyx_v_i); __pyx_t_13 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_lowerbounds.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_lowerbounds.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); __PYX_ERR(3, 5652, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lowerbounds.diminfo[0].strides) = __pyx_t_12; } /* "pyscipopt/scip.pyx":5654 * lowerbounds[1+nleaves+nchildren+i] = siblings[i].lowerbound * * percentiles = (10, 25, 50, 75, 90) # <<<<<<<<<<<<<< * qs = np.percentile(lowerbounds, percentiles, overwrite_input=True, interpolation='linear') * */ __Pyx_INCREF(__pyx_tuple__101); __pyx_v_percentiles = __pyx_tuple__101; /* "pyscipopt/scip.pyx":5655 * * percentiles = (10, 25, 50, 75, 90) * qs = np.percentile(lowerbounds, percentiles, overwrite_input=True, interpolation='linear') # <<<<<<<<<<<<<< * * return { */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_percentile); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_lowerbounds)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lowerbounds)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_lowerbounds)); __Pyx_INCREF(__pyx_v_percentiles); __Pyx_GIVEREF(__pyx_v_percentiles); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_percentiles); __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_overwrite_input, Py_True) < 0) __PYX_ERR(3, 5655, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_interpolation, __pyx_n_u_linear) < 0) __PYX_ERR(3, 5655, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_qs = __pyx_t_3; __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5657 * qs = np.percentile(lowerbounds, percentiles, overwrite_input=True, interpolation='linear') * * return { # <<<<<<<<<<<<<< * * # open nodes (parent's) dual bounds quantiles */ __Pyx_XDECREF(__pyx_r); /* "pyscipopt/scip.pyx":5660 * * # open nodes (parent's) dual bounds quantiles * 'opennodes_10quant': qs[0], # <<<<<<<<<<<<<< * 'opennodes_25quant': qs[1], * 'opennodes_50quant': qs[2], */ __pyx_t_3 = __Pyx_PyDict_NewPresized(101); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_qs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_opennodes_10quant, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5661 * # open nodes (parent's) dual bounds quantiles * 'opennodes_10quant': qs[0], * 'opennodes_25quant': qs[1], # <<<<<<<<<<<<<< * 'opennodes_50quant': qs[2], * 'opennodes_75quant': qs[3], */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_qs, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_opennodes_25quant, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5662 * 'opennodes_10quant': qs[0], * 'opennodes_25quant': qs[1], * 'opennodes_50quant': qs[2], # <<<<<<<<<<<<<< * 'opennodes_75quant': qs[3], * 'opennodes_90quant': qs[4], */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_qs, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_opennodes_50quant, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5663 * 'opennodes_25quant': qs[1], * 'opennodes_50quant': qs[2], * 'opennodes_75quant': qs[3], # <<<<<<<<<<<<<< * 'opennodes_90quant': qs[4], * */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_qs, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_opennodes_75quant, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5664 * 'opennodes_50quant': qs[2], * 'opennodes_75quant': qs[3], * 'opennodes_90quant': qs[4], # <<<<<<<<<<<<<< * * # hardcoded statistics */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_qs, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_opennodes_90quant, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5667 * * # hardcoded statistics * 'ninternalnodes': scip.stat.ninternalnodes, # <<<<<<<<<<<<<< * 'ncreatednodes': scip.stat.ncreatednodes, * 'ncreatednodesrun': scip.stat.ncreatednodesrun, */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(__pyx_v_scip->stat->ninternalnodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ninternalnodes, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5668 * # hardcoded statistics * 'ninternalnodes': scip.stat.ninternalnodes, * 'ncreatednodes': scip.stat.ncreatednodes, # <<<<<<<<<<<<<< * 'ncreatednodesrun': scip.stat.ncreatednodesrun, * 'nactivatednodes': scip.stat.nactivatednodes, */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(__pyx_v_scip->stat->ncreatednodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ncreatednodes, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5669 * 'ninternalnodes': scip.stat.ninternalnodes, * 'ncreatednodes': scip.stat.ncreatednodes, * 'ncreatednodesrun': scip.stat.ncreatednodesrun, # <<<<<<<<<<<<<< * 'nactivatednodes': scip.stat.nactivatednodes, * 'ndeactivatednodes': scip.stat.ndeactivatednodes, */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(__pyx_v_scip->stat->ncreatednodesrun); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ncreatednodesrun, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5670 * 'ncreatednodes': scip.stat.ncreatednodes, * 'ncreatednodesrun': scip.stat.ncreatednodesrun, * 'nactivatednodes': scip.stat.nactivatednodes, # <<<<<<<<<<<<<< * 'ndeactivatednodes': scip.stat.ndeactivatednodes, * */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(__pyx_v_scip->stat->nactivatednodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nactivatednodes, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5671 * 'ncreatednodesrun': scip.stat.ncreatednodesrun, * 'nactivatednodes': scip.stat.nactivatednodes, * 'ndeactivatednodes': scip.stat.ndeactivatednodes, # <<<<<<<<<<<<<< * * # http://scip.zib.de/doc/html/group__PublicLPMethods.php */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(__pyx_v_scip->stat->ndeactivatednodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ndeactivatednodes, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5675 * # http://scip.zib.de/doc/html/group__PublicLPMethods.php * * 'lp_obj': SCIPgetLPObjval(scip), # <<<<<<<<<<<<<< * * # http://scip.zib.de/doc/html/group__PublicTreeMethods.php */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetLPObjval(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_lp_obj, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5679 * # http://scip.zib.de/doc/html/group__PublicTreeMethods.php * * 'depth': SCIPgetDepth(scip), # <<<<<<<<<<<<<< * 'focusdepth': SCIPgetFocusDepth(scip), * 'plungedepth': SCIPgetPlungeDepth(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetDepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_depth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5680 * * 'depth': SCIPgetDepth(scip), * 'focusdepth': SCIPgetFocusDepth(scip), # <<<<<<<<<<<<<< * 'plungedepth': SCIPgetPlungeDepth(scip), * 'effectiverootdepth': SCIPgetEffectiveRootDepth(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetFocusDepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_focusdepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5681 * 'depth': SCIPgetDepth(scip), * 'focusdepth': SCIPgetFocusDepth(scip), * 'plungedepth': SCIPgetPlungeDepth(scip), # <<<<<<<<<<<<<< * 'effectiverootdepth': SCIPgetEffectiveRootDepth(scip), * 'inrepropagation': SCIPinRepropagation(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetPlungeDepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_plungedepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5682 * 'focusdepth': SCIPgetFocusDepth(scip), * 'plungedepth': SCIPgetPlungeDepth(scip), * 'effectiverootdepth': SCIPgetEffectiveRootDepth(scip), # <<<<<<<<<<<<<< * 'inrepropagation': SCIPinRepropagation(scip), * 'nleaves': SCIPgetNLeaves(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetEffectiveRootDepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_effectiverootdepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5683 * 'plungedepth': SCIPgetPlungeDepth(scip), * 'effectiverootdepth': SCIPgetEffectiveRootDepth(scip), * 'inrepropagation': SCIPinRepropagation(scip), # <<<<<<<<<<<<<< * 'nleaves': SCIPgetNLeaves(scip), * 'nnodesleft': SCIPgetNNodesLeft(scip), # nleaves + nchildren + nsiblings */ __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPinRepropagation(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_inrepropagation, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5684 * 'effectiverootdepth': SCIPgetEffectiveRootDepth(scip), * 'inrepropagation': SCIPinRepropagation(scip), * 'nleaves': SCIPgetNLeaves(scip), # <<<<<<<<<<<<<< * 'nnodesleft': SCIPgetNNodesLeft(scip), # nleaves + nchildren + nsiblings * 'cutoffdepth': SCIPgetCutoffdepth(scip), # depth of first node in active path that is marked being cutoff */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNLeaves(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nleaves, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5685 * 'inrepropagation': SCIPinRepropagation(scip), * 'nleaves': SCIPgetNLeaves(scip), * 'nnodesleft': SCIPgetNNodesLeft(scip), # nleaves + nchildren + nsiblings # <<<<<<<<<<<<<< * 'cutoffdepth': SCIPgetCutoffdepth(scip), # depth of first node in active path that is marked being cutoff * 'repropdepth': SCIPgetRepropdepth(scip), # depth of first node in active path that has to be propagated again */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNNodesLeft(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnodesleft, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5686 * 'nleaves': SCIPgetNLeaves(scip), * 'nnodesleft': SCIPgetNNodesLeft(scip), # nleaves + nchildren + nsiblings * 'cutoffdepth': SCIPgetCutoffdepth(scip), # depth of first node in active path that is marked being cutoff # <<<<<<<<<<<<<< * 'repropdepth': SCIPgetRepropdepth(scip), # depth of first node in active path that has to be propagated again * */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetCutoffdepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cutoffdepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5687 * 'nnodesleft': SCIPgetNNodesLeft(scip), # nleaves + nchildren + nsiblings * 'cutoffdepth': SCIPgetCutoffdepth(scip), # depth of first node in active path that is marked being cutoff * 'repropdepth': SCIPgetRepropdepth(scip), # depth of first node in active path that has to be propagated again # <<<<<<<<<<<<<< * * # http://scip.zib.de/doc/html/group__PublicSolvingStatsMethods.php */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetRepropdepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_repropdepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5691 * # http://scip.zib.de/doc/html/group__PublicSolvingStatsMethods.php * * 'nruns': SCIPgetNRuns(scip), # <<<<<<<<<<<<<< * 'nreoptruns': SCIPgetNReoptRuns(scip), * 'nnodes': SCIPgetNNodes(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNRuns(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nruns, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5692 * * 'nruns': SCIPgetNRuns(scip), * 'nreoptruns': SCIPgetNReoptRuns(scip), # <<<<<<<<<<<<<< * 'nnodes': SCIPgetNNodes(scip), * 'ntotalnodes': SCIPgetNTotalNodes(scip), # total number of processed nodes in all runs, including the focus node */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNReoptRuns(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nreoptruns, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5693 * 'nruns': SCIPgetNRuns(scip), * 'nreoptruns': SCIPgetNReoptRuns(scip), * 'nnodes': SCIPgetNNodes(scip), # <<<<<<<<<<<<<< * 'ntotalnodes': SCIPgetNTotalNodes(scip), # total number of processed nodes in all runs, including the focus node * 'nfeasibleleaves': SCIPgetNFeasibleLeaves(scip), # number of leaf nodes processed with feasible relaxation solution */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNodes(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnodes, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5694 * 'nreoptruns': SCIPgetNReoptRuns(scip), * 'nnodes': SCIPgetNNodes(scip), * 'ntotalnodes': SCIPgetNTotalNodes(scip), # total number of processed nodes in all runs, including the focus node # <<<<<<<<<<<<<< * 'nfeasibleleaves': SCIPgetNFeasibleLeaves(scip), # number of leaf nodes processed with feasible relaxation solution * 'ninfeasibleleaves': SCIPgetNInfeasibleLeaves(scip), # number of infeasible leaf nodes processed */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNTotalNodes(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ntotalnodes, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5695 * 'nnodes': SCIPgetNNodes(scip), * 'ntotalnodes': SCIPgetNTotalNodes(scip), # total number of processed nodes in all runs, including the focus node * 'nfeasibleleaves': SCIPgetNFeasibleLeaves(scip), # number of leaf nodes processed with feasible relaxation solution # <<<<<<<<<<<<<< * 'ninfeasibleleaves': SCIPgetNInfeasibleLeaves(scip), # number of infeasible leaf nodes processed * 'nobjlimleaves': SCIPgetNObjlimLeaves(scip), # number of processed leaf nodes that hit LP objective limit */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNFeasibleLeaves(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nfeasibleleaves, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5696 * 'ntotalnodes': SCIPgetNTotalNodes(scip), # total number of processed nodes in all runs, including the focus node * 'nfeasibleleaves': SCIPgetNFeasibleLeaves(scip), # number of leaf nodes processed with feasible relaxation solution * 'ninfeasibleleaves': SCIPgetNInfeasibleLeaves(scip), # number of infeasible leaf nodes processed # <<<<<<<<<<<<<< * 'nobjlimleaves': SCIPgetNObjlimLeaves(scip), # number of processed leaf nodes that hit LP objective limit * 'ndelayedcutoffs': SCIPgetNDelayedCutoffs(scip), # gets number of times a selected node was from a cut off subtree */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNInfeasibleLeaves(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ninfeasibleleaves, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5697 * 'nfeasibleleaves': SCIPgetNFeasibleLeaves(scip), # number of leaf nodes processed with feasible relaxation solution * 'ninfeasibleleaves': SCIPgetNInfeasibleLeaves(scip), # number of infeasible leaf nodes processed * 'nobjlimleaves': SCIPgetNObjlimLeaves(scip), # number of processed leaf nodes that hit LP objective limit # <<<<<<<<<<<<<< * 'ndelayedcutoffs': SCIPgetNDelayedCutoffs(scip), # gets number of times a selected node was from a cut off subtree * 'nlps': SCIPgetNLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNObjlimLeaves(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nobjlimleaves, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5698 * 'ninfeasibleleaves': SCIPgetNInfeasibleLeaves(scip), # number of infeasible leaf nodes processed * 'nobjlimleaves': SCIPgetNObjlimLeaves(scip), # number of processed leaf nodes that hit LP objective limit * 'ndelayedcutoffs': SCIPgetNDelayedCutoffs(scip), # gets number of times a selected node was from a cut off subtree # <<<<<<<<<<<<<< * 'nlps': SCIPgetNLPs(scip), * 'nlpiterations': SCIPgetNLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDelayedCutoffs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ndelayedcutoffs, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5699 * 'nobjlimleaves': SCIPgetNObjlimLeaves(scip), # number of processed leaf nodes that hit LP objective limit * 'ndelayedcutoffs': SCIPgetNDelayedCutoffs(scip), # gets number of times a selected node was from a cut off subtree * 'nlps': SCIPgetNLPs(scip), # <<<<<<<<<<<<<< * 'nlpiterations': SCIPgetNLPIterations(scip), * 'nnzs': SCIPgetNNZs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nlps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5700 * 'ndelayedcutoffs': SCIPgetNDelayedCutoffs(scip), # gets number of times a selected node was from a cut off subtree * 'nlps': SCIPgetNLPs(scip), * 'nlpiterations': SCIPgetNLPIterations(scip), # <<<<<<<<<<<<<< * 'nnzs': SCIPgetNNZs(scip), * 'nrootlpiterations': SCIPgetNRootLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5701 * 'nlps': SCIPgetNLPs(scip), * 'nlpiterations': SCIPgetNLPIterations(scip), * 'nnzs': SCIPgetNNZs(scip), # <<<<<<<<<<<<<< * 'nrootlpiterations': SCIPgetNRootLPIterations(scip), * 'nrootfirstlpiterations': SCIPgetNRootFirstLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNZs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnzs, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5702 * 'nlpiterations': SCIPgetNLPIterations(scip), * 'nnzs': SCIPgetNNZs(scip), * 'nrootlpiterations': SCIPgetNRootLPIterations(scip), # <<<<<<<<<<<<<< * 'nrootfirstlpiterations': SCIPgetNRootFirstLPIterations(scip), * 'nprimallps': SCIPgetNPrimalLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNRootLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nrootlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5703 * 'nnzs': SCIPgetNNZs(scip), * 'nrootlpiterations': SCIPgetNRootLPIterations(scip), * 'nrootfirstlpiterations': SCIPgetNRootFirstLPIterations(scip), # <<<<<<<<<<<<<< * 'nprimallps': SCIPgetNPrimalLPs(scip), * 'nprimallpiterations': SCIPgetNPrimalLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNRootFirstLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nrootfirstlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5704 * 'nrootlpiterations': SCIPgetNRootLPIterations(scip), * 'nrootfirstlpiterations': SCIPgetNRootFirstLPIterations(scip), * 'nprimallps': SCIPgetNPrimalLPs(scip), # <<<<<<<<<<<<<< * 'nprimallpiterations': SCIPgetNPrimalLPIterations(scip), * 'nduallps': SCIPgetNDualLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNPrimalLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nprimallps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5705 * 'nrootfirstlpiterations': SCIPgetNRootFirstLPIterations(scip), * 'nprimallps': SCIPgetNPrimalLPs(scip), * 'nprimallpiterations': SCIPgetNPrimalLPIterations(scip), # <<<<<<<<<<<<<< * 'nduallps': SCIPgetNDualLPs(scip), * 'nduallpiterations': SCIPgetNDualLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNPrimalLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nprimallpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5706 * 'nprimallps': SCIPgetNPrimalLPs(scip), * 'nprimallpiterations': SCIPgetNPrimalLPIterations(scip), * 'nduallps': SCIPgetNDualLPs(scip), # <<<<<<<<<<<<<< * 'nduallpiterations': SCIPgetNDualLPIterations(scip), * 'nbarrierlps': SCIPgetNBarrierLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDualLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nduallps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5707 * 'nprimallpiterations': SCIPgetNPrimalLPIterations(scip), * 'nduallps': SCIPgetNDualLPs(scip), * 'nduallpiterations': SCIPgetNDualLPIterations(scip), # <<<<<<<<<<<<<< * 'nbarrierlps': SCIPgetNBarrierLPs(scip), * 'nbarrierlpiterations': SCIPgetNBarrierLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDualLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nduallpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5708 * 'nduallps': SCIPgetNDualLPs(scip), * 'nduallpiterations': SCIPgetNDualLPIterations(scip), * 'nbarrierlps': SCIPgetNBarrierLPs(scip), # <<<<<<<<<<<<<< * 'nbarrierlpiterations': SCIPgetNBarrierLPIterations(scip), * 'nresolvelps': SCIPgetNResolveLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNBarrierLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nbarrierlps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5709 * 'nduallpiterations': SCIPgetNDualLPIterations(scip), * 'nbarrierlps': SCIPgetNBarrierLPs(scip), * 'nbarrierlpiterations': SCIPgetNBarrierLPIterations(scip), # <<<<<<<<<<<<<< * 'nresolvelps': SCIPgetNResolveLPs(scip), * 'nresolvelpiterations': SCIPgetNResolveLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNBarrierLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nbarrierlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5710 * 'nbarrierlps': SCIPgetNBarrierLPs(scip), * 'nbarrierlpiterations': SCIPgetNBarrierLPIterations(scip), * 'nresolvelps': SCIPgetNResolveLPs(scip), # <<<<<<<<<<<<<< * 'nresolvelpiterations': SCIPgetNResolveLPIterations(scip), * 'nprimalresolvelps': SCIPgetNPrimalResolveLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNResolveLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nresolvelps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5711 * 'nbarrierlpiterations': SCIPgetNBarrierLPIterations(scip), * 'nresolvelps': SCIPgetNResolveLPs(scip), * 'nresolvelpiterations': SCIPgetNResolveLPIterations(scip), # <<<<<<<<<<<<<< * 'nprimalresolvelps': SCIPgetNPrimalResolveLPs(scip), * 'nprimalresolvelpiterations': SCIPgetNPrimalResolveLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNResolveLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nresolvelpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5712 * 'nresolvelps': SCIPgetNResolveLPs(scip), * 'nresolvelpiterations': SCIPgetNResolveLPIterations(scip), * 'nprimalresolvelps': SCIPgetNPrimalResolveLPs(scip), # <<<<<<<<<<<<<< * 'nprimalresolvelpiterations': SCIPgetNPrimalResolveLPIterations(scip), * 'ndualresolvelps': SCIPgetNDualResolveLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNPrimalResolveLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nprimalresolvelps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5713 * 'nresolvelpiterations': SCIPgetNResolveLPIterations(scip), * 'nprimalresolvelps': SCIPgetNPrimalResolveLPs(scip), * 'nprimalresolvelpiterations': SCIPgetNPrimalResolveLPIterations(scip), # <<<<<<<<<<<<<< * 'ndualresolvelps': SCIPgetNDualResolveLPs(scip), * 'ndualresolvelpiterations': SCIPgetNDualResolveLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNPrimalResolveLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nprimalresolvelpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5714 * 'nprimalresolvelps': SCIPgetNPrimalResolveLPs(scip), * 'nprimalresolvelpiterations': SCIPgetNPrimalResolveLPIterations(scip), * 'ndualresolvelps': SCIPgetNDualResolveLPs(scip), # <<<<<<<<<<<<<< * 'ndualresolvelpiterations': SCIPgetNDualResolveLPIterations(scip), * 'nnodelps': SCIPgetNNodeLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDualResolveLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ndualresolvelps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5715 * 'nprimalresolvelpiterations': SCIPgetNPrimalResolveLPIterations(scip), * 'ndualresolvelps': SCIPgetNDualResolveLPs(scip), * 'ndualresolvelpiterations': SCIPgetNDualResolveLPIterations(scip), # <<<<<<<<<<<<<< * 'nnodelps': SCIPgetNNodeLPs(scip), * 'nnodelpiterations': SCIPgetNNodeLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDualResolveLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ndualresolvelpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5716 * 'ndualresolvelps': SCIPgetNDualResolveLPs(scip), * 'ndualresolvelpiterations': SCIPgetNDualResolveLPIterations(scip), * 'nnodelps': SCIPgetNNodeLPs(scip), # <<<<<<<<<<<<<< * 'nnodelpiterations': SCIPgetNNodeLPIterations(scip), * 'nnodeinitlps': SCIPgetNNodeInitLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNodeLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnodelps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5717 * 'ndualresolvelpiterations': SCIPgetNDualResolveLPIterations(scip), * 'nnodelps': SCIPgetNNodeLPs(scip), * 'nnodelpiterations': SCIPgetNNodeLPIterations(scip), # <<<<<<<<<<<<<< * 'nnodeinitlps': SCIPgetNNodeInitLPs(scip), * 'nnodeinitlpiterations': SCIPgetNNodeInitLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNodeLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnodelpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5718 * 'nnodelps': SCIPgetNNodeLPs(scip), * 'nnodelpiterations': SCIPgetNNodeLPIterations(scip), * 'nnodeinitlps': SCIPgetNNodeInitLPs(scip), # <<<<<<<<<<<<<< * 'nnodeinitlpiterations': SCIPgetNNodeInitLPIterations(scip), * 'ndivinglps': SCIPgetNDivingLPs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNodeInitLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnodeinitlps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5719 * 'nnodelpiterations': SCIPgetNNodeLPIterations(scip), * 'nnodeinitlps': SCIPgetNNodeInitLPs(scip), * 'nnodeinitlpiterations': SCIPgetNNodeInitLPIterations(scip), # <<<<<<<<<<<<<< * 'ndivinglps': SCIPgetNDivingLPs(scip), * 'ndivinglpiterations': SCIPgetNDivingLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNNodeInitLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nnodeinitlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5720 * 'nnodeinitlps': SCIPgetNNodeInitLPs(scip), * 'nnodeinitlpiterations': SCIPgetNNodeInitLPIterations(scip), * 'ndivinglps': SCIPgetNDivingLPs(scip), # <<<<<<<<<<<<<< * 'ndivinglpiterations': SCIPgetNDivingLPIterations(scip), * 'nstrongbranchs': SCIPgetNStrongbranchs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDivingLPs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ndivinglps, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5721 * 'nnodeinitlpiterations': SCIPgetNNodeInitLPIterations(scip), * 'ndivinglps': SCIPgetNDivingLPs(scip), * 'ndivinglpiterations': SCIPgetNDivingLPIterations(scip), # <<<<<<<<<<<<<< * 'nstrongbranchs': SCIPgetNStrongbranchs(scip), * 'nstrongbranchlpiterations': SCIPgetNStrongbranchLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNDivingLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ndivinglpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5722 * 'ndivinglps': SCIPgetNDivingLPs(scip), * 'ndivinglpiterations': SCIPgetNDivingLPIterations(scip), * 'nstrongbranchs': SCIPgetNStrongbranchs(scip), # <<<<<<<<<<<<<< * 'nstrongbranchlpiterations': SCIPgetNStrongbranchLPIterations(scip), * 'nrootstrongbranchs': SCIPgetNRootStrongbranchs(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNStrongbranchs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nstrongbranchs, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5723 * 'ndivinglpiterations': SCIPgetNDivingLPIterations(scip), * 'nstrongbranchs': SCIPgetNStrongbranchs(scip), * 'nstrongbranchlpiterations': SCIPgetNStrongbranchLPIterations(scip), # <<<<<<<<<<<<<< * 'nrootstrongbranchs': SCIPgetNRootStrongbranchs(scip), * 'nrootstrongbranchlpiterations': SCIPgetNRootStrongbranchLPIterations(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNStrongbranchLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nstrongbranchlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5724 * 'nstrongbranchs': SCIPgetNStrongbranchs(scip), * 'nstrongbranchlpiterations': SCIPgetNStrongbranchLPIterations(scip), * 'nrootstrongbranchs': SCIPgetNRootStrongbranchs(scip), # <<<<<<<<<<<<<< * 'nrootstrongbranchlpiterations': SCIPgetNRootStrongbranchLPIterations(scip), * 'npricerounds': SCIPgetNPriceRounds(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNRootStrongbranchs(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nrootstrongbranchs, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5725 * 'nstrongbranchlpiterations': SCIPgetNStrongbranchLPIterations(scip), * 'nrootstrongbranchs': SCIPgetNRootStrongbranchs(scip), * 'nrootstrongbranchlpiterations': SCIPgetNRootStrongbranchLPIterations(scip), # <<<<<<<<<<<<<< * 'npricerounds': SCIPgetNPriceRounds(scip), * 'npricevars': SCIPgetNPricevars(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNRootStrongbranchLPIterations(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nrootstrongbranchlpiterations, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5726 * 'nrootstrongbranchs': SCIPgetNRootStrongbranchs(scip), * 'nrootstrongbranchlpiterations': SCIPgetNRootStrongbranchLPIterations(scip), * 'npricerounds': SCIPgetNPriceRounds(scip), # <<<<<<<<<<<<<< * 'npricevars': SCIPgetNPricevars(scip), * 'npricevarsfound': SCIPgetNPricevarsFound(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNPriceRounds(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_npricerounds, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5727 * 'nrootstrongbranchlpiterations': SCIPgetNRootStrongbranchLPIterations(scip), * 'npricerounds': SCIPgetNPriceRounds(scip), * 'npricevars': SCIPgetNPricevars(scip), # <<<<<<<<<<<<<< * 'npricevarsfound': SCIPgetNPricevarsFound(scip), * 'npricevarsapplied': SCIPgetNPricevarsApplied(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNPricevars(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_npricevars, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5728 * 'npricerounds': SCIPgetNPriceRounds(scip), * 'npricevars': SCIPgetNPricevars(scip), * 'npricevarsfound': SCIPgetNPricevarsFound(scip), # <<<<<<<<<<<<<< * 'npricevarsapplied': SCIPgetNPricevarsApplied(scip), * 'nseparounds': SCIPgetNSepaRounds(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNPricevarsFound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_npricevarsfound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5729 * 'npricevars': SCIPgetNPricevars(scip), * 'npricevarsfound': SCIPgetNPricevarsFound(scip), * 'npricevarsapplied': SCIPgetNPricevarsApplied(scip), # <<<<<<<<<<<<<< * 'nseparounds': SCIPgetNSepaRounds(scip), * 'ncutsfound': SCIPgetNCutsFound(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNPricevarsApplied(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_npricevarsapplied, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5730 * 'npricevarsfound': SCIPgetNPricevarsFound(scip), * 'npricevarsapplied': SCIPgetNPricevarsApplied(scip), * 'nseparounds': SCIPgetNSepaRounds(scip), # <<<<<<<<<<<<<< * 'ncutsfound': SCIPgetNCutsFound(scip), * 'ncutsfoundround': SCIPgetNCutsFoundRound(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNSepaRounds(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nseparounds, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5731 * 'npricevarsapplied': SCIPgetNPricevarsApplied(scip), * 'nseparounds': SCIPgetNSepaRounds(scip), * 'ncutsfound': SCIPgetNCutsFound(scip), # <<<<<<<<<<<<<< * 'ncutsfoundround': SCIPgetNCutsFoundRound(scip), * 'ncutsapplied': SCIPgetNCutsApplied(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNCutsFound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ncutsfound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5732 * 'nseparounds': SCIPgetNSepaRounds(scip), * 'ncutsfound': SCIPgetNCutsFound(scip), * 'ncutsfoundround': SCIPgetNCutsFoundRound(scip), # <<<<<<<<<<<<<< * 'ncutsapplied': SCIPgetNCutsApplied(scip), * 'nconflictconssfound': SCIPgetNConflictConssFound(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNCutsFoundRound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ncutsfoundround, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5733 * 'ncutsfound': SCIPgetNCutsFound(scip), * 'ncutsfoundround': SCIPgetNCutsFoundRound(scip), * 'ncutsapplied': SCIPgetNCutsApplied(scip), # <<<<<<<<<<<<<< * 'nconflictconssfound': SCIPgetNConflictConssFound(scip), * 'nconflictconssfoundnode': SCIPgetNConflictConssFoundNode(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNCutsApplied(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_ncutsapplied, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5734 * 'ncutsfoundround': SCIPgetNCutsFoundRound(scip), * 'ncutsapplied': SCIPgetNCutsApplied(scip), * 'nconflictconssfound': SCIPgetNConflictConssFound(scip), # <<<<<<<<<<<<<< * 'nconflictconssfoundnode': SCIPgetNConflictConssFoundNode(scip), * 'nconflictconssapplied': SCIPgetNConflictConssApplied(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNConflictConssFound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nconflictconssfound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5735 * 'ncutsapplied': SCIPgetNCutsApplied(scip), * 'nconflictconssfound': SCIPgetNConflictConssFound(scip), * 'nconflictconssfoundnode': SCIPgetNConflictConssFoundNode(scip), # <<<<<<<<<<<<<< * 'nconflictconssapplied': SCIPgetNConflictConssApplied(scip), * 'maxdepth': SCIPgetMaxDepth(scip), # maximal depth of all processed nodes in current branch and bound run (excluding probing nodes) */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNConflictConssFoundNode(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nconflictconssfoundnode, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5736 * 'nconflictconssfound': SCIPgetNConflictConssFound(scip), * 'nconflictconssfoundnode': SCIPgetNConflictConssFoundNode(scip), * 'nconflictconssapplied': SCIPgetNConflictConssApplied(scip), # <<<<<<<<<<<<<< * 'maxdepth': SCIPgetMaxDepth(scip), # maximal depth of all processed nodes in current branch and bound run (excluding probing nodes) * 'maxtotaldepth': SCIPgetMaxTotalDepth(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNConflictConssApplied(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nconflictconssapplied, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5737 * 'nconflictconssfoundnode': SCIPgetNConflictConssFoundNode(scip), * 'nconflictconssapplied': SCIPgetNConflictConssApplied(scip), * 'maxdepth': SCIPgetMaxDepth(scip), # maximal depth of all processed nodes in current branch and bound run (excluding probing nodes) # <<<<<<<<<<<<<< * 'maxtotaldepth': SCIPgetMaxTotalDepth(scip), * 'nbacktracks': SCIPgetNBacktracks(scip), # total number of backtracks, i.e. number of times, the new node was selected from the leaves queue */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetMaxDepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_maxdepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5738 * 'nconflictconssapplied': SCIPgetNConflictConssApplied(scip), * 'maxdepth': SCIPgetMaxDepth(scip), # maximal depth of all processed nodes in current branch and bound run (excluding probing nodes) * 'maxtotaldepth': SCIPgetMaxTotalDepth(scip), # <<<<<<<<<<<<<< * 'nbacktracks': SCIPgetNBacktracks(scip), # total number of backtracks, i.e. number of times, the new node was selected from the leaves queue * 'nactivesonss': SCIPgetNActiveConss(scip), */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetMaxTotalDepth(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_maxtotaldepth, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5739 * 'maxdepth': SCIPgetMaxDepth(scip), # maximal depth of all processed nodes in current branch and bound run (excluding probing nodes) * 'maxtotaldepth': SCIPgetMaxTotalDepth(scip), * 'nbacktracks': SCIPgetNBacktracks(scip), # total number of backtracks, i.e. number of times, the new node was selected from the leaves queue # <<<<<<<<<<<<<< * 'nactivesonss': SCIPgetNActiveConss(scip), * 'nenabledconss': SCIPgetNEnabledConss(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNBacktracks(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nbacktracks, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5740 * 'maxtotaldepth': SCIPgetMaxTotalDepth(scip), * 'nbacktracks': SCIPgetNBacktracks(scip), # total number of backtracks, i.e. number of times, the new node was selected from the leaves queue * 'nactivesonss': SCIPgetNActiveConss(scip), # <<<<<<<<<<<<<< * 'nenabledconss': SCIPgetNEnabledConss(scip), * 'avgdualbound': SCIPgetAvgDualbound(scip), # average dual bound of all unprocessed nodes for original problem */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNActiveConss(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nactivesonss, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5741 * 'nbacktracks': SCIPgetNBacktracks(scip), # total number of backtracks, i.e. number of times, the new node was selected from the leaves queue * 'nactivesonss': SCIPgetNActiveConss(scip), * 'nenabledconss': SCIPgetNEnabledConss(scip), # <<<<<<<<<<<<<< * 'avgdualbound': SCIPgetAvgDualbound(scip), # average dual bound of all unprocessed nodes for original problem * 'avglowerbound': SCIPgetAvgLowerbound(scip), # average lower (dual) bound of all unprocessed nodes in transformed problem */ __pyx_t_2 = __Pyx_PyInt_From_int(SCIPgetNEnabledConss(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nenabledconss, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5742 * 'nactivesonss': SCIPgetNActiveConss(scip), * 'nenabledconss': SCIPgetNEnabledConss(scip), * 'avgdualbound': SCIPgetAvgDualbound(scip), # average dual bound of all unprocessed nodes for original problem # <<<<<<<<<<<<<< * 'avglowerbound': SCIPgetAvgLowerbound(scip), # average lower (dual) bound of all unprocessed nodes in transformed problem * 'dualbound': SCIPgetDualbound(scip), # global dual bound */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgDualbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgdualbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5743 * 'nenabledconss': SCIPgetNEnabledConss(scip), * 'avgdualbound': SCIPgetAvgDualbound(scip), # average dual bound of all unprocessed nodes for original problem * 'avglowerbound': SCIPgetAvgLowerbound(scip), # average lower (dual) bound of all unprocessed nodes in transformed problem # <<<<<<<<<<<<<< * 'dualbound': SCIPgetDualbound(scip), # global dual bound * 'lowerbound': SCIPgetLowerbound(scip), # global lower (dual) bound in transformed problem */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgLowerbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avglowerbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5744 * 'avgdualbound': SCIPgetAvgDualbound(scip), # average dual bound of all unprocessed nodes for original problem * 'avglowerbound': SCIPgetAvgLowerbound(scip), # average lower (dual) bound of all unprocessed nodes in transformed problem * 'dualbound': SCIPgetDualbound(scip), # global dual bound # <<<<<<<<<<<<<< * 'lowerbound': SCIPgetLowerbound(scip), # global lower (dual) bound in transformed problem * 'dualboundroot': SCIPgetDualboundRoot(scip), # gets dual bound of the root node for the original problem */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetDualbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_dualbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5745 * 'avglowerbound': SCIPgetAvgLowerbound(scip), # average lower (dual) bound of all unprocessed nodes in transformed problem * 'dualbound': SCIPgetDualbound(scip), # global dual bound * 'lowerbound': SCIPgetLowerbound(scip), # global lower (dual) bound in transformed problem # <<<<<<<<<<<<<< * 'dualboundroot': SCIPgetDualboundRoot(scip), # gets dual bound of the root node for the original problem * 'lowerboundroot': SCIPgetLowerboundRoot(scip), # gets lower (dual) bound in transformed problem of the root node */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetLowerbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_lowerbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5746 * 'dualbound': SCIPgetDualbound(scip), # global dual bound * 'lowerbound': SCIPgetLowerbound(scip), # global lower (dual) bound in transformed problem * 'dualboundroot': SCIPgetDualboundRoot(scip), # gets dual bound of the root node for the original problem # <<<<<<<<<<<<<< * 'lowerboundroot': SCIPgetLowerboundRoot(scip), # gets lower (dual) bound in transformed problem of the root node * 'firstlpdualboundroot': SCIPgetFirstLPDualboundRoot(scip), # gets dual bound for the original problem obtained by the first LP solve at the root node */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetDualboundRoot(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_dualboundroot, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5747 * 'lowerbound': SCIPgetLowerbound(scip), # global lower (dual) bound in transformed problem * 'dualboundroot': SCIPgetDualboundRoot(scip), # gets dual bound of the root node for the original problem * 'lowerboundroot': SCIPgetLowerboundRoot(scip), # gets lower (dual) bound in transformed problem of the root node # <<<<<<<<<<<<<< * 'firstlpdualboundroot': SCIPgetFirstLPDualboundRoot(scip), # gets dual bound for the original problem obtained by the first LP solve at the root node * 'firstlplowerboundroot': SCIPgetFirstLPLowerboundRoot(scip), # gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetLowerboundRoot(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_lowerboundroot, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5748 * 'dualboundroot': SCIPgetDualboundRoot(scip), # gets dual bound of the root node for the original problem * 'lowerboundroot': SCIPgetLowerboundRoot(scip), # gets lower (dual) bound in transformed problem of the root node * 'firstlpdualboundroot': SCIPgetFirstLPDualboundRoot(scip), # gets dual bound for the original problem obtained by the first LP solve at the root node # <<<<<<<<<<<<<< * 'firstlplowerboundroot': SCIPgetFirstLPLowerboundRoot(scip), # gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node * 'firstprimalbound': SCIPgetFirstPrimalBound(scip), # the primal bound of the very first solution */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetFirstLPDualboundRoot(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_firstlpdualboundroot, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5749 * 'lowerboundroot': SCIPgetLowerboundRoot(scip), # gets lower (dual) bound in transformed problem of the root node * 'firstlpdualboundroot': SCIPgetFirstLPDualboundRoot(scip), # gets dual bound for the original problem obtained by the first LP solve at the root node * 'firstlplowerboundroot': SCIPgetFirstLPLowerboundRoot(scip), # gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node # <<<<<<<<<<<<<< * 'firstprimalbound': SCIPgetFirstPrimalBound(scip), # the primal bound of the very first solution * 'primalbound': SCIPgetPrimalbound(scip), # gets global primal bound (objective value of best solution or user objective limit) for the original problem */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetFirstLPLowerboundRoot(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_firstlplowerboundroot, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5750 * 'firstlpdualboundroot': SCIPgetFirstLPDualboundRoot(scip), # gets dual bound for the original problem obtained by the first LP solve at the root node * 'firstlplowerboundroot': SCIPgetFirstLPLowerboundRoot(scip), # gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node * 'firstprimalbound': SCIPgetFirstPrimalBound(scip), # the primal bound of the very first solution # <<<<<<<<<<<<<< * 'primalbound': SCIPgetPrimalbound(scip), # gets global primal bound (objective value of best solution or user objective limit) for the original problem * 'upperbound': SCIPgetUpperbound(scip), # gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetFirstPrimalBound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_firstprimalbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5751 * 'firstlplowerboundroot': SCIPgetFirstLPLowerboundRoot(scip), # gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node * 'firstprimalbound': SCIPgetFirstPrimalBound(scip), # the primal bound of the very first solution * 'primalbound': SCIPgetPrimalbound(scip), # gets global primal bound (objective value of best solution or user objective limit) for the original problem # <<<<<<<<<<<<<< * 'upperbound': SCIPgetUpperbound(scip), # gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit) * 'cutoffbound': SCIPgetCutoffbound(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetPrimalbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_primalbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5752 * 'firstprimalbound': SCIPgetFirstPrimalBound(scip), # the primal bound of the very first solution * 'primalbound': SCIPgetPrimalbound(scip), # gets global primal bound (objective value of best solution or user objective limit) for the original problem * 'upperbound': SCIPgetUpperbound(scip), # gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit) # <<<<<<<<<<<<<< * 'cutoffbound': SCIPgetCutoffbound(scip), * 'isprimalboundsol': SCIPisPrimalboundSol(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetUpperbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_upperbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5753 * 'primalbound': SCIPgetPrimalbound(scip), # gets global primal bound (objective value of best solution or user objective limit) for the original problem * 'upperbound': SCIPgetUpperbound(scip), # gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit) * 'cutoffbound': SCIPgetCutoffbound(scip), # <<<<<<<<<<<<<< * 'isprimalboundsol': SCIPisPrimalboundSol(scip), * 'gap': SCIPgetGap(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetCutoffbound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_cutoffbound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5754 * 'upperbound': SCIPgetUpperbound(scip), # gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit) * 'cutoffbound': SCIPgetCutoffbound(scip), * 'isprimalboundsol': SCIPisPrimalboundSol(scip), # <<<<<<<<<<<<<< * 'gap': SCIPgetGap(scip), * 'transgap': SCIPgetTransGap(scip), */ __pyx_t_2 = __Pyx_PyBool_FromLong(SCIPisPrimalboundSol(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_isprimalboundsol, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5755 * 'cutoffbound': SCIPgetCutoffbound(scip), * 'isprimalboundsol': SCIPisPrimalboundSol(scip), * 'gap': SCIPgetGap(scip), # <<<<<<<<<<<<<< * 'transgap': SCIPgetTransGap(scip), * 'nsolsfound': SCIPgetNSolsFound(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetGap(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_gap, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5756 * 'isprimalboundsol': SCIPisPrimalboundSol(scip), * 'gap': SCIPgetGap(scip), * 'transgap': SCIPgetTransGap(scip), # <<<<<<<<<<<<<< * 'nsolsfound': SCIPgetNSolsFound(scip), * 'nlimsolsfound': SCIPgetNLimSolsFound(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetTransGap(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_transgap, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5757 * 'gap': SCIPgetGap(scip), * 'transgap': SCIPgetTransGap(scip), * 'nsolsfound': SCIPgetNSolsFound(scip), # <<<<<<<<<<<<<< * 'nlimsolsfound': SCIPgetNLimSolsFound(scip), * 'nbestsolsfound': SCIPgetNBestSolsFound(scip), */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNSolsFound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nsolsfound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5758 * 'transgap': SCIPgetTransGap(scip), * 'nsolsfound': SCIPgetNSolsFound(scip), * 'nlimsolsfound': SCIPgetNLimSolsFound(scip), # <<<<<<<<<<<<<< * 'nbestsolsfound': SCIPgetNBestSolsFound(scip), * # SCIPgetAvgPseudocost(scip, SCIP_Real solvaldelta) */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNLimSolsFound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nlimsolsfound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5759 * 'nsolsfound': SCIPgetNSolsFound(scip), * 'nlimsolsfound': SCIPgetNLimSolsFound(scip), * 'nbestsolsfound': SCIPgetNBestSolsFound(scip), # <<<<<<<<<<<<<< * # SCIPgetAvgPseudocost(scip, SCIP_Real solvaldelta) * # SCIPgetAvgPseudocostCurrentRun(scip, SCIP_Real solvaldelta) */ __pyx_t_2 = __Pyx_PyInt_From_SCIP_Longint(SCIPgetNBestSolsFound(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nbestsolsfound, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5765 * # SCIPgetAvgPseudocostCountCurrentRun(scip, SCIP_BRANCHDIR dir) * # SCIPgetPseudocostCount(scip, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun) * 'avgpseudocostscore': SCIPgetAvgPseudocostScore(scip), # <<<<<<<<<<<<<< * # SCIPgetPseudocostVariance(scip, SCIP_BRANCHDIR branchdir, SCIP_Bool onlycurrentrun) * 'avgpseudocostscorecurrentrun': SCIPgetAvgPseudocostScoreCurrentRun(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgPseudocostScore(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgpseudocostscore, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5767 * 'avgpseudocostscore': SCIPgetAvgPseudocostScore(scip), * # SCIPgetPseudocostVariance(scip, SCIP_BRANCHDIR branchdir, SCIP_Bool onlycurrentrun) * 'avgpseudocostscorecurrentrun': SCIPgetAvgPseudocostScoreCurrentRun(scip), # <<<<<<<<<<<<<< * 'avgconflictscore': SCIPgetAvgConflictScore(scip), * 'avgconflictscorecurrentrun': SCIPgetAvgConflictScoreCurrentRun(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgPseudocostScoreCurrentRun(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgpseudocostscorecurrentrun, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5768 * # SCIPgetPseudocostVariance(scip, SCIP_BRANCHDIR branchdir, SCIP_Bool onlycurrentrun) * 'avgpseudocostscorecurrentrun': SCIPgetAvgPseudocostScoreCurrentRun(scip), * 'avgconflictscore': SCIPgetAvgConflictScore(scip), # <<<<<<<<<<<<<< * 'avgconflictscorecurrentrun': SCIPgetAvgConflictScoreCurrentRun(scip), * 'avgconfliclengthscore': SCIPgetAvgConflictlengthScore(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgConflictScore(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgconflictscore, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5769 * 'avgpseudocostscorecurrentrun': SCIPgetAvgPseudocostScoreCurrentRun(scip), * 'avgconflictscore': SCIPgetAvgConflictScore(scip), * 'avgconflictscorecurrentrun': SCIPgetAvgConflictScoreCurrentRun(scip), # <<<<<<<<<<<<<< * 'avgconfliclengthscore': SCIPgetAvgConflictlengthScore(scip), * 'avgconfliclengthscorecurrentrun': SCIPgetAvgConflictlengthScoreCurrentRun(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgConflictScoreCurrentRun(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgconflictscorecurrentrun, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5770 * 'avgconflictscore': SCIPgetAvgConflictScore(scip), * 'avgconflictscorecurrentrun': SCIPgetAvgConflictScoreCurrentRun(scip), * 'avgconfliclengthscore': SCIPgetAvgConflictlengthScore(scip), # <<<<<<<<<<<<<< * 'avgconfliclengthscorecurrentrun': SCIPgetAvgConflictlengthScoreCurrentRun(scip), * # SCIPgetAvgInferences(scip, SCIP_BRANCHDIR dir) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgConflictlengthScore(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgconfliclengthscore, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5771 * 'avgconflictscorecurrentrun': SCIPgetAvgConflictScoreCurrentRun(scip), * 'avgconfliclengthscore': SCIPgetAvgConflictlengthScore(scip), * 'avgconfliclengthscorecurrentrun': SCIPgetAvgConflictlengthScoreCurrentRun(scip), # <<<<<<<<<<<<<< * # SCIPgetAvgInferences(scip, SCIP_BRANCHDIR dir) * # SCIPgetAvgInferencesCurrentRun(scip, SCIP_BRANCHDIR dir) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgConflictlengthScoreCurrentRun(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgconfliclengthscorecurrentrun, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5774 * # SCIPgetAvgInferences(scip, SCIP_BRANCHDIR dir) * # SCIPgetAvgInferencesCurrentRun(scip, SCIP_BRANCHDIR dir) * 'avginferencescore': SCIPgetAvgInferenceScore(scip), # <<<<<<<<<<<<<< * 'avginferencescorecurrentrun': SCIPgetAvgInferenceScoreCurrentRun(scip), * # SCIPgetAvgCutoffs(scip, SCIP_BRANCHDIR dir) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgInferenceScore(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avginferencescore, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5775 * # SCIPgetAvgInferencesCurrentRun(scip, SCIP_BRANCHDIR dir) * 'avginferencescore': SCIPgetAvgInferenceScore(scip), * 'avginferencescorecurrentrun': SCIPgetAvgInferenceScoreCurrentRun(scip), # <<<<<<<<<<<<<< * # SCIPgetAvgCutoffs(scip, SCIP_BRANCHDIR dir) * # SCIPgetAvgCutoffsCurrentRun(scip, SCIP_BRANCHDIR dir) */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgInferenceScoreCurrentRun(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avginferencescorecurrentrun, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5778 * # SCIPgetAvgCutoffs(scip, SCIP_BRANCHDIR dir) * # SCIPgetAvgCutoffsCurrentRun(scip, SCIP_BRANCHDIR dir) * 'avgcutoffscore': SCIPgetAvgCutoffScore(scip), # <<<<<<<<<<<<<< * 'avgcuroffscorecurrentrun': SCIPgetAvgCutoffScoreCurrentRun(scip), * 'deterministictime': SCIPgetDeterministicTime(scip), # gets deterministic time number of LPs solved so far */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgCutoffScore(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgcutoffscore, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5779 * # SCIPgetAvgCutoffsCurrentRun(scip, SCIP_BRANCHDIR dir) * 'avgcutoffscore': SCIPgetAvgCutoffScore(scip), * 'avgcuroffscorecurrentrun': SCIPgetAvgCutoffScoreCurrentRun(scip), # <<<<<<<<<<<<<< * 'deterministictime': SCIPgetDeterministicTime(scip), # gets deterministic time number of LPs solved so far * 'solvingtime': SCIPgetSolvingTime(scip), */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetAvgCutoffScoreCurrentRun(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_avgcuroffscorecurrentrun, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5780 * 'avgcutoffscore': SCIPgetAvgCutoffScore(scip), * 'avgcuroffscorecurrentrun': SCIPgetAvgCutoffScoreCurrentRun(scip), * 'deterministictime': SCIPgetDeterministicTime(scip), # gets deterministic time number of LPs solved so far # <<<<<<<<<<<<<< * 'solvingtime': SCIPgetSolvingTime(scip), * } */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetDeterministicTime(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_deterministictime, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5781 * 'avgcuroffscorecurrentrun': SCIPgetAvgCutoffScoreCurrentRun(scip), * 'deterministictime': SCIPgetDeterministicTime(scip), # gets deterministic time number of LPs solved so far * 'solvingtime': SCIPgetSolvingTime(scip), # <<<<<<<<<<<<<< * } * */ __pyx_t_2 = PyFloat_FromDouble(SCIPgetSolvingTime(__pyx_v_scip)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_solvingtime, __pyx_t_2) < 0) __PYX_ERR(3, 5660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":5628 * } * * def getSolvingStats(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getSolvingStats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lowerbounds.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lowerbounds); __Pyx_XDECREF(__pyx_v_percentiles); __Pyx_XDECREF(__pyx_v_qs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":5784 * } * * def executeBranchRule(self, str name, allowaddcons): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULE* branchrule * cdef SCIP_RESULT result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_515executeBranchRule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_515executeBranchRule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_allowaddcons = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("executeBranchRule (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_allowaddcons,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allowaddcons)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("executeBranchRule", 1, 2, 2, 1); __PYX_ERR(3, 5784, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "executeBranchRule") < 0)) __PYX_ERR(3, 5784, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = ((PyObject*)values[0]); __pyx_v_allowaddcons = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("executeBranchRule", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5784, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.Model.executeBranchRule", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(3, 5784, __pyx_L1_error) __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_514executeBranchRule(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), __pyx_v_name, __pyx_v_allowaddcons); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_514executeBranchRule(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_allowaddcons) { SCIP_BRANCHRULE *__pyx_v_branchrule; SCIP_RESULT __pyx_v_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char const *__pyx_t_2; int __pyx_t_3; SCIP_Bool __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("executeBranchRule", 0); /* "pyscipopt/scip.pyx":5787 * cdef SCIP_BRANCHRULE* branchrule * cdef SCIP_RESULT result * branchrule = SCIPfindBranchrule(self._scip, name.encode("UTF-8")) # <<<<<<<<<<<<<< * if branchrule == NULL: * print("Error, branching rule not found!") */ if (unlikely(__pyx_v_name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); __PYX_ERR(3, 5787, __pyx_L1_error) } __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 5787, __pyx_L1_error) __pyx_v_branchrule = SCIPfindBranchrule(__pyx_v_self->_scip, __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":5788 * cdef SCIP_RESULT result * branchrule = SCIPfindBranchrule(self._scip, name.encode("UTF-8")) * if branchrule == NULL: # <<<<<<<<<<<<<< * print("Error, branching rule not found!") * return PY_SCIP_RESULT.DIDNOTFIND */ __pyx_t_3 = ((__pyx_v_branchrule == NULL) != 0); if (__pyx_t_3) { /* "pyscipopt/scip.pyx":5789 * branchrule = SCIPfindBranchrule(self._scip, name.encode("UTF-8")) * if branchrule == NULL: * print("Error, branching rule not found!") # <<<<<<<<<<<<<< * return PY_SCIP_RESULT.DIDNOTFIND * else: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":5790 * if branchrule == NULL: * print("Error, branching rule not found!") * return PY_SCIP_RESULT.DIDNOTFIND # <<<<<<<<<<<<<< * else: * branchrule.branchexeclp(self._scip, branchrule, allowaddcons, &result) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT), __pyx_n_s_DIDNOTFIND); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":5788 * cdef SCIP_RESULT result * branchrule = SCIPfindBranchrule(self._scip, name.encode("UTF-8")) * if branchrule == NULL: # <<<<<<<<<<<<<< * print("Error, branching rule not found!") * return PY_SCIP_RESULT.DIDNOTFIND */ } /* "pyscipopt/scip.pyx":5792 * return PY_SCIP_RESULT.DIDNOTFIND * else: * branchrule.branchexeclp(self._scip, branchrule, allowaddcons, &result) # <<<<<<<<<<<<<< * return result * */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_allowaddcons); if (unlikely((__pyx_t_4 == ((SCIP_Bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 5792, __pyx_L1_error) (void)(__pyx_v_branchrule->branchexeclp(__pyx_v_self->_scip, __pyx_v_branchrule, __pyx_t_4, (&__pyx_v_result))); /* "pyscipopt/scip.pyx":5793 * else: * branchrule.branchexeclp(self._scip, branchrule, allowaddcons, &result) * return result # <<<<<<<<<<<<<< * * def getConsVals(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SCIP_RESULT(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pyscipopt/scip.pyx":5784 * } * * def executeBranchRule(self, str name, allowaddcons): # <<<<<<<<<<<<<< * cdef SCIP_BRANCHRULE* branchrule * cdef SCIP_RESULT result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.executeBranchRule", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":5795 * return result * * def getConsVals(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef SCIP_CONS** conss = SCIPgetConss(scip) */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_517getConsVals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_517getConsVals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConsVals (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_516getConsVals(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_516getConsVals(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { SCIP *__pyx_v_scip; SCIP_CONS **__pyx_v_conss; int __pyx_v_ncons; int __pyx_v_nvars; PyArrayObject *__pyx_v_rhs_vec = 0; PyArrayObject *__pyx_v_lhs_vec = 0; PyArrayObject *__pyx_v_cons_matrix = 0; SCIP_VAR **__pyx_v_vars; SCIP_Real *__pyx_v_vals; int __pyx_v_nconsvars; SCIP_Bool __pyx_v_success; int __pyx_v_var_idx; int __pyx_v_i; int __pyx_v_j; PyObject *__pyx_v_varname = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_cons_matrix; __Pyx_Buffer __pyx_pybuffer_cons_matrix; __Pyx_LocalBuf_ND __pyx_pybuffernd_lhs_vec; __Pyx_Buffer __pyx_pybuffer_lhs_vec; __Pyx_LocalBuf_ND __pyx_pybuffernd_rhs_vec; __Pyx_Buffer __pyx_pybuffer_rhs_vec; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SCIP *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_t_17; int __pyx_t_18; int __pyx_t_19; int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConsVals", 0); __pyx_pybuffer_rhs_vec.pybuffer.buf = NULL; __pyx_pybuffer_rhs_vec.refcount = 0; __pyx_pybuffernd_rhs_vec.data = NULL; __pyx_pybuffernd_rhs_vec.rcbuffer = &__pyx_pybuffer_rhs_vec; __pyx_pybuffer_lhs_vec.pybuffer.buf = NULL; __pyx_pybuffer_lhs_vec.refcount = 0; __pyx_pybuffernd_lhs_vec.data = NULL; __pyx_pybuffernd_lhs_vec.rcbuffer = &__pyx_pybuffer_lhs_vec; __pyx_pybuffer_cons_matrix.pybuffer.buf = NULL; __pyx_pybuffer_cons_matrix.refcount = 0; __pyx_pybuffernd_cons_matrix.data = NULL; __pyx_pybuffernd_cons_matrix.rcbuffer = &__pyx_pybuffer_cons_matrix; /* "pyscipopt/scip.pyx":5796 * * def getConsVals(self): * cdef SCIP* scip = self._scip # <<<<<<<<<<<<<< * cdef SCIP_CONS** conss = SCIPgetConss(scip) * cdef int ncons = SCIPgetNConss(scip) */ __pyx_t_1 = __pyx_v_self->_scip; __pyx_v_scip = __pyx_t_1; /* "pyscipopt/scip.pyx":5797 * def getConsVals(self): * cdef SCIP* scip = self._scip * cdef SCIP_CONS** conss = SCIPgetConss(scip) # <<<<<<<<<<<<<< * cdef int ncons = SCIPgetNConss(scip) * # SCIPgetOrigVars */ __pyx_v_conss = SCIPgetConss(__pyx_v_scip); /* "pyscipopt/scip.pyx":5798 * cdef SCIP* scip = self._scip * cdef SCIP_CONS** conss = SCIPgetConss(scip) * cdef int ncons = SCIPgetNConss(scip) # <<<<<<<<<<<<<< * # SCIPgetOrigVars * cdef int nvars = SCIPgetNOrigVars(scip) */ __pyx_v_ncons = SCIPgetNConss(__pyx_v_scip); /* "pyscipopt/scip.pyx":5800 * cdef int ncons = SCIPgetNConss(scip) * # SCIPgetOrigVars * cdef int nvars = SCIPgetNOrigVars(scip) # <<<<<<<<<<<<<< * * cdef np.ndarray[np.float32_t, ndim=1] rhs_vec */ __pyx_v_nvars = SCIPgetNOrigVars(__pyx_v_scip); /* "pyscipopt/scip.pyx":5806 * cdef np.ndarray[np.float32_t, ndim=2] cons_matrix * * lhs_vec = np.empty(shape=(ncons, ), dtype=np.float32) # <<<<<<<<<<<<<< * rhs_vec = np.empty(shape=(ncons, ), dtype=np.float32) * cons_matrix = np.zeros(shape=(ncons, nvars), dtype=np.float32) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ncons); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5806, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_lhs_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_lhs_vec.diminfo[0].strides = __pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lhs_vec.diminfo[0].shape = __pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 5806, __pyx_L1_error) } __pyx_t_6 = 0; __pyx_v_lhs_vec = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pyscipopt/scip.pyx":5807 * * lhs_vec = np.empty(shape=(ncons, ), dtype=np.float32) * rhs_vec = np.empty(shape=(ncons, ), dtype=np.float32) # <<<<<<<<<<<<<< * cons_matrix = np.zeros(shape=(ncons, nvars), dtype=np.float32) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ncons); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5807, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_rhs_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_rhs_vec.diminfo[0].strides = __pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rhs_vec.diminfo[0].shape = __pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 5807, __pyx_L1_error) } __pyx_t_11 = 0; __pyx_v_rhs_vec = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pyscipopt/scip.pyx":5808 * lhs_vec = np.empty(shape=(ncons, ), dtype=np.float32) * rhs_vec = np.empty(shape=(ncons, ), dtype=np.float32) * cons_matrix = np.zeros(shape=(ncons, nvars), dtype=np.float32) # <<<<<<<<<<<<<< * * cdef SCIP_VAR** vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ncons); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nvars); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_12) < 0) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(3, 5808, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer, (PyObject*)__pyx_v_cons_matrix, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_cons_matrix.diminfo[0].strides = __pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cons_matrix.diminfo[0].shape = __pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cons_matrix.diminfo[1].strides = __pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cons_matrix.diminfo[1].shape = __pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 5808, __pyx_L1_error) } __pyx_t_13 = 0; __pyx_v_cons_matrix = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5810 * cons_matrix = np.zeros(shape=(ncons, nvars), dtype=np.float32) * * cdef SCIP_VAR** vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) # <<<<<<<<<<<<<< * cdef SCIP_Real* vals = <SCIP_Real*> malloc(nvars * sizeof(SCIP_Real)) * cdef int nconsvars = 0 */ __pyx_v_vars = ((SCIP_VAR **)malloc((__pyx_v_nvars * (sizeof(SCIP_VAR *))))); /* "pyscipopt/scip.pyx":5811 * * cdef SCIP_VAR** vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) * cdef SCIP_Real* vals = <SCIP_Real*> malloc(nvars * sizeof(SCIP_Real)) # <<<<<<<<<<<<<< * cdef int nconsvars = 0 * cdef SCIP_Bool success = 0 */ __pyx_v_vals = ((SCIP_Real *)malloc((__pyx_v_nvars * (sizeof(SCIP_Real))))); /* "pyscipopt/scip.pyx":5812 * cdef SCIP_VAR** vars = <SCIP_VAR**> malloc(nvars * sizeof(SCIP_VAR*)) * cdef SCIP_Real* vals = <SCIP_Real*> malloc(nvars * sizeof(SCIP_Real)) * cdef int nconsvars = 0 # <<<<<<<<<<<<<< * cdef SCIP_Bool success = 0 * cdef int var_idx = 0 */ __pyx_v_nconsvars = 0; /* "pyscipopt/scip.pyx":5813 * cdef SCIP_Real* vals = <SCIP_Real*> malloc(nvars * sizeof(SCIP_Real)) * cdef int nconsvars = 0 * cdef SCIP_Bool success = 0 # <<<<<<<<<<<<<< * cdef int var_idx = 0 * for i in range(ncons): */ __pyx_v_success = 0; /* "pyscipopt/scip.pyx":5814 * cdef int nconsvars = 0 * cdef SCIP_Bool success = 0 * cdef int var_idx = 0 # <<<<<<<<<<<<<< * for i in range(ncons): * */ __pyx_v_var_idx = 0; /* "pyscipopt/scip.pyx":5815 * cdef SCIP_Bool success = 0 * cdef int var_idx = 0 * for i in range(ncons): # <<<<<<<<<<<<<< * * # fill up rhs vector */ __pyx_t_7 = __pyx_v_ncons; __pyx_t_14 = __pyx_t_7; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pyscipopt/scip.pyx":5818 * * # fill up rhs vector * rhs_vec[i] = SCIPconsGetRhs(scip, conss[i], &success) # <<<<<<<<<<<<<< * lhs_vec[i] = SCIPconsGetLhs(scip, conss[i], &success) * */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_rhs_vec.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_rhs_vec.diminfo[0].shape)) __pyx_t_17 = 0; if (unlikely(__pyx_t_17 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_17); __PYX_ERR(3, 5818, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_rhs_vec.diminfo[0].strides) = SCIPconsGetRhs(__pyx_v_scip, (__pyx_v_conss[__pyx_v_i]), (&__pyx_v_success)); /* "pyscipopt/scip.pyx":5819 * # fill up rhs vector * rhs_vec[i] = SCIPconsGetRhs(scip, conss[i], &success) * lhs_vec[i] = SCIPconsGetLhs(scip, conss[i], &success) # <<<<<<<<<<<<<< * * # fill up cons matrix */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_lhs_vec.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_lhs_vec.diminfo[0].shape)) __pyx_t_17 = 0; if (unlikely(__pyx_t_17 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_17); __PYX_ERR(3, 5819, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_lhs_vec.diminfo[0].strides) = SCIPconsGetLhs(__pyx_v_scip, (__pyx_v_conss[__pyx_v_i]), (&__pyx_v_success)); /* "pyscipopt/scip.pyx":5822 * * # fill up cons matrix * SCIPgetConsNVars(scip, conss[i], &nconsvars, &success) # <<<<<<<<<<<<<< * SCIPgetConsVars(scip, conss[i], vars, nconsvars, &success) * SCIPgetConsVals(scip, conss[i], vals, nconsvars, &success) */ (void)(SCIPgetConsNVars(__pyx_v_scip, (__pyx_v_conss[__pyx_v_i]), (&__pyx_v_nconsvars), (&__pyx_v_success))); /* "pyscipopt/scip.pyx":5823 * # fill up cons matrix * SCIPgetConsNVars(scip, conss[i], &nconsvars, &success) * SCIPgetConsVars(scip, conss[i], vars, nconsvars, &success) # <<<<<<<<<<<<<< * SCIPgetConsVals(scip, conss[i], vals, nconsvars, &success) * */ (void)(SCIPgetConsVars(__pyx_v_scip, (__pyx_v_conss[__pyx_v_i]), __pyx_v_vars, __pyx_v_nconsvars, (&__pyx_v_success))); /* "pyscipopt/scip.pyx":5824 * SCIPgetConsNVars(scip, conss[i], &nconsvars, &success) * SCIPgetConsVars(scip, conss[i], vars, nconsvars, &success) * SCIPgetConsVals(scip, conss[i], vals, nconsvars, &success) # <<<<<<<<<<<<<< * * for j in range(nconsvars): */ (void)(SCIPgetConsVals(__pyx_v_scip, (__pyx_v_conss[__pyx_v_i]), __pyx_v_vals, __pyx_v_nconsvars, (&__pyx_v_success))); /* "pyscipopt/scip.pyx":5826 * SCIPgetConsVals(scip, conss[i], vals, nconsvars, &success) * * for j in range(nconsvars): # <<<<<<<<<<<<<< * varname = bytes(SCIPvarGetName(vars[j])).decode('utf-8') * var_idx = int(varname[1:]) - 1 */ __pyx_t_17 = __pyx_v_nconsvars; __pyx_t_18 = __pyx_t_17; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pyscipopt/scip.pyx":5827 * * for j in range(nconsvars): * varname = bytes(SCIPvarGetName(vars[j])).decode('utf-8') # <<<<<<<<<<<<<< * var_idx = int(varname[1:]) - 1 * # printf("%d\n", var_idx) */ __pyx_t_5 = __Pyx_PyBytes_FromString(SCIPvarGetName((__pyx_v_vars[__pyx_v_j]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_5); __pyx_t_5 = 0; /* "pyscipopt/scip.pyx":5828 * for j in range(nconsvars): * varname = bytes(SCIPvarGetName(vars[j])).decode('utf-8') * var_idx = int(varname[1:]) - 1 # <<<<<<<<<<<<<< * # printf("%d\n", var_idx) * cons_matrix[i][var_idx] = vals[j] */ __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_varname, 1, 0, NULL, NULL, &__pyx_slice__83, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5828, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_var_idx = __pyx_t_20; /* "pyscipopt/scip.pyx":5830 * var_idx = int(varname[1:]) - 1 * # printf("%d\n", var_idx) * cons_matrix[i][var_idx] = vals[j] # <<<<<<<<<<<<<< * * free(<void *>vals) */ __pyx_t_5 = PyFloat_FromDouble((__pyx_v_vals[__pyx_v_j])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cons_matrix), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_SetItemInt(__pyx_t_3, __pyx_v_var_idx, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(3, 5830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } /* "pyscipopt/scip.pyx":5832 * cons_matrix[i][var_idx] = vals[j] * * free(<void *>vals) # <<<<<<<<<<<<<< * free(<void *>vars) * return { */ free(((void *)__pyx_v_vals)); /* "pyscipopt/scip.pyx":5833 * * free(<void *>vals) * free(<void *>vars) # <<<<<<<<<<<<<< * return { * "cons_matrix": cons_matrix, */ free(((void *)__pyx_v_vars)); /* "pyscipopt/scip.pyx":5834 * free(<void *>vals) * free(<void *>vars) * return { # <<<<<<<<<<<<<< * "cons_matrix": cons_matrix, * "rhs_vec": rhs_vec, */ __Pyx_XDECREF(__pyx_r); /* "pyscipopt/scip.pyx":5835 * free(<void *>vars) * return { * "cons_matrix": cons_matrix, # <<<<<<<<<<<<<< * "rhs_vec": rhs_vec, * "lhs_vec": lhs_vec */ __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_cons_matrix, ((PyObject *)__pyx_v_cons_matrix)) < 0) __PYX_ERR(3, 5835, __pyx_L1_error) /* "pyscipopt/scip.pyx":5836 * return { * "cons_matrix": cons_matrix, * "rhs_vec": rhs_vec, # <<<<<<<<<<<<<< * "lhs_vec": lhs_vec * } */ if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_rhs_vec, ((PyObject *)__pyx_v_rhs_vec)) < 0) __PYX_ERR(3, 5835, __pyx_L1_error) /* "pyscipopt/scip.pyx":5837 * "cons_matrix": cons_matrix, * "rhs_vec": rhs_vec, * "lhs_vec": lhs_vec # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_lhs_vec, ((PyObject *)__pyx_v_lhs_vec)) < 0) __PYX_ERR(3, 5835, __pyx_L1_error) __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":5795 * return result * * def getConsVals(self): # <<<<<<<<<<<<<< * cdef SCIP* scip = self._scip * cdef SCIP_CONS** conss = SCIPgetConss(scip) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pyscipopt.scip.Model.getConsVals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cons_matrix.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lhs_vec.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rhs_vec.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_rhs_vec); __Pyx_XDECREF((PyObject *)__pyx_v_lhs_vec); __Pyx_XDECREF((PyObject *)__pyx_v_cons_matrix); __Pyx_XDECREF(__pyx_v_varname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":671 * cdef Solution _bestSol * # can be used to store problem data * cdef public object data # <<<<<<<<<<<<<< * # make Model weak referentiable * cdef object __weakref__ */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_4data_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_4data___get__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_4data___get__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->data); __pyx_r = __pyx_v_self->data; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Model_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Model_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_4data_2__set__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Model_4data_2__set__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9pyscipopt_4scip_5Model_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9pyscipopt_4scip_5Model_4data_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_4data_4__del__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9pyscipopt_4scip_5Model_4data_4__del__(struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->data); __Pyx_DECREF(__pyx_v_self->data); __pyx_v_self->data = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_519__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_519__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_518__reduce_cython__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_518__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_521__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_9pyscipopt_4scip_5Model_521__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_5Model_520__setstate_cython__(((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_5Model_520__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pyscipopt_4scip_Model *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.Model.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":5841 * * # debugging memory management * def is_memory_freed(): # <<<<<<<<<<<<<< * return BMSgetMemoryUsed() == 0 * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_25is_memory_freed(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_25is_memory_freed = {"is_memory_freed", (PyCFunction)__pyx_pw_9pyscipopt_4scip_25is_memory_freed, METH_NOARGS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_25is_memory_freed(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_memory_freed (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_24is_memory_freed(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_24is_memory_freed(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_memory_freed", 0); /* "pyscipopt/scip.pyx":5842 * # debugging memory management * def is_memory_freed(): * return BMSgetMemoryUsed() == 0 # <<<<<<<<<<<<<< * * def print_memory_in_use(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((BMSgetMemoryUsed() == 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pyscipopt/scip.pyx":5841 * * # debugging memory management * def is_memory_freed(): # <<<<<<<<<<<<<< * return BMSgetMemoryUsed() == 0 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pyscipopt.scip.is_memory_freed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pyscipopt/scip.pyx":5844 * return BMSgetMemoryUsed() == 0 * * def print_memory_in_use(): # <<<<<<<<<<<<<< * BMScheckEmptyMemory() * */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_27print_memory_in_use(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_27print_memory_in_use = {"print_memory_in_use", (PyCFunction)__pyx_pw_9pyscipopt_4scip_27print_memory_in_use, METH_NOARGS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_27print_memory_in_use(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("print_memory_in_use (wrapper)", 0); __pyx_r = __pyx_pf_9pyscipopt_4scip_26print_memory_in_use(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_26print_memory_in_use(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("print_memory_in_use", 0); /* "pyscipopt/scip.pyx":5845 * * def print_memory_in_use(): * BMScheckEmptyMemory() # <<<<<<<<<<<<<< * * */ BMScheckEmptyMemory(); /* "pyscipopt/scip.pyx":5844 * return BMSgetMemoryUsed() == 0 * * def print_memory_in_use(): # <<<<<<<<<<<<<< * BMScheckEmptyMemory() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Expr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_29__pyx_unpickle_Expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_29__pyx_unpickle_Expr = {"__pyx_unpickle_Expr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_29__pyx_unpickle_Expr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_29__pyx_unpickle_Expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Expr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Expr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Expr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Expr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Expr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Expr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_28__pyx_unpickle_Expr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_28__pyx_unpickle_Expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Expr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x6f493bf: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f493bf) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x6f493bf: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) * __pyx_result = Expr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x6f493bf: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Expr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x6f493bf: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) * __pyx_result = Expr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Expr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) * __pyx_result = Expr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Expr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Expr__set_state(((struct __pyx_obj_9pyscipopt_4scip_Expr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f493bf = (terms))" % __pyx_checksum) * __pyx_result = Expr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): * __pyx_result.terms = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Expr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Expr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.terms = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Expr__set_state(struct __pyx_obj_9pyscipopt_4scip_Expr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Expr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): * __pyx_result.terms = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->terms); __Pyx_DECREF(__pyx_v___pyx_result->terms); __pyx_v___pyx_result->terms = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): * __pyx_result.terms = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 1) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.terms = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): * __pyx_result.terms = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.terms = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Expr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_ExprCons(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_31__pyx_unpickle_ExprCons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_31__pyx_unpickle_ExprCons = {"__pyx_unpickle_ExprCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_31__pyx_unpickle_ExprCons, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_31__pyx_unpickle_ExprCons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_ExprCons (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExprCons", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExprCons", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ExprCons") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExprCons", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_ExprCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_30__pyx_unpickle_ExprCons(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_30__pyx_unpickle_ExprCons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_ExprCons", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x8f4795b: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8f4795b) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x8f4795b: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) * __pyx_result = ExprCons.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x8f4795b: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = ExprCons.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x8f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x8f4795b: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) * __pyx_result = ExprCons.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ExprCons), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) * __pyx_result = ExprCons.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = ExprCons.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_ExprCons__set_state(((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8f4795b = (_lhs, _rhs, expr))" % __pyx_checksum) * __pyx_result = ExprCons.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_ExprCons(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_ExprCons", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_ExprCons__set_state(struct __pyx_obj_9pyscipopt_4scip_ExprCons *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_ExprCons__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] # <<<<<<<<<<<<<< * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_lhs); __Pyx_DECREF(__pyx_v___pyx_result->_lhs); __pyx_v___pyx_result->_lhs = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_rhs); __Pyx_DECREF(__pyx_v___pyx_result->_rhs); __pyx_v___pyx_result->_rhs = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->expr); __Pyx_DECREF(__pyx_v___pyx_result->expr); __pyx_v___pyx_result->expr = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 3) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ } /* "(tree fragment)":11 * __pyx_unpickle_ExprCons__set_state(<ExprCons> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ExprCons__set_state(ExprCons __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._lhs = __pyx_state[0]; __pyx_result._rhs = __pyx_state[1]; __pyx_result.expr = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_ExprCons__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_GenExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_33__pyx_unpickle_GenExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_33__pyx_unpickle_GenExpr = {"__pyx_unpickle_GenExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_33__pyx_unpickle_GenExpr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_33__pyx_unpickle_GenExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_GenExpr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenExpr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenExpr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_GenExpr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenExpr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_GenExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_32__pyx_unpickle_GenExpr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_32__pyx_unpickle_GenExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_GenExpr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xbaa8c6e: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbaa8c6e) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xbaa8c6e: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = GenExpr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xbaa8c6e: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = GenExpr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xba, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xbaa8c6e: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = GenExpr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_GenExpr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = GenExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = GenExpr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_GenExpr__set_state(((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = GenExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_GenExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_GenExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_GenExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_GenExpr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_GenExpr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] # <<<<<<<<<<<<<< * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_op); __Pyx_DECREF(__pyx_v___pyx_result->_op); __pyx_v___pyx_result->_op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->children); __Pyx_DECREF(__pyx_v___pyx_result->children); __pyx_v___pyx_result->children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->operatorIndex); __pyx_v___pyx_result->operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 3) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ } /* "(tree fragment)":11 * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_GenExpr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_SumExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_35__pyx_unpickle_SumExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_35__pyx_unpickle_SumExpr = {"__pyx_unpickle_SumExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_35__pyx_unpickle_SumExpr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_35__pyx_unpickle_SumExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_SumExpr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumExpr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumExpr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SumExpr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumExpr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_SumExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_34__pyx_unpickle_SumExpr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_34__pyx_unpickle_SumExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_SumExpr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x8819c6a: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8819c6a) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x8819c6a: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = SumExpr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x8819c6a: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = SumExpr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x88, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x8819c6a: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = SumExpr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_SumExpr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = SumExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = SumExpr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_SumExpr__set_state(((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8819c6a = (_op, children, coefs, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = SumExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_SumExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_SumExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_SumExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_SumExpr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_SumExpr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] # <<<<<<<<<<<<<< * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._op); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._op); __pyx_v___pyx_result->__pyx_base._op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.children); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.children); __pyx_v___pyx_result->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->coefs); __Pyx_DECREF(__pyx_v___pyx_result->coefs); __pyx_v___pyx_result->coefs = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->constant); __Pyx_DECREF(__pyx_v___pyx_result->constant); __pyx_v___pyx_result->constant = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __pyx_v___pyx_result->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[5]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 5) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[5]) */ } /* "(tree fragment)":11 * __pyx_unpickle_SumExpr__set_state(<SumExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SumExpr__set_state(SumExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.coefs = __pyx_state[2]; __pyx_result.constant = __pyx_state[3]; __pyx_result.operatorIndex = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_SumExpr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_ProdExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_37__pyx_unpickle_ProdExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_37__pyx_unpickle_ProdExpr = {"__pyx_unpickle_ProdExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_37__pyx_unpickle_ProdExpr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_37__pyx_unpickle_ProdExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_ProdExpr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ProdExpr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ProdExpr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ProdExpr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ProdExpr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_ProdExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_36__pyx_unpickle_ProdExpr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_36__pyx_unpickle_ProdExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_ProdExpr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x9b4da82: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x9b4da82) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x9b4da82: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = ProdExpr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x9b4da82: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = ProdExpr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x9b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x9b4da82: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = ProdExpr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_ProdExpr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = ProdExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = ProdExpr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_ProdExpr__set_state(((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9b4da82 = (_op, children, constant, operatorIndex))" % __pyx_checksum) * __pyx_result = ProdExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_ProdExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_ProdExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_ProdExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_ProdExpr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_ProdExpr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] # <<<<<<<<<<<<<< * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._op); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._op); __pyx_v___pyx_result->__pyx_base._op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.children); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.children); __pyx_v___pyx_result->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->constant); __Pyx_DECREF(__pyx_v___pyx_result->constant); __pyx_v___pyx_result->constant = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __pyx_v___pyx_result->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ } /* "(tree fragment)":11 * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_ProdExpr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_VarExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_39__pyx_unpickle_VarExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_39__pyx_unpickle_VarExpr = {"__pyx_unpickle_VarExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_39__pyx_unpickle_VarExpr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_39__pyx_unpickle_VarExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_VarExpr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarExpr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarExpr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_VarExpr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarExpr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_VarExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_38__pyx_unpickle_VarExpr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_38__pyx_unpickle_VarExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_VarExpr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xa0ceb6e: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa0ceb6e) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xa0ceb6e: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) * __pyx_result = VarExpr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xa0ceb6e: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = VarExpr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xa0ceb6e: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) * __pyx_result = VarExpr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_VarExpr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) * __pyx_result = VarExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = VarExpr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_VarExpr__set_state(((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0ceb6e = (_op, children, operatorIndex, var))" % __pyx_checksum) * __pyx_result = VarExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_VarExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_VarExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_VarExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_VarExpr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_VarExpr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] # <<<<<<<<<<<<<< * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._op); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._op); __pyx_v___pyx_result->__pyx_base._op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.children); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.children); __pyx_v___pyx_result->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __pyx_v___pyx_result->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->var); __Pyx_DECREF(__pyx_v___pyx_result->var); __pyx_v___pyx_result->var = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ } /* "(tree fragment)":11 * __pyx_unpickle_VarExpr__set_state(<VarExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_VarExpr__set_state(VarExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2]; __pyx_result.var = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_VarExpr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PowExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_41__pyx_unpickle_PowExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_41__pyx_unpickle_PowExpr = {"__pyx_unpickle_PowExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_41__pyx_unpickle_PowExpr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_41__pyx_unpickle_PowExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PowExpr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PowExpr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PowExpr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PowExpr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PowExpr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PowExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_40__pyx_unpickle_PowExpr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_40__pyx_unpickle_PowExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PowExpr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xb3bb9c2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb3bb9c2) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xb3bb9c2: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) * __pyx_result = PowExpr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xb3bb9c2: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PowExpr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xb3bb9c2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) * __pyx_result = PowExpr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PowExpr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) * __pyx_result = PowExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PowExpr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PowExpr__set_state(((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb3bb9c2 = (_op, children, expo, operatorIndex))" % __pyx_checksum) * __pyx_result = PowExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PowExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PowExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PowExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_PowExpr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PowExpr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] # <<<<<<<<<<<<<< * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._op); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._op); __pyx_v___pyx_result->__pyx_base._op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.children); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.children); __pyx_v___pyx_result->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->expo); __Pyx_DECREF(__pyx_v___pyx_result->expo); __pyx_v___pyx_result->expo = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __pyx_v___pyx_result->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PowExpr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_UnaryExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_43__pyx_unpickle_UnaryExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_43__pyx_unpickle_UnaryExpr = {"__pyx_unpickle_UnaryExpr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_43__pyx_unpickle_UnaryExpr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_43__pyx_unpickle_UnaryExpr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_UnaryExpr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnaryExpr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnaryExpr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_UnaryExpr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnaryExpr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_UnaryExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_42__pyx_unpickle_UnaryExpr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_42__pyx_unpickle_UnaryExpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_UnaryExpr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xbaa8c6e: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbaa8c6e) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xbaa8c6e: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = UnaryExpr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xbaa8c6e: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = UnaryExpr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xba, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xbaa8c6e: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = UnaryExpr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_UnaryExpr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = UnaryExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = UnaryExpr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_UnaryExpr__set_state(((struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbaa8c6e = (_op, children, operatorIndex))" % __pyx_checksum) * __pyx_result = UnaryExpr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_UnaryExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_UnaryExpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_UnaryExpr__set_state(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_UnaryExpr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] # <<<<<<<<<<<<<< * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._op); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._op); __pyx_v___pyx_result->__pyx_base._op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.children); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.children); __pyx_v___pyx_result->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __pyx_v___pyx_result->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 3) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ } /* "(tree fragment)":11 * __pyx_unpickle_UnaryExpr__set_state(<UnaryExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_UnaryExpr__set_state(UnaryExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_UnaryExpr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Constant(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_45__pyx_unpickle_Constant(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_45__pyx_unpickle_Constant = {"__pyx_unpickle_Constant", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_45__pyx_unpickle_Constant, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_45__pyx_unpickle_Constant(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Constant (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Constant", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Constant", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Constant") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Constant", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Constant", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_44__pyx_unpickle_Constant(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_44__pyx_unpickle_Constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Constant", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xfeb2b21: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xfeb2b21) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xfeb2b21: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) * __pyx_result = Constant.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xfeb2b21: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Constant.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xfe, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xfeb2b21: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) * __pyx_result = Constant.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Constant), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) * __pyx_result = Constant.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Constant.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Constant__set_state(((struct __pyx_obj_9pyscipopt_4scip_Constant *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfeb2b21 = (_op, children, number, operatorIndex))" % __pyx_checksum) * __pyx_result = Constant.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Constant(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Constant", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Constant__set_state(struct __pyx_obj_9pyscipopt_4scip_Constant *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Constant__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] # <<<<<<<<<<<<<< * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._op); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._op); __pyx_v___pyx_result->__pyx_base._op = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.children); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.children); __pyx_v___pyx_result->__pyx_base.children = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->number); __Pyx_DECREF(__pyx_v___pyx_result->number); __pyx_v___pyx_result->number = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operatorIndex); __pyx_v___pyx_result->__pyx_base.operatorIndex = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Constant__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Benders(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_47__pyx_unpickle_Benders(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_47__pyx_unpickle_Benders = {"__pyx_unpickle_Benders", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_47__pyx_unpickle_Benders, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_47__pyx_unpickle_Benders(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Benders (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Benders", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Benders", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Benders") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Benders", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Benders", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_46__pyx_unpickle_Benders(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_46__pyx_unpickle_Benders(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Benders", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xecd383d) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Benders.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Benders.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Benders.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Benders), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Benders.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Benders.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Benders__set_state(((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Benders.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Benders(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Benders", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Benders__set_state(struct __pyx_obj_9pyscipopt_4scip_Benders *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Benders__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<< * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Benders__set_state(<Benders> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Benders__set_state(Benders __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Benders__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Benderscut(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_49__pyx_unpickle_Benderscut(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_49__pyx_unpickle_Benderscut = {"__pyx_unpickle_Benderscut", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_49__pyx_unpickle_Benderscut, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_49__pyx_unpickle_Benderscut(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Benderscut (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Benderscut", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Benderscut", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Benderscut") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Benderscut", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Benderscut", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_48__pyx_unpickle_Benderscut(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_48__pyx_unpickle_Benderscut(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Benderscut", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xfef88e0: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xfef88e0) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xfef88e0: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) * __pyx_result = Benderscut.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xfef88e0: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Benderscut.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xfe_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xfef88e0: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) * __pyx_result = Benderscut.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Benderscut), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) * __pyx_result = Benderscut.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Benderscut.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Benderscut__set_state(((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfef88e0 = (benders, model, name))" % __pyx_checksum) * __pyx_result = Benderscut.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Benderscut(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Benderscut", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Benderscut__set_state(struct __pyx_obj_9pyscipopt_4scip_Benderscut *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Benderscut__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] # <<<<<<<<<<<<<< * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Benders))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->benders); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->benders)); __pyx_v___pyx_result->benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 3) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[3]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Benderscut__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Branchrule(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_51__pyx_unpickle_Branchrule(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_51__pyx_unpickle_Branchrule = {"__pyx_unpickle_Branchrule", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_51__pyx_unpickle_Branchrule, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_51__pyx_unpickle_Branchrule(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Branchrule (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Branchrule", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Branchrule", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Branchrule") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Branchrule", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Branchrule", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_50__pyx_unpickle_Branchrule(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_50__pyx_unpickle_Branchrule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Branchrule", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20f35e6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Branchrule.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Branchrule.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Branchrule.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Branchrule), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Branchrule.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Branchrule.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Branchrule__set_state(((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Branchrule.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Branchrule(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Branchrule", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Branchrule__set_state(struct __pyx_obj_9pyscipopt_4scip_Branchrule *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Branchrule__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 1) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Branchrule__set_state(<Branchrule> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Branchrule__set_state(Branchrule __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Branchrule__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Conshdlr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_53__pyx_unpickle_Conshdlr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_53__pyx_unpickle_Conshdlr = {"__pyx_unpickle_Conshdlr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_53__pyx_unpickle_Conshdlr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_53__pyx_unpickle_Conshdlr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Conshdlr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Conshdlr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Conshdlr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Conshdlr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Conshdlr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Conshdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_52__pyx_unpickle_Conshdlr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_52__pyx_unpickle_Conshdlr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Conshdlr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xecd383d) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Conshdlr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Conshdlr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Conshdlr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Conshdlr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Conshdlr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Conshdlr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Conshdlr__set_state(((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Conshdlr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Conshdlr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Conshdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Conshdlr__set_state(struct __pyx_obj_9pyscipopt_4scip_Conshdlr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Conshdlr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<< * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Conshdlr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Eventhdlr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_55__pyx_unpickle_Eventhdlr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_55__pyx_unpickle_Eventhdlr = {"__pyx_unpickle_Eventhdlr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_55__pyx_unpickle_Eventhdlr, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_55__pyx_unpickle_Eventhdlr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Eventhdlr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Eventhdlr", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Eventhdlr", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Eventhdlr") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Eventhdlr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Eventhdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_54__pyx_unpickle_Eventhdlr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_54__pyx_unpickle_Eventhdlr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Eventhdlr", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xecd383d) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Eventhdlr.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Eventhdlr.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Eventhdlr.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Eventhdlr), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Eventhdlr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Eventhdlr.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Eventhdlr__set_state(((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Eventhdlr.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Eventhdlr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Eventhdlr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Eventhdlr__set_state(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Eventhdlr__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<< * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Eventhdlr__set_state(<Eventhdlr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Eventhdlr__set_state(Eventhdlr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Eventhdlr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Heur(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_57__pyx_unpickle_Heur(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_57__pyx_unpickle_Heur = {"__pyx_unpickle_Heur", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_57__pyx_unpickle_Heur, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_57__pyx_unpickle_Heur(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Heur (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Heur", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Heur", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Heur") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Heur", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Heur", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_56__pyx_unpickle_Heur(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_56__pyx_unpickle_Heur(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Heur", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xecd383d) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Heur.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Heur.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Heur.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Heur), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Heur.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Heur.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Heur__set_state(((struct __pyx_obj_9pyscipopt_4scip_Heur *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Heur.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Heur(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Heur", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Heur__set_state(struct __pyx_obj_9pyscipopt_4scip_Heur *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Heur__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<< * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Heur__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Presol(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_59__pyx_unpickle_Presol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_59__pyx_unpickle_Presol = {"__pyx_unpickle_Presol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_59__pyx_unpickle_Presol, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_59__pyx_unpickle_Presol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Presol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Presol", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Presol", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Presol") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Presol", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Presol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_58__pyx_unpickle_Presol(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_58__pyx_unpickle_Presol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Presol", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20f35e6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Presol.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Presol.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Presol.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Presol), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Presol.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Presol.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Presol__set_state(((struct __pyx_obj_9pyscipopt_4scip_Presol *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Presol.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Presol(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Presol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Presol__set_state(struct __pyx_obj_9pyscipopt_4scip_Presol *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Presol__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 1) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Presol__set_state(<Presol> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Presol__set_state(Presol __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Presol__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Pricer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_61__pyx_unpickle_Pricer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_61__pyx_unpickle_Pricer = {"__pyx_unpickle_Pricer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_61__pyx_unpickle_Pricer, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_61__pyx_unpickle_Pricer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Pricer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Pricer", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Pricer", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Pricer") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Pricer", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Pricer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_60__pyx_unpickle_Pricer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_60__pyx_unpickle_Pricer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Pricer", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20f35e6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Pricer.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Pricer.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Pricer.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Pricer), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Pricer.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Pricer.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Pricer__set_state(((struct __pyx_obj_9pyscipopt_4scip_Pricer *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Pricer.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Pricer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Pricer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Pricer__set_state(struct __pyx_obj_9pyscipopt_4scip_Pricer *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Pricer__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 1) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Pricer__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Prop(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_63__pyx_unpickle_Prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_63__pyx_unpickle_Prop = {"__pyx_unpickle_Prop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_63__pyx_unpickle_Prop, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_63__pyx_unpickle_Prop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Prop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Prop", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Prop", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Prop") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Prop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Prop", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_62__pyx_unpickle_Prop(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_62__pyx_unpickle_Prop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Prop", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20f35e6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Prop.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Prop.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Prop.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Prop), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Prop.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Prop.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Prop__set_state(((struct __pyx_obj_9pyscipopt_4scip_Prop *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Prop.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Prop(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Prop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Prop__set_state(struct __pyx_obj_9pyscipopt_4scip_Prop *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Prop__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 1) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Prop__set_state(<Prop> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Prop__set_state(Prop __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Prop__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Sepa(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_65__pyx_unpickle_Sepa(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_65__pyx_unpickle_Sepa = {"__pyx_unpickle_Sepa", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_65__pyx_unpickle_Sepa, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_65__pyx_unpickle_Sepa(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Sepa (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Sepa", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Sepa", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Sepa") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Sepa", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Sepa", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_64__pyx_unpickle_Sepa(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_64__pyx_unpickle_Sepa(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Sepa", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xecd383d) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Sepa.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Sepa.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Sepa.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Sepa), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Sepa.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Sepa.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Sepa__set_state(((struct __pyx_obj_9pyscipopt_4scip_Sepa *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Sepa.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Sepa(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Sepa", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Sepa__set_state(struct __pyx_obj_9pyscipopt_4scip_Sepa *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Sepa__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<< * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Sepa__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Relax(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_67__pyx_unpickle_Relax(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_67__pyx_unpickle_Relax = {"__pyx_unpickle_Relax", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_67__pyx_unpickle_Relax, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_67__pyx_unpickle_Relax(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Relax (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Relax", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Relax", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Relax") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Relax", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Relax", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_66__pyx_unpickle_Relax(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_66__pyx_unpickle_Relax(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Relax", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xecd383d) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Relax.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xecd383d: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Relax.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xecd383d: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Relax.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Relax), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Relax.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Relax.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Relax__set_state(((struct __pyx_obj_9pyscipopt_4scip_Relax *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xecd383d = (model, name))" % __pyx_checksum) * __pyx_result = Relax.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Relax(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Relax", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Relax__set_state(struct __pyx_obj_9pyscipopt_4scip_Relax *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Relax__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<< * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Relax__set_state(<Relax> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Relax__set_state(Relax __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Relax__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_Nodesel(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_69__pyx_unpickle_Nodesel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_69__pyx_unpickle_Nodesel = {"__pyx_unpickle_Nodesel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_69__pyx_unpickle_Nodesel, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_69__pyx_unpickle_Nodesel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Nodesel (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Nodesel", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Nodesel", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Nodesel") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Nodesel", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Nodesel", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_68__pyx_unpickle_Nodesel(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_68__pyx_unpickle_Nodesel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Nodesel", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20f35e6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Nodesel.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0x20f35e6: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Nodesel.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0x20f35e6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Nodesel.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_Nodesel), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Nodesel.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = Nodesel.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_Nodesel__set_state(((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x20f35e6 = (model))" % __pyx_checksum) * __pyx_result = Nodesel.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Nodesel(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Nodesel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_Nodesel__set_state(struct __pyx_obj_9pyscipopt_4scip_Nodesel *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Nodesel__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pyscipopt_4scip_Model))))) __PYX_ERR(4, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->model); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->model)); __pyx_v___pyx_result->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 1) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 14, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_Nodesel__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_RESULT(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_73__pyx_unpickle_PY_SCIP_RESULT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_73__pyx_unpickle_PY_SCIP_RESULT = {"__pyx_unpickle_PY_SCIP_RESULT", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_73__pyx_unpickle_PY_SCIP_RESULT, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_73__pyx_unpickle_PY_SCIP_RESULT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_RESULT (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_RESULT", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_RESULT", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_RESULT") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_RESULT", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_RESULT", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_72__pyx_unpickle_PY_SCIP_RESULT(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_72__pyx_unpickle_PY_SCIP_RESULT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_RESULT", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_RESULT.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_RESULT.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_RESULT.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_RESULT.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_RESULT.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_RESULT__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_RESULT.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_RESULT(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_RESULT", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_RESULT__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_RESULT__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_RESULT__set_state(<PY_SCIP_RESULT> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_RESULT__set_state(PY_SCIP_RESULT __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_RESULT__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PARAMSETTING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_75__pyx_unpickle_PY_SCIP_PARAMSETTING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_75__pyx_unpickle_PY_SCIP_PARAMSETTING = {"__pyx_unpickle_PY_SCIP_PARAMSETTING", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_75__pyx_unpickle_PY_SCIP_PARAMSETTING, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_75__pyx_unpickle_PY_SCIP_PARAMSETTING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PARAMSETTING (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PARAMSETTING", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PARAMSETTING", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_PARAMSETTING") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PARAMSETTING", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PARAMSETTING", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_74__pyx_unpickle_PY_SCIP_PARAMSETTING(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_74__pyx_unpickle_PY_SCIP_PARAMSETTING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PARAMSETTING", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMSETTING.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_PARAMSETTING.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMSETTING.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMSETTING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_PARAMSETTING.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMSETTING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PARAMSETTING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PARAMSETTING", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PARAMSETTING__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PARAMSETTING__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PARAMEMPHASIS(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_77__pyx_unpickle_PY_SCIP_PARAMEMPHASIS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_77__pyx_unpickle_PY_SCIP_PARAMEMPHASIS = {"__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_77__pyx_unpickle_PY_SCIP_PARAMEMPHASIS, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_77__pyx_unpickle_PY_SCIP_PARAMEMPHASIS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PARAMEMPHASIS (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_PARAMEMPHASIS") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_76__pyx_unpickle_PY_SCIP_PARAMEMPHASIS(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_76__pyx_unpickle_PY_SCIP_PARAMEMPHASIS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMEMPHASIS.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_PARAMEMPHASIS.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMEMPHASIS.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMEMPHASIS.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_PARAMEMPHASIS.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PARAMEMPHASIS.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PARAMEMPHASIS(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PARAMEMPHASIS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(<PY_SCIP_PARAMEMPHASIS> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state(PY_SCIP_PARAMEMPHASIS __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PARAMEMPHASIS__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_STATUS(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_79__pyx_unpickle_PY_SCIP_STATUS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_79__pyx_unpickle_PY_SCIP_STATUS = {"__pyx_unpickle_PY_SCIP_STATUS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_79__pyx_unpickle_PY_SCIP_STATUS, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_79__pyx_unpickle_PY_SCIP_STATUS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_STATUS (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_STATUS", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_STATUS", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_STATUS") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_STATUS", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_STATUS", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_78__pyx_unpickle_PY_SCIP_STATUS(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_78__pyx_unpickle_PY_SCIP_STATUS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_STATUS", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STATUS.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_STATUS.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STATUS.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STATUS.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_STATUS.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STATUS__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STATUS.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_STATUS(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_STATUS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STATUS__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_STATUS__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_STATUS__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_STAGE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_81__pyx_unpickle_PY_SCIP_STAGE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_81__pyx_unpickle_PY_SCIP_STAGE = {"__pyx_unpickle_PY_SCIP_STAGE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_81__pyx_unpickle_PY_SCIP_STAGE, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_81__pyx_unpickle_PY_SCIP_STAGE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_STAGE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_STAGE", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_STAGE", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_STAGE") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_STAGE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_STAGE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_80__pyx_unpickle_PY_SCIP_STAGE(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_80__pyx_unpickle_PY_SCIP_STAGE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_STAGE", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STAGE.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_STAGE.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STAGE.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STAGE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_STAGE.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STAGE__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_STAGE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_STAGE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_STAGE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_STAGE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_STAGE__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_STAGE__set_state(<PY_SCIP_STAGE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STAGE__set_state(PY_SCIP_STAGE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_STAGE__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_NODETYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_83__pyx_unpickle_PY_SCIP_NODETYPE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_83__pyx_unpickle_PY_SCIP_NODETYPE = {"__pyx_unpickle_PY_SCIP_NODETYPE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_83__pyx_unpickle_PY_SCIP_NODETYPE, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_83__pyx_unpickle_PY_SCIP_NODETYPE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_NODETYPE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_NODETYPE", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_NODETYPE", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_NODETYPE") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_NODETYPE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_NODETYPE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_82__pyx_unpickle_PY_SCIP_NODETYPE(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_82__pyx_unpickle_PY_SCIP_NODETYPE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_NODETYPE", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_NODETYPE.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_NODETYPE.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_NODETYPE.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_NODETYPE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_NODETYPE.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_NODETYPE__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_NODETYPE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_NODETYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_NODETYPE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_NODETYPE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_NODETYPE__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_NODETYPE__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PROPTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_85__pyx_unpickle_PY_SCIP_PROPTIMING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_85__pyx_unpickle_PY_SCIP_PROPTIMING = {"__pyx_unpickle_PY_SCIP_PROPTIMING", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_85__pyx_unpickle_PY_SCIP_PROPTIMING, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_85__pyx_unpickle_PY_SCIP_PROPTIMING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PROPTIMING (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PROPTIMING", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PROPTIMING", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_PROPTIMING") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PROPTIMING", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PROPTIMING", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_84__pyx_unpickle_PY_SCIP_PROPTIMING(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_84__pyx_unpickle_PY_SCIP_PROPTIMING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PROPTIMING", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PROPTIMING.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_PROPTIMING.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PROPTIMING.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PROPTIMING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_PROPTIMING.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PROPTIMING__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PROPTIMING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PROPTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PROPTIMING", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PROPTIMING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PROPTIMING__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(<PY_SCIP_PROPTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PROPTIMING__set_state(PY_SCIP_PROPTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PROPTIMING__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PRESOLTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_87__pyx_unpickle_PY_SCIP_PRESOLTIMING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_87__pyx_unpickle_PY_SCIP_PRESOLTIMING = {"__pyx_unpickle_PY_SCIP_PRESOLTIMING", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_87__pyx_unpickle_PY_SCIP_PRESOLTIMING, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_87__pyx_unpickle_PY_SCIP_PRESOLTIMING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PRESOLTIMING (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PRESOLTIMING", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PRESOLTIMING", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_PRESOLTIMING") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_PRESOLTIMING", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PRESOLTIMING", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_86__pyx_unpickle_PY_SCIP_PRESOLTIMING(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_86__pyx_unpickle_PY_SCIP_PRESOLTIMING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PRESOLTIMING", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PRESOLTIMING.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_PRESOLTIMING.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PRESOLTIMING.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PRESOLTIMING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_PRESOLTIMING.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_PRESOLTIMING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PRESOLTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PRESOLTIMING", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_HEURTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_89__pyx_unpickle_PY_SCIP_HEURTIMING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_89__pyx_unpickle_PY_SCIP_HEURTIMING = {"__pyx_unpickle_PY_SCIP_HEURTIMING", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_89__pyx_unpickle_PY_SCIP_HEURTIMING, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_89__pyx_unpickle_PY_SCIP_HEURTIMING(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_HEURTIMING (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_HEURTIMING", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_HEURTIMING", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_HEURTIMING") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_HEURTIMING", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_HEURTIMING", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_88__pyx_unpickle_PY_SCIP_HEURTIMING(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_88__pyx_unpickle_PY_SCIP_HEURTIMING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_HEURTIMING", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_HEURTIMING.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_HEURTIMING.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_HEURTIMING.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_HEURTIMING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_HEURTIMING.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_HEURTIMING__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_HEURTIMING.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_HEURTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_HEURTIMING", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_HEURTIMING__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_HEURTIMING__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(<PY_SCIP_HEURTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_HEURTIMING__set_state(PY_SCIP_HEURTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_HEURTIMING__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_EVENTTYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_91__pyx_unpickle_PY_SCIP_EVENTTYPE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_91__pyx_unpickle_PY_SCIP_EVENTTYPE = {"__pyx_unpickle_PY_SCIP_EVENTTYPE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_91__pyx_unpickle_PY_SCIP_EVENTTYPE, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_91__pyx_unpickle_PY_SCIP_EVENTTYPE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_EVENTTYPE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_EVENTTYPE", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_EVENTTYPE", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_EVENTTYPE") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_EVENTTYPE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_EVENTTYPE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_90__pyx_unpickle_PY_SCIP_EVENTTYPE(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_90__pyx_unpickle_PY_SCIP_EVENTTYPE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_EVENTTYPE", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_EVENTTYPE.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_EVENTTYPE.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_EVENTTYPE.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_EVENTTYPE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_EVENTTYPE.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_EVENTTYPE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_EVENTTYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_EVENTTYPE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_EVENTTYPE__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_EVENTTYPE__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_LPSOLSTAT(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_93__pyx_unpickle_PY_SCIP_LPSOLSTAT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_93__pyx_unpickle_PY_SCIP_LPSOLSTAT = {"__pyx_unpickle_PY_SCIP_LPSOLSTAT", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_93__pyx_unpickle_PY_SCIP_LPSOLSTAT, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_93__pyx_unpickle_PY_SCIP_LPSOLSTAT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_LPSOLSTAT (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_LPSOLSTAT", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_LPSOLSTAT", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_LPSOLSTAT") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_LPSOLSTAT", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_LPSOLSTAT", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_92__pyx_unpickle_PY_SCIP_LPSOLSTAT(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_92__pyx_unpickle_PY_SCIP_LPSOLSTAT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_LPSOLSTAT", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_LPSOLSTAT.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_LPSOLSTAT.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_LPSOLSTAT.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_LPSOLSTAT.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_LPSOLSTAT.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_LPSOLSTAT.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_LPSOLSTAT(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_LPSOLSTAT", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(<PY_SCIP_LPSOLSTAT> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state(PY_SCIP_LPSOLSTAT __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_LPSOLSTAT__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_BRANCHDIR(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_95__pyx_unpickle_PY_SCIP_BRANCHDIR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_95__pyx_unpickle_PY_SCIP_BRANCHDIR = {"__pyx_unpickle_PY_SCIP_BRANCHDIR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_95__pyx_unpickle_PY_SCIP_BRANCHDIR, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_95__pyx_unpickle_PY_SCIP_BRANCHDIR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_BRANCHDIR (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_BRANCHDIR", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_BRANCHDIR", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_BRANCHDIR") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_BRANCHDIR", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_BRANCHDIR", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_94__pyx_unpickle_PY_SCIP_BRANCHDIR(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_94__pyx_unpickle_PY_SCIP_BRANCHDIR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_BRANCHDIR", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BRANCHDIR.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_BRANCHDIR.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BRANCHDIR.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BRANCHDIR.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_BRANCHDIR.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BRANCHDIR.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_BRANCHDIR(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_BRANCHDIR", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_BRANCHDIR__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_BRANCHDIR__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_9pyscipopt_4scip_97__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9pyscipopt_4scip_97__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE = {"__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_97__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9pyscipopt_4scip_97__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE") < 0)) __PYX_ERR(4, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pyscipopt_4scip_96__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9pyscipopt_4scip_96__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", 0); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BENDERSENFOTYPE.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = PY_SCIP_BENDERSENFOTYPE.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(4, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BENDERSENFOTYPE.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BENDERSENFOTYPE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "(tree fragment)":9 * __pyx_result = PY_SCIP_BENDERSENFOTYPE.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_t_3 = __pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(((struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = PY_SCIP_BENDERSENFOTYPE.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_9pyscipopt_4scip___pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(4, 12, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":13 * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(4, 13, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(<PY_SCIP_BENDERSENFOTYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state(PY_SCIP_BENDERSENFOTYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pyscipopt.scip.__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":734 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, <void*>a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":735 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":734 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, <void*>a) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":737 * return PyArray_MultiIterNew(1, <void*>a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, <void*>a, <void*>b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":738 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":737 * return PyArray_MultiIterNew(1, <void*>a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, <void*>a, <void*>b) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":740 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":741 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":740 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":743 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":744 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":743 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":746 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":747 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<< * * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":746 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":749 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< * if PyDataType_HASSUBARRAY(d): * return <tuple>d.subarray.shape */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":750 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< * return <tuple>d.subarray.shape * else: */ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":751 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return <tuple>d.subarray.shape # <<<<<<<<<<<<<< * else: * return () */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":750 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< * return <tuple>d.subarray.shape * else: */ } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":753 * return <tuple>d.subarray.shape * else: * return () # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_empty_tuple); __pyx_r = __pyx_empty_tuple; goto __pyx_L0; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":749 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< * if PyDataType_HASSUBARRAY(d): * return <tuple>d.subarray.shape */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":868 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_array_base", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":869 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< * PyArray_SetBaseObject(arr, base) * */ Py_INCREF(__pyx_v_base); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":870 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":868 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":872 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * base = PyArray_BASE(arr) * if base is NULL: */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":873 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< * if base is NULL: * return None */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":874 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< * return None * return <object>base */ __pyx_t_1 = ((__pyx_v_base == NULL) != 0); if (__pyx_t_1) { /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":875 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< * return <object>base * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":874 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< * return None * return <object>base */ } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":876 * if base is NULL: * return None * return <object>base # <<<<<<<<<<<<<< * * # Versions of the import_* functions which are more suitable for */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_base)); __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":872 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * base = PyArray_BASE(arr) * if base is NULL: */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":880 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: * __pyx_import_array() */ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":881 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * __pyx_import_array() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":882 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 882, __pyx_L3_error) /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":881 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * __pyx_import_array() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":883 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.multiarray failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 883, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":884 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 884, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(16, 884, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":881 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * __pyx_import_array() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":880 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: * __pyx_import_array() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":886 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":887 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":888 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 888, __pyx_L3_error) /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":887 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":889 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 889, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":890 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 890, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(16, 890, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":887 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":886 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":892 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 0); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":893 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":894 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 894, __pyx_L3_error) /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":893 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":895 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 895, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":896 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef extern from *: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 896, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(16, 896, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":893 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":892 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_9pyscipopt_4scip_Expr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Expr *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Expr *)o); p->terms = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Expr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Expr *p = (struct __pyx_obj_9pyscipopt_4scip_Expr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->terms); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Expr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Expr *p = (struct __pyx_obj_9pyscipopt_4scip_Expr *)o; if (p->terms) { e = (*v)(p->terms, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Expr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Expr *p = (struct __pyx_obj_9pyscipopt_4scip_Expr *)o; tmp = ((PyObject*)p->terms); p->terms = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_sq_item_9pyscipopt_4scip_Expr(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Expr_terms(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Expr_5terms_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Expr_terms(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Expr_5terms_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Expr_5terms_5__del__(o); } } static PyObject *__pyx_specialmethod___pyx_pw_9pyscipopt_4scip_4Expr_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_9pyscipopt_4scip_4Expr_7__next__(self);} static PyMethodDef __pyx_methods_9pyscipopt_4scip_Expr[] = { {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9pyscipopt_4scip_4Expr_7__next__, METH_NOARGS|METH_COEXIST, 0}, {"__rdiv__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_19__rdiv__, METH_O, __pyx_doc_9pyscipopt_4scip_4Expr_18__rdiv__}, {"__rtruediv__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_23__rtruediv__, METH_O, __pyx_doc_9pyscipopt_4scip_4Expr_22__rtruediv__}, {"__radd__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_31__radd__, METH_O, 0}, {"__rmul__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_33__rmul__, METH_O, 0}, {"__rsub__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_35__rsub__, METH_O, 0}, {"normalize", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_39normalize, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Expr_38normalize}, {"degree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_43degree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Expr_42degree}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_45__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Expr_47__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Expr[] = { {(char *)"terms", __pyx_getprop_9pyscipopt_4scip_4Expr_terms, __pyx_setprop_9pyscipopt_4scip_4Expr_terms, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Expr = { __pyx_pw_9pyscipopt_4scip_4Expr_11__add__, /*nb_add*/ __pyx_pw_9pyscipopt_4scip_4Expr_29__sub__, /*nb_subtract*/ __pyx_pw_9pyscipopt_4scip_4Expr_15__mul__, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) __pyx_pw_9pyscipopt_4scip_4Expr_17__div__, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ __pyx_pw_9pyscipopt_4scip_4Expr_25__pow__, /*nb_power*/ __pyx_pw_9pyscipopt_4scip_4Expr_27__neg__, /*nb_negative*/ 0, /*nb_positive*/ __pyx_pw_9pyscipopt_4scip_4Expr_9__abs__, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif __pyx_pw_9pyscipopt_4scip_4Expr_13__iadd__, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ __pyx_pw_9pyscipopt_4scip_4Expr_21__truediv__, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Expr = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_9pyscipopt_4scip_Expr, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Expr = { 0, /*mp_length*/ __pyx_pw_9pyscipopt_4scip_4Expr_3__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Expr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Expr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Expr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Expr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_4Expr_41__repr__, /*tp_repr*/ &__pyx_tp_as_number_Expr, /*tp_as_number*/ &__pyx_tp_as_sequence_Expr, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Expr, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Expr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Expr, /*tp_clear*/ __pyx_pw_9pyscipopt_4scip_4Expr_37__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_9pyscipopt_4scip_4Expr_5__iter__, /*tp_iter*/ __pyx_pw_9pyscipopt_4scip_4Expr_7__next__, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Expr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Expr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_4Expr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Expr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_ExprCons(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_ExprCons *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_ExprCons *)o); p->expr = Py_None; Py_INCREF(Py_None); p->_lhs = Py_None; Py_INCREF(Py_None); p->_rhs = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_ExprCons(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_ExprCons *p = (struct __pyx_obj_9pyscipopt_4scip_ExprCons *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->expr); Py_CLEAR(p->_lhs); Py_CLEAR(p->_rhs); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_ExprCons(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_ExprCons *p = (struct __pyx_obj_9pyscipopt_4scip_ExprCons *)o; if (p->expr) { e = (*v)(p->expr, a); if (e) return e; } if (p->_lhs) { e = (*v)(p->_lhs, a); if (e) return e; } if (p->_rhs) { e = (*v)(p->_rhs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_ExprCons(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_ExprCons *p = (struct __pyx_obj_9pyscipopt_4scip_ExprCons *)o; tmp = ((PyObject*)p->expr); p->expr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_lhs); p->_lhs = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_rhs); p->_rhs = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_8ExprCons_expr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8ExprCons_expr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4expr_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_8ExprCons__lhs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8ExprCons__lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4_lhs_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_8ExprCons__rhs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8ExprCons__rhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8ExprCons_4_rhs_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_ExprCons[] = { {"normalize", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8ExprCons_3normalize, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8ExprCons_2normalize}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8ExprCons_11__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8ExprCons_13__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_ExprCons[] = { {(char *)"expr", __pyx_getprop_9pyscipopt_4scip_8ExprCons_expr, __pyx_setprop_9pyscipopt_4scip_8ExprCons_expr, (char *)0, 0}, {(char *)"_lhs", __pyx_getprop_9pyscipopt_4scip_8ExprCons__lhs, __pyx_setprop_9pyscipopt_4scip_8ExprCons__lhs, (char *)0, 0}, {(char *)"_rhs", __pyx_getprop_9pyscipopt_4scip_8ExprCons__rhs, __pyx_setprop_9pyscipopt_4scip_8ExprCons__rhs, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_ExprCons = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_9pyscipopt_4scip_8ExprCons_9__nonzero__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PyTypeObject __pyx_type_9pyscipopt_4scip_ExprCons = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.ExprCons", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_ExprCons), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_ExprCons, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_8ExprCons_7__repr__, /*tp_repr*/ &__pyx_tp_as_number_ExprCons, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Constraints with a polynomial expressions and lower/upper bounds.", /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_ExprCons, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_ExprCons, /*tp_clear*/ __pyx_pw_9pyscipopt_4scip_8ExprCons_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_ExprCons, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_ExprCons, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_8ExprCons_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_ExprCons, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_GenExpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_GenExpr *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_GenExpr *)o); p->operatorIndex = Py_None; Py_INCREF(Py_None); p->_op = Py_None; Py_INCREF(Py_None); p->children = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_GenExpr *p = (struct __pyx_obj_9pyscipopt_4scip_GenExpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->operatorIndex); Py_CLEAR(p->_op); Py_CLEAR(p->children); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_GenExpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_GenExpr *p = (struct __pyx_obj_9pyscipopt_4scip_GenExpr *)o; if (p->operatorIndex) { e = (*v)(p->operatorIndex, a); if (e) return e; } if (p->_op) { e = (*v)(p->_op, a); if (e) return e; } if (p->children) { e = (*v)(p->children, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_GenExpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_GenExpr *p = (struct __pyx_obj_9pyscipopt_4scip_GenExpr *)o; tmp = ((PyObject*)p->operatorIndex); p->operatorIndex = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_op); p->_op = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->children); p->children = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_7GenExpr_operatorIndex(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7GenExpr_operatorIndex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7GenExpr_13operatorIndex_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_7GenExpr__op(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7GenExpr__op(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7GenExpr_3_op_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_7GenExpr_children(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7GenExpr_children(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7GenExpr_8children_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_GenExpr[] = { {"__rdiv__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_13__rdiv__, METH_O, __pyx_doc_9pyscipopt_4scip_7GenExpr_12__rdiv__}, {"__rtruediv__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_17__rtruediv__, METH_O, __pyx_doc_9pyscipopt_4scip_7GenExpr_16__rtruediv__}, {"__radd__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_23__radd__, METH_O, 0}, {"__rmul__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_25__rmul__, METH_O, 0}, {"__rsub__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_27__rsub__, METH_O, 0}, {"degree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_31degree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7GenExpr_30degree}, {"getOp", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_33getOp, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7GenExpr_32getOp}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_35__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7GenExpr_37__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_GenExpr[] = { {(char *)"operatorIndex", __pyx_getprop_9pyscipopt_4scip_7GenExpr_operatorIndex, __pyx_setprop_9pyscipopt_4scip_7GenExpr_operatorIndex, (char *)0, 0}, {(char *)"_op", __pyx_getprop_9pyscipopt_4scip_7GenExpr__op, __pyx_setprop_9pyscipopt_4scip_7GenExpr__op, (char *)0, 0}, {(char *)"children", __pyx_getprop_9pyscipopt_4scip_7GenExpr_children, __pyx_setprop_9pyscipopt_4scip_7GenExpr_children, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GenExpr = { __pyx_pw_9pyscipopt_4scip_7GenExpr_5__add__, /*nb_add*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_21__sub__, /*nb_subtract*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_7__mul__, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) __pyx_pw_9pyscipopt_4scip_7GenExpr_11__div__, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_9__pow__, /*nb_power*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_19__neg__, /*nb_negative*/ 0, /*nb_positive*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_3__abs__, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_15__truediv__, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PyTypeObject __pyx_type_9pyscipopt_4scip_GenExpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.GenExpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_GenExpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_GenExpr, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_GenExpr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_GenExpr, /*tp_clear*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_29__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_GenExpr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_GenExpr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_7GenExpr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_GenExpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_SumExpr(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_SumExpr *p; PyObject *o = __pyx_tp_new_9pyscipopt_4scip_GenExpr(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_SumExpr *)o); p->constant = Py_None; Py_INCREF(Py_None); p->coefs = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_SumExpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_SumExpr *p = (struct __pyx_obj_9pyscipopt_4scip_SumExpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->constant); Py_CLEAR(p->coefs); PyObject_GC_Track(o); __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_SumExpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_SumExpr *p = (struct __pyx_obj_9pyscipopt_4scip_SumExpr *)o; e = __pyx_tp_traverse_9pyscipopt_4scip_GenExpr(o, v, a); if (e) return e; if (p->constant) { e = (*v)(p->constant, a); if (e) return e; } if (p->coefs) { e = (*v)(p->coefs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_SumExpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_SumExpr *p = (struct __pyx_obj_9pyscipopt_4scip_SumExpr *)o; __pyx_tp_clear_9pyscipopt_4scip_GenExpr(o); tmp = ((PyObject*)p->constant); p->constant = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->coefs); p->coefs = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_7SumExpr_constant(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7SumExpr_constant(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7SumExpr_8constant_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_7SumExpr_coefs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7SumExpr_coefs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7SumExpr_5coefs_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_SumExpr[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7SumExpr_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7SumExpr_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_SumExpr[] = { {(char *)"constant", __pyx_getprop_9pyscipopt_4scip_7SumExpr_constant, __pyx_setprop_9pyscipopt_4scip_7SumExpr_constant, (char *)0, 0}, {(char *)"coefs", __pyx_getprop_9pyscipopt_4scip_7SumExpr_coefs, __pyx_setprop_9pyscipopt_4scip_7SumExpr_coefs, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_SumExpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.SumExpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_SumExpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_SumExpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_7SumExpr_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_SumExpr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_SumExpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_SumExpr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_SumExpr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_7SumExpr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_SumExpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_ProdExpr(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_ProdExpr *p; PyObject *o = __pyx_tp_new_9pyscipopt_4scip_GenExpr(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)o); p->constant = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_ProdExpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_ProdExpr *p = (struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->constant); PyObject_GC_Track(o); __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_ProdExpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_ProdExpr *p = (struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)o; e = __pyx_tp_traverse_9pyscipopt_4scip_GenExpr(o, v, a); if (e) return e; if (p->constant) { e = (*v)(p->constant, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_ProdExpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_ProdExpr *p = (struct __pyx_obj_9pyscipopt_4scip_ProdExpr *)o; __pyx_tp_clear_9pyscipopt_4scip_GenExpr(o); tmp = ((PyObject*)p->constant); p->constant = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_8ProdExpr_constant(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8ProdExpr_constant(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8ProdExpr_8constant_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_ProdExpr[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8ProdExpr_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8ProdExpr_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_ProdExpr[] = { {(char *)"constant", __pyx_getprop_9pyscipopt_4scip_8ProdExpr_constant, __pyx_setprop_9pyscipopt_4scip_8ProdExpr_constant, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_ProdExpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.ProdExpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_ProdExpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_ProdExpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_8ProdExpr_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_ProdExpr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_ProdExpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_ProdExpr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_ProdExpr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_8ProdExpr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_ProdExpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_VarExpr(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_VarExpr *p; PyObject *o = __pyx_tp_new_9pyscipopt_4scip_GenExpr(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_VarExpr *)o); p->var = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_VarExpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_VarExpr *p = (struct __pyx_obj_9pyscipopt_4scip_VarExpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->var); PyObject_GC_Track(o); __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_VarExpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_VarExpr *p = (struct __pyx_obj_9pyscipopt_4scip_VarExpr *)o; e = __pyx_tp_traverse_9pyscipopt_4scip_GenExpr(o, v, a); if (e) return e; if (p->var) { e = (*v)(p->var, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_VarExpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_VarExpr *p = (struct __pyx_obj_9pyscipopt_4scip_VarExpr *)o; __pyx_tp_clear_9pyscipopt_4scip_GenExpr(o); tmp = ((PyObject*)p->var); p->var = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_7VarExpr_var(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7VarExpr_var(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7VarExpr_3var_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_VarExpr[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7VarExpr_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7VarExpr_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_VarExpr[] = { {(char *)"var", __pyx_getprop_9pyscipopt_4scip_7VarExpr_var, __pyx_setprop_9pyscipopt_4scip_7VarExpr_var, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_VarExpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.VarExpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_VarExpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_VarExpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_7VarExpr_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_VarExpr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_VarExpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_VarExpr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_VarExpr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_7VarExpr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_VarExpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PowExpr(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_PowExpr *p; PyObject *o = __pyx_tp_new_9pyscipopt_4scip_GenExpr(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_PowExpr *)o); p->expo = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PowExpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_PowExpr *p = (struct __pyx_obj_9pyscipopt_4scip_PowExpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->expo); PyObject_GC_Track(o); __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_PowExpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_PowExpr *p = (struct __pyx_obj_9pyscipopt_4scip_PowExpr *)o; e = __pyx_tp_traverse_9pyscipopt_4scip_GenExpr(o, v, a); if (e) return e; if (p->expo) { e = (*v)(p->expo, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_PowExpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_PowExpr *p = (struct __pyx_obj_9pyscipopt_4scip_PowExpr *)o; __pyx_tp_clear_9pyscipopt_4scip_GenExpr(o); tmp = ((PyObject*)p->expo); p->expo = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_7PowExpr_expo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7PowExpr_expo(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7PowExpr_4expo_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PowExpr[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7PowExpr_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7PowExpr_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_PowExpr[] = { {(char *)"expo", __pyx_getprop_9pyscipopt_4scip_7PowExpr_expo, __pyx_setprop_9pyscipopt_4scip_7PowExpr_expo, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PowExpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PowExpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PowExpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PowExpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_7PowExpr_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_PowExpr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_PowExpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PowExpr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_PowExpr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_7PowExpr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PowExpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_UnaryExpr(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_9pyscipopt_4scip_GenExpr(t, a, k); if (unlikely(!o)) return 0; return o; } static PyMethodDef __pyx_methods_9pyscipopt_4scip_UnaryExpr[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9UnaryExpr_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9UnaryExpr_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_UnaryExpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.UnaryExpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_UnaryExpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_9UnaryExpr_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_GenExpr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_GenExpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_UnaryExpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_9UnaryExpr_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_UnaryExpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Constant(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Constant *p; PyObject *o = __pyx_tp_new_9pyscipopt_4scip_GenExpr(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Constant *)o); p->number = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Constant(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Constant *p = (struct __pyx_obj_9pyscipopt_4scip_Constant *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->number); PyObject_GC_Track(o); __pyx_tp_dealloc_9pyscipopt_4scip_GenExpr(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Constant(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Constant *p = (struct __pyx_obj_9pyscipopt_4scip_Constant *)o; e = __pyx_tp_traverse_9pyscipopt_4scip_GenExpr(o, v, a); if (e) return e; if (p->number) { e = (*v)(p->number, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Constant(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Constant *p = (struct __pyx_obj_9pyscipopt_4scip_Constant *)o; __pyx_tp_clear_9pyscipopt_4scip_GenExpr(o); tmp = ((PyObject*)p->number); p->number = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_8Constant_number(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8Constant_6number_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8Constant_number(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8Constant_6number_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8Constant_6number_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Constant[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Constant_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Constant_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Constant[] = { {(char *)"number", __pyx_getprop_9pyscipopt_4scip_8Constant_number, __pyx_setprop_9pyscipopt_4scip_8Constant_number, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Constant = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Constant", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Constant), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Constant, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_8Constant_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Constant, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Constant, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Constant, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Constant, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_8Constant_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Constant, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_LP(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_LP *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_LP *)o); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_LP(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_LP *p = (struct __pyx_obj_9pyscipopt_4scip_LP *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_9pyscipopt_4scip_2LP_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_9pyscipopt_4scip_2LP_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_2LP_4name_1__get__(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_LP[] = { {"writeLP", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_7writeLP, METH_O, __pyx_doc_9pyscipopt_4scip_2LP_6writeLP}, {"readLP", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_9readLP, METH_O, __pyx_doc_9pyscipopt_4scip_2LP_8readLP}, {"infinity", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_11infinity, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_10infinity}, {"isInfinity", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_13isInfinity, METH_O, __pyx_doc_9pyscipopt_4scip_2LP_12isInfinity}, {"addCol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_15addCol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_14addCol}, {"addCols", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_17addCols, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_16addCols}, {"delCols", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_19delCols, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_18delCols}, {"addRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_21addRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_20addRow}, {"addRows", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_23addRows, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_22addRows}, {"delRows", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_25delRows, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_24delRows}, {"getBounds", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_27getBounds, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_26getBounds}, {"getSides", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_29getSides, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_28getSides}, {"chgObj", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_31chgObj, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_30chgObj}, {"chgCoef", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_33chgCoef, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_32chgCoef}, {"chgBound", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_35chgBound, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_34chgBound}, {"chgSide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_37chgSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_36chgSide}, {"clear", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_39clear, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_38clear}, {"nrows", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_41nrows, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_40nrows}, {"ncols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_43ncols, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_42ncols}, {"solve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_2LP_45solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_2LP_44solve}, {"getPrimal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_47getPrimal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_46getPrimal}, {"isPrimalFeasible", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_49isPrimalFeasible, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_48isPrimalFeasible}, {"getDual", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_51getDual, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_50getDual}, {"isDualFeasible", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_53isDualFeasible, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_52isDualFeasible}, {"getPrimalRay", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_55getPrimalRay, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_54getPrimalRay}, {"getDualRay", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_57getDualRay, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_56getDualRay}, {"getNIterations", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_59getNIterations, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_58getNIterations}, {"getRedcost", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_61getRedcost, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_60getRedcost}, {"getBasisInds", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_63getBasisInds, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_2LP_62getBasisInds}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_65__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_2LP_67__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_LP[] = { {(char *)"name", __pyx_getprop_9pyscipopt_4scip_2LP_name, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_LP = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.LP", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_LP), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_LP, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_2LP_5__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_LP, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_LP, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_2LP_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_LP, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Benders(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Benders *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Benders(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Benders *p = (struct __pyx_obj_9pyscipopt_4scip_Benders *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Benders(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Benders *p = (struct __pyx_obj_9pyscipopt_4scip_Benders *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Benders(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Benders *p = (struct __pyx_obj_9pyscipopt_4scip_Benders *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_7Benders_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7Benders_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7Benders_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7Benders_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7Benders_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_7Benders_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7Benders_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7Benders_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7Benders_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7Benders_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Benders[] = { {"bendersfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_1bendersfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_bendersfree}, {"bendersinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_3bendersinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_2bendersinit}, {"bendersexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_5bendersexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_4bendersexit}, {"bendersinitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_7bendersinitpre, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_6bendersinitpre}, {"bendersexitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_9bendersexitpre, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_8bendersexitpre}, {"bendersinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_11bendersinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_10bendersinitsol}, {"bendersexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_13bendersexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Benders_12bendersexitsol}, {"benderscreatesub", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_15benderscreatesub, METH_O, __pyx_doc_9pyscipopt_4scip_7Benders_14benderscreatesub}, {"benderspresubsolve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_7Benders_17benderspresubsolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_7Benders_16benderspresubsolve}, {"benderssolvesubconvex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_7Benders_19benderssolvesubconvex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_7Benders_18benderssolvesubconvex}, {"benderssolvesub", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_7Benders_21benderssolvesub, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_7Benders_20benderssolvesub}, {"benderspostsolve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_7Benders_23benderspostsolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_7Benders_22benderspostsolve}, {"bendersfreesub", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_25bendersfreesub, METH_O, __pyx_doc_9pyscipopt_4scip_7Benders_24bendersfreesub}, {"bendersgetvar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_7Benders_27bendersgetvar, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_7Benders_26bendersgetvar}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_29__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Benders_31__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Benders[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_7Benders_model, __pyx_setprop_9pyscipopt_4scip_7Benders_model, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_7Benders_name, __pyx_setprop_9pyscipopt_4scip_7Benders_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Benders = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Benders", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Benders), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Benders, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Benders, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Benders, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Benders, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Benders, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Benders, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Benderscut(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Benderscut *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Benderscut *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Benderscut(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Benderscut *p = (struct __pyx_obj_9pyscipopt_4scip_Benderscut *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->benders); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Benderscut(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Benderscut *p = (struct __pyx_obj_9pyscipopt_4scip_Benderscut *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } if (p->benders) { e = (*v)(((PyObject *)p->benders), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Benderscut(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Benderscut *p = (struct __pyx_obj_9pyscipopt_4scip_Benderscut *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->benders); p->benders = ((struct __pyx_obj_9pyscipopt_4scip_Benders *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_10Benderscut_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_10Benderscut_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_10Benderscut_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_10Benderscut_benders(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_10Benderscut_benders(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_10Benderscut_7benders_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_10Benderscut_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_10Benderscut_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_10Benderscut_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Benderscut[] = { {"benderscutfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_1benderscutfree, METH_NOARGS, 0}, {"benderscutinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_3benderscutinit, METH_NOARGS, 0}, {"benderscutexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_5benderscutexit, METH_NOARGS, 0}, {"benderscutinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_7benderscutinitsol, METH_NOARGS, 0}, {"benderscutexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_9benderscutexitsol, METH_NOARGS, 0}, {"benderscutexec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_10Benderscut_11benderscutexec, METH_VARARGS|METH_KEYWORDS, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Benderscut_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Benderscut[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_10Benderscut_model, __pyx_setprop_9pyscipopt_4scip_10Benderscut_model, (char *)0, 0}, {(char *)"benders", __pyx_getprop_9pyscipopt_4scip_10Benderscut_benders, __pyx_setprop_9pyscipopt_4scip_10Benderscut_benders, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_10Benderscut_name, __pyx_setprop_9pyscipopt_4scip_10Benderscut_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Benderscut = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Benderscut", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Benderscut), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Benderscut, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Benderscut, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Benderscut, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Benderscut, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Benderscut, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Benderscut, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Branchrule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Branchrule *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Branchrule *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Branchrule(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Branchrule *p = (struct __pyx_obj_9pyscipopt_4scip_Branchrule *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Branchrule(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Branchrule *p = (struct __pyx_obj_9pyscipopt_4scip_Branchrule *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Branchrule(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Branchrule *p = (struct __pyx_obj_9pyscipopt_4scip_Branchrule *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_10Branchrule_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_10Branchrule_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_10Branchrule_5model_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Branchrule[] = { {"branchfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_1branchfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Branchrule_branchfree}, {"branchinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_3branchinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Branchrule_2branchinit}, {"branchexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_5branchexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Branchrule_4branchexit}, {"branchinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_7branchinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Branchrule_6branchinitsol}, {"branchexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_9branchexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Branchrule_8branchexitsol}, {"branchexeclp", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_11branchexeclp, METH_O, __pyx_doc_9pyscipopt_4scip_10Branchrule_10branchexeclp}, {"branchexecext", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_13branchexecext, METH_O, __pyx_doc_9pyscipopt_4scip_10Branchrule_12branchexecext}, {"branchexecps", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_15branchexecps, METH_O, __pyx_doc_9pyscipopt_4scip_10Branchrule_14branchexecps}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_17__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Branchrule_19__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Branchrule[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_10Branchrule_model, __pyx_setprop_9pyscipopt_4scip_10Branchrule_model, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Branchrule = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Branchrule", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Branchrule), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Branchrule, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Branchrule, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Branchrule, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Branchrule, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Branchrule, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Branchrule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Conshdlr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Conshdlr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Conshdlr *p = (struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Conshdlr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Conshdlr *p = (struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Conshdlr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Conshdlr *p = (struct __pyx_obj_9pyscipopt_4scip_Conshdlr *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_8Conshdlr_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8Conshdlr_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8Conshdlr_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_8Conshdlr_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8Conshdlr_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8Conshdlr_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Conshdlr[] = { {"consfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_1consfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_consfree}, {"consinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_3consinit, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_2consinit}, {"consexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_5consexit, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_4consexit}, {"consinitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_7consinitpre, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_6consinitpre}, {"consexitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_9consexitpre, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_8consexitpre}, {"consinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_11consinitsol, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_10consinitsol}, {"consexitsol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_13consexitsol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_12consexitsol}, {"consdelete", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_15consdelete, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_14consdelete}, {"constrans", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_17constrans, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_16constrans}, {"consinitlp", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_19consinitlp, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_18consinitlp}, {"conssepalp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_21conssepalp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_20conssepalp}, {"conssepasol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_23conssepasol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_22conssepasol}, {"consenfolp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_25consenfolp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_24consenfolp}, {"consenforelax", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_27consenforelax, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_26consenforelax}, {"consenfops", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_29consenfops, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_28consenfops}, {"conscheck", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_31conscheck, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_30conscheck}, {"consprop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_33consprop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_32consprop}, {"conspresol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_35conspresol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_34conspresol}, {"consresprop", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_37consresprop, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_36consresprop}, {"conslock", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_8Conshdlr_39conslock, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_38conslock}, {"consactive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_41consactive, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_40consactive}, {"consdeactive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_43consdeactive, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_42consdeactive}, {"consenable", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_45consenable, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_44consenable}, {"consdisable", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_47consdisable, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_46consdisable}, {"consdelvars", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_49consdelvars, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_48consdelvars}, {"consprint", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_51consprint, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_50consprint}, {"conscopy", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_53conscopy, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_52conscopy}, {"consparse", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_55consparse, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_54consparse}, {"consgetvars", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_57consgetvars, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_56consgetvars}, {"consgetnvars", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_59consgetnvars, METH_O, __pyx_doc_9pyscipopt_4scip_8Conshdlr_58consgetnvars}, {"consgetdivebdchgs", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_61consgetdivebdchgs, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Conshdlr_60consgetdivebdchgs}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_63__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Conshdlr_65__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Conshdlr[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_8Conshdlr_model, __pyx_setprop_9pyscipopt_4scip_8Conshdlr_model, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_8Conshdlr_name, __pyx_setprop_9pyscipopt_4scip_8Conshdlr_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Conshdlr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Conshdlr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Conshdlr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Conshdlr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Conshdlr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Conshdlr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Conshdlr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Conshdlr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Conshdlr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Eventhdlr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Eventhdlr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *p = (struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Eventhdlr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *p = (struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Eventhdlr(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *p = (struct __pyx_obj_9pyscipopt_4scip_Eventhdlr *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_9Eventhdlr_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_9Eventhdlr_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_9Eventhdlr_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_9Eventhdlr_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_9Eventhdlr_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_9Eventhdlr_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Eventhdlr[] = { {"eventcopy", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_1eventcopy, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_eventcopy}, {"eventfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_3eventfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_2eventfree}, {"eventinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_5eventinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_4eventinit}, {"eventexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_7eventexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_6eventexit}, {"eventinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_9eventinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_8eventinitsol}, {"eventexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_11eventexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_10eventexitsol}, {"eventdelete", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_13eventdelete, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_12eventdelete}, {"eventexec", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_15eventexec, METH_O, __pyx_doc_9pyscipopt_4scip_9Eventhdlr_14eventexec}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_17__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_9Eventhdlr_19__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Eventhdlr[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_9Eventhdlr_model, __pyx_setprop_9pyscipopt_4scip_9Eventhdlr_model, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_9Eventhdlr_name, __pyx_setprop_9pyscipopt_4scip_9Eventhdlr_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Eventhdlr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Eventhdlr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Eventhdlr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Eventhdlr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Eventhdlr, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Eventhdlr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Eventhdlr, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Eventhdlr, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Eventhdlr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Heur(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Heur *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Heur *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Heur(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Heur *p = (struct __pyx_obj_9pyscipopt_4scip_Heur *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Heur(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Heur *p = (struct __pyx_obj_9pyscipopt_4scip_Heur *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Heur(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Heur *p = (struct __pyx_obj_9pyscipopt_4scip_Heur *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Heur_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Heur_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Heur_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Heur_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Heur_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Heur_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Heur_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Heur_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Heur_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Heur_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Heur[] = { {"heurfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_1heurfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Heur_heurfree}, {"heurinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_3heurinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Heur_2heurinit}, {"heurexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_5heurexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Heur_4heurexit}, {"heurinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_7heurinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Heur_6heurinitsol}, {"heurexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_9heurexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Heur_8heurexitsol}, {"heurexec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Heur_11heurexec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_4Heur_10heurexec}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Heur_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Heur[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_4Heur_model, __pyx_setprop_9pyscipopt_4scip_4Heur_model, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_4Heur_name, __pyx_setprop_9pyscipopt_4scip_4Heur_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Heur = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Heur", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Heur), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Heur, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Heur, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Heur, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Heur, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Heur, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Heur, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Presol(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Presol *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Presol *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Presol(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Presol *p = (struct __pyx_obj_9pyscipopt_4scip_Presol *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Presol(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Presol *p = (struct __pyx_obj_9pyscipopt_4scip_Presol *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Presol(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Presol *p = (struct __pyx_obj_9pyscipopt_4scip_Presol *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_6Presol_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_6Presol_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_6Presol_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_6Presol_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_6Presol_5model_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Presol[] = { {"presolfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_1presolfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Presol_presolfree}, {"presolinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_3presolinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Presol_2presolinit}, {"presolexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_5presolexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Presol_4presolexit}, {"presolinitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_7presolinitpre, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Presol_6presolinitpre}, {"presolexitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_9presolexitpre, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Presol_8presolexitpre}, {"presolexec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_6Presol_11presolexec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_6Presol_10presolexec}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Presol_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Presol[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_6Presol_model, __pyx_setprop_9pyscipopt_4scip_6Presol_model, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Presol = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Presol", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Presol), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Presol, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Presol, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Presol, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Presol, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Presol, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Presol, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Pricer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Pricer *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Pricer *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Pricer(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Pricer *p = (struct __pyx_obj_9pyscipopt_4scip_Pricer *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Pricer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Pricer *p = (struct __pyx_obj_9pyscipopt_4scip_Pricer *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Pricer(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Pricer *p = (struct __pyx_obj_9pyscipopt_4scip_Pricer *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_6Pricer_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_6Pricer_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_6Pricer_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_6Pricer_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_6Pricer_5model_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Pricer[] = { {"pricerfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_1pricerfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_pricerfree}, {"pricerinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_3pricerinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_2pricerinit}, {"pricerexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_5pricerexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_4pricerexit}, {"pricerinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_7pricerinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_6pricerinitsol}, {"pricerexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_9pricerexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_8pricerexitsol}, {"pricerredcost", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_11pricerredcost, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_10pricerredcost}, {"pricerfarkas", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_13pricerfarkas, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Pricer_12pricerfarkas}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_15__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Pricer_17__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Pricer[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_6Pricer_model, __pyx_setprop_9pyscipopt_4scip_6Pricer_model, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Pricer = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Pricer", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Pricer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Pricer, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Pricer, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Pricer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Pricer, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Pricer, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Pricer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Prop(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Prop *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Prop *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Prop(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Prop *p = (struct __pyx_obj_9pyscipopt_4scip_Prop *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Prop(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Prop *p = (struct __pyx_obj_9pyscipopt_4scip_Prop *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Prop(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Prop *p = (struct __pyx_obj_9pyscipopt_4scip_Prop *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Prop_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Prop_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Prop_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Prop_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Prop_5model_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Prop[] = { {"propfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_1propfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Prop_propfree}, {"propinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_3propinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Prop_2propinit}, {"propexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_5propexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Prop_4propexit}, {"propinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_7propinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Prop_6propinitsol}, {"propexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_9propexitsol, METH_O, __pyx_doc_9pyscipopt_4scip_4Prop_8propexitsol}, {"propinitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_11propinitpre, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Prop_10propinitpre}, {"propexitpre", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_13propexitpre, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Prop_12propexitpre}, {"proppresol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Prop_15proppresol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_4Prop_14proppresol}, {"propexec", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_17propexec, METH_O, __pyx_doc_9pyscipopt_4scip_4Prop_16propexec}, {"propresprop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_4Prop_19propresprop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_4Prop_18propresprop}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_21__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Prop_23__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Prop[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_4Prop_model, __pyx_setprop_9pyscipopt_4scip_4Prop_model, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Prop = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Prop", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Prop), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Prop, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Prop, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Prop, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Prop, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Prop, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Prop, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Sepa(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Sepa *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Sepa *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Sepa(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Sepa *p = (struct __pyx_obj_9pyscipopt_4scip_Sepa *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Sepa(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Sepa *p = (struct __pyx_obj_9pyscipopt_4scip_Sepa *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Sepa(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Sepa *p = (struct __pyx_obj_9pyscipopt_4scip_Sepa *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Sepa_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Sepa_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Sepa_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Sepa_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Sepa_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Sepa_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Sepa_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Sepa_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Sepa_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Sepa_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Sepa[] = { {"sepafree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_1sepafree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Sepa_sepafree}, {"sepainit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_3sepainit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Sepa_2sepainit}, {"sepaexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_5sepaexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Sepa_4sepaexit}, {"sepainitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_7sepainitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Sepa_6sepainitsol}, {"sepaexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_9sepaexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Sepa_8sepaexitsol}, {"sepaexeclp", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_11sepaexeclp, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Sepa_10sepaexeclp}, {"sepaexecsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_13sepaexecsol, METH_O, __pyx_doc_9pyscipopt_4scip_4Sepa_12sepaexecsol}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_15__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Sepa_17__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Sepa[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_4Sepa_model, __pyx_setprop_9pyscipopt_4scip_4Sepa_model, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_4Sepa_name, __pyx_setprop_9pyscipopt_4scip_4Sepa_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Sepa = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Sepa", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Sepa), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Sepa, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Sepa, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Sepa, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Sepa, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Sepa, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Sepa, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Relax(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Relax *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Relax *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Relax(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Relax *p = (struct __pyx_obj_9pyscipopt_4scip_Relax *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Relax(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Relax *p = (struct __pyx_obj_9pyscipopt_4scip_Relax *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Relax(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Relax *p = (struct __pyx_obj_9pyscipopt_4scip_Relax *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_5Relax_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_5Relax_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_5Relax_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_5Relax_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_5Relax_5model_5__del__(o); } } static PyObject *__pyx_getprop_9pyscipopt_4scip_5Relax_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_5Relax_4name_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_5Relax_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_5Relax_4name_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_5Relax_4name_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Relax[] = { {"relaxfree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_1relaxfree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Relax_relaxfree}, {"relaxinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_3relaxinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Relax_2relaxinit}, {"relaxexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_5relaxexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Relax_4relaxexit}, {"relaxinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_7relaxinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Relax_6relaxinitsol}, {"relaxexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_9relaxexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Relax_8relaxexitsol}, {"relaxexec", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_11relaxexec, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Relax_10relaxexec}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Relax_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Relax[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_5Relax_model, __pyx_setprop_9pyscipopt_4scip_5Relax_model, (char *)0, 0}, {(char *)"name", __pyx_getprop_9pyscipopt_4scip_5Relax_name, __pyx_setprop_9pyscipopt_4scip_5Relax_name, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Relax = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Relax", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Relax), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Relax, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Relax, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Relax, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Relax, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Relax, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Relax, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Nodesel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Nodesel *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Nodesel *)o); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Nodesel(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Nodesel *p = (struct __pyx_obj_9pyscipopt_4scip_Nodesel *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->model); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Nodesel(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Nodesel *p = (struct __pyx_obj_9pyscipopt_4scip_Nodesel *)o; if (p->model) { e = (*v)(((PyObject *)p->model), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Nodesel(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Nodesel *p = (struct __pyx_obj_9pyscipopt_4scip_Nodesel *)o; tmp = ((PyObject*)p->model); p->model = ((struct __pyx_obj_9pyscipopt_4scip_Model *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_7Nodesel_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_7Nodesel_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_7Nodesel_5model_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Nodesel[] = { {"nodefree", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_1nodefree, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Nodesel_nodefree}, {"nodeinit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_3nodeinit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Nodesel_2nodeinit}, {"nodeexit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_5nodeexit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Nodesel_4nodeexit}, {"nodeinitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_7nodeinitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Nodesel_6nodeinitsol}, {"nodeexitsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_9nodeexitsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Nodesel_8nodeexitsol}, {"nodeselect", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_11nodeselect, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_7Nodesel_10nodeselect}, {"nodecomp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_7Nodesel_13nodecomp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_7Nodesel_12nodecomp}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_15__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_7Nodesel_17__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Nodesel[] = { {(char *)"model", __pyx_getprop_9pyscipopt_4scip_7Nodesel_model, __pyx_setprop_9pyscipopt_4scip_7Nodesel_model, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Nodesel = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Nodesel", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Nodesel), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Nodesel, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Nodesel, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Nodesel, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Nodesel, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Nodesel, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Nodesel, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_RESULT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_RESULT(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_RESULT[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_14PY_SCIP_RESULT_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_14PY_SCIP_RESULT_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_RESULT", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_RESULT), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_RESULT, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_RESULT, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_RESULT, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PARAMSETTING(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PARAMSETTING(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_PARAMSETTING[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PARAMSETTING_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_PARAMSETTING", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMSETTING), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PARAMSETTING, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_PARAMSETTING, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PARAMSETTING, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_21PY_SCIP_PARAMEMPHASIS_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_PARAMEMPHASIS", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_STATUS(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_STATUS(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_STATUS[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_14PY_SCIP_STATUS_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_14PY_SCIP_STATUS_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_STATUS", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STATUS), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_STATUS, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_STATUS, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_STATUS, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_STAGE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_STAGE(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_STAGE[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_13PY_SCIP_STAGE_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_13PY_SCIP_STAGE_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_STAGE", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_STAGE), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_STAGE, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_STAGE, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_STAGE, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_NODETYPE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_NODETYPE(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_NODETYPE[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_16PY_SCIP_NODETYPE_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_16PY_SCIP_NODETYPE_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_NODETYPE", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_NODETYPE), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_NODETYPE, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_NODETYPE, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_NODETYPE, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PROPTIMING(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PROPTIMING(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_PROPTIMING[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_18PY_SCIP_PROPTIMING_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_PROPTIMING", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PROPTIMING), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PROPTIMING, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_PROPTIMING, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PROPTIMING, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_20PY_SCIP_PRESOLTIMING_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_PRESOLTIMING", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_HEURTIMING(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_HEURTIMING(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_HEURTIMING[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_18PY_SCIP_HEURTIMING_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_HEURTIMING", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_HEURTIMING), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_HEURTIMING, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_HEURTIMING, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_HEURTIMING, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_EVENTTYPE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_EVENTTYPE(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_EVENTTYPE[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17PY_SCIP_EVENTTYPE_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_EVENTTYPE", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_EVENTTYPE), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_EVENTTYPE, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_EVENTTYPE, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_EVENTTYPE, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17PY_SCIP_LPSOLSTAT_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_LPSOLSTAT", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_BRANCHDIR(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_BRANCHDIR(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_BRANCHDIR[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_17PY_SCIP_BRANCHDIR_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_BRANCHDIR", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BRANCHDIR), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_BRANCHDIR, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_BRANCHDIR, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_BRANCHDIR, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_23PY_SCIP_BENDERSENFOTYPE_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.PY_SCIP_BENDERSENFOTYPE", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Event __pyx_vtable_9pyscipopt_4scip_Event; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Event *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Event *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Event; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Event(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Event *p = (struct __pyx_obj_9pyscipopt_4scip_Event *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Event(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Event *p = (struct __pyx_obj_9pyscipopt_4scip_Event *)o; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Event(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Event *p = (struct __pyx_obj_9pyscipopt_4scip_Event *)o; tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_5Event_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_5Event_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_5Event_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_5Event_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Event[] = { {"getType", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_1getType, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Event_getType}, {"getNewBound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_5getNewBound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Event_4getNewBound}, {"getOldBound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_7getOldBound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Event_6getOldBound}, {"getVar", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_9getVar, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Event_8getVar}, {"getNode", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_11getNode, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Event_10getNode}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Event_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Event[] = { {(char *)"data", __pyx_getprop_9pyscipopt_4scip_5Event_data, __pyx_setprop_9pyscipopt_4scip_5Event_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Event = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Event", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Event), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Event, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_5Event_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Event, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Event, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Event, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Event, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Event, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Column __pyx_vtable_9pyscipopt_4scip_Column; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Column(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Column *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Column *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Column; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Column(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Column *p = (struct __pyx_obj_9pyscipopt_4scip_Column *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Column(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Column *p = (struct __pyx_obj_9pyscipopt_4scip_Column *)o; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Column(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Column *p = (struct __pyx_obj_9pyscipopt_4scip_Column *)o; tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_6Column_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_6Column_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_6Column_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_6Column_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_6Column_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Column[] = { {"getLPPos", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_1getLPPos, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_getLPPos}, {"getBasisStatus", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_3getBasisStatus, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_2getBasisStatus}, {"isIntegral", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_5isIntegral, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_4isIntegral}, {"getVar", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_7getVar, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_6getVar}, {"getPrimsol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_9getPrimsol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_8getPrimsol}, {"getLb", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_11getLb, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_10getLb}, {"getUb", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_13getUb, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_6Column_12getUb}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_15__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_6Column_17__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Column[] = { {(char *)"data", __pyx_getprop_9pyscipopt_4scip_6Column_data, __pyx_setprop_9pyscipopt_4scip_6Column_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Column = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Column", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Column), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Column, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Base class holding a pointer to corresponding SCIP_COL", /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Column, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Column, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Column, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Column, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Column, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Row __pyx_vtable_9pyscipopt_4scip_Row; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Row(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Row *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Row *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Row; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Row(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Row *p = (struct __pyx_obj_9pyscipopt_4scip_Row *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Row(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Row *p = (struct __pyx_obj_9pyscipopt_4scip_Row *)o; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Row(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Row *p = (struct __pyx_obj_9pyscipopt_4scip_Row *)o; tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_3Row_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_3Row_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_3Row_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_3Row_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_3Row_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Row[] = { {"getLhs", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_1getLhs, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_getLhs}, {"getRhs", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_3getRhs, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_2getRhs}, {"getConstant", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_5getConstant, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_4getConstant}, {"getLPPos", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_7getLPPos, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_6getLPPos}, {"getBasisStatus", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_9getBasisStatus, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_8getBasisStatus}, {"isIntegral", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_11isIntegral, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_10isIntegral}, {"isModifiable", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_13isModifiable, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_12isModifiable}, {"getNNonz", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_15getNNonz, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_14getNNonz}, {"getNLPNonz", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_17getNLPNonz, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_16getNLPNonz}, {"getCols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_19getCols, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_18getCols}, {"getVals", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_21getVals, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_3Row_20getVals}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_23__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_3Row_25__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Row[] = { {(char *)"data", __pyx_getprop_9pyscipopt_4scip_3Row_data, __pyx_setprop_9pyscipopt_4scip_3Row_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Row = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Row", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Row), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Row, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Base class holding a pointer to corresponding SCIP_ROW", /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Row, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Row, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Row, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Row, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Row, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Solution __pyx_vtable_9pyscipopt_4scip_Solution; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Solution(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Solution *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Solution; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Solution(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Solution *p = (struct __pyx_obj_9pyscipopt_4scip_Solution *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Solution(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Solution *p = (struct __pyx_obj_9pyscipopt_4scip_Solution *)o; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Solution(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Solution *p = (struct __pyx_obj_9pyscipopt_4scip_Solution *)o; tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_8Solution_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8Solution_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8Solution_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8Solution_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8Solution_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Solution[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Solution_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Solution_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Solution[] = { {(char *)"data", __pyx_getprop_9pyscipopt_4scip_8Solution_data, __pyx_setprop_9pyscipopt_4scip_8Solution_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Solution = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Solution", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Solution), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Solution, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Base class holding a pointer to corresponding SCIP_SOL", /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Solution, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Solution, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Solution, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Solution, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Solution, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Node __pyx_vtable_9pyscipopt_4scip_Node; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Node(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Node *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Node *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Node; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Node(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Node *p = (struct __pyx_obj_9pyscipopt_4scip_Node *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Node(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Node *p = (struct __pyx_obj_9pyscipopt_4scip_Node *)o; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Node(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Node *p = (struct __pyx_obj_9pyscipopt_4scip_Node *)o; tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_4Node_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_4Node_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_4Node_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_4Node_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_4Node_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Node[] = { {"getParent", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_1getParent, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_getParent}, {"getNumber", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_3getNumber, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_2getNumber}, {"getDepth", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_5getDepth, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_4getDepth}, {"getType", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_7getType, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_6getType}, {"getLowerbound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_9getLowerbound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_8getLowerbound}, {"getEstimate", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_11getEstimate, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_10getEstimate}, {"getNAddedConss", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_13getNAddedConss, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_12getNAddedConss}, {"isActive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_15isActive, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_14isActive}, {"isPropagatedAgain", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_17isPropagatedAgain, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_16isPropagatedAgain}, {"getBranchInfos", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_19getBranchInfos, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_4Node_18getBranchInfos}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_21__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_4Node_23__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Node[] = { {(char *)"data", __pyx_getprop_9pyscipopt_4scip_4Node_data, __pyx_setprop_9pyscipopt_4scip_4Node_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Node = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Node", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Node), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Node, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Base class holding a pointer to corresponding SCIP_NODE", /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Node, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Node, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Node, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Node, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Variable __pyx_vtable_9pyscipopt_4scip_Variable; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Variable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Variable *p; PyObject *o = __pyx_tp_new_9pyscipopt_4scip_Expr(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Variable *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Variable; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Variable(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Variable *p = (struct __pyx_obj_9pyscipopt_4scip_Variable *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); PyObject_GC_Track(o); __pyx_tp_dealloc_9pyscipopt_4scip_Expr(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Variable(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Variable *p = (struct __pyx_obj_9pyscipopt_4scip_Variable *)o; e = __pyx_tp_traverse_9pyscipopt_4scip_Expr(o, v, a); if (e) return e; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Variable(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Variable *p = (struct __pyx_obj_9pyscipopt_4scip_Variable *)o; __pyx_tp_clear_9pyscipopt_4scip_Expr(o); tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_8Variable_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8Variable_4name_1__get__(o); } static PyObject *__pyx_getprop_9pyscipopt_4scip_8Variable_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_8Variable_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_8Variable_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_8Variable_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_8Variable_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Variable[] = { {"ptr", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_1ptr, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_ptr}, {"vtype", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_5vtype, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_4vtype}, {"isOriginal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_7isOriginal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_6isOriginal}, {"isInLP", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_9isInLP, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_8isInLP}, {"getIndex", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_11getIndex, METH_NOARGS, 0}, {"getCol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_13getCol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_12getCol}, {"getLbOriginal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_15getLbOriginal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_14getLbOriginal}, {"getUbOriginal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_17getUbOriginal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_16getUbOriginal}, {"getLbGlobal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_19getLbGlobal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_18getLbGlobal}, {"getUbGlobal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_21getUbGlobal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_20getUbGlobal}, {"getLbLocal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_23getLbLocal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_22getLbLocal}, {"getUbLocal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_25getUbLocal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_24getUbLocal}, {"getObj", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_27getObj, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_26getObj}, {"getLPSol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_29getLPSol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_8Variable_28getLPSol}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_31__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_8Variable_33__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Variable[] = { {(char *)"name", __pyx_getprop_9pyscipopt_4scip_8Variable_name, 0, (char *)0, 0}, {(char *)"data", __pyx_getprop_9pyscipopt_4scip_8Variable_data, __pyx_setprop_9pyscipopt_4scip_8Variable_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Variable = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Variable", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Variable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Variable, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_8Variable_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Is a linear expression and has SCIP_VAR*", /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Variable, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Variable, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_9pyscipopt_4scip_4Expr_5__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_9pyscipopt_4scip_4Expr_7__next__, /*tp_iternext*/ #else 0, /*tp_iternext*/ #endif __pyx_methods_9pyscipopt_4scip_Variable, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Variable, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_9pyscipopt_4scip_4Expr_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Variable, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_9pyscipopt_4scip_Constraint __pyx_vtable_9pyscipopt_4scip_Constraint; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Constraint(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Constraint *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Constraint *)o); p->__pyx_vtab = __pyx_vtabptr_9pyscipopt_4scip_Constraint; p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Constraint(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Constraint *p = (struct __pyx_obj_9pyscipopt_4scip_Constraint *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Constraint(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Constraint *p = (struct __pyx_obj_9pyscipopt_4scip_Constraint *)o; if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Constraint(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Constraint *p = (struct __pyx_obj_9pyscipopt_4scip_Constraint *)o; tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_10Constraint_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_10Constraint_4name_1__get__(o); } static PyObject *__pyx_getprop_9pyscipopt_4scip_10Constraint_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_10Constraint_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_10Constraint_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_10Constraint_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_10Constraint_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Constraint[] = { {"isOriginal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_3isOriginal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_2isOriginal}, {"isInitial", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_5isInitial, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_4isInitial}, {"isSeparated", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_7isSeparated, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_6isSeparated}, {"isEnforced", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_9isEnforced, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_8isEnforced}, {"isChecked", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_11isChecked, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_10isChecked}, {"isPropagated", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_13isPropagated, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_12isPropagated}, {"isLocal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_15isLocal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_14isLocal}, {"isModifiable", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_17isModifiable, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_16isModifiable}, {"isDynamic", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_19isDynamic, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_18isDynamic}, {"isRemovable", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_21isRemovable, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_20isRemovable}, {"isStickingAtNode", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_23isStickingAtNode, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_22isStickingAtNode}, {"isLinear", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_25isLinear, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_24isLinear}, {"isQuadratic", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_27isQuadratic, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_10Constraint_26isQuadratic}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_29__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_10Constraint_31__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Constraint[] = { {(char *)"name", __pyx_getprop_9pyscipopt_4scip_10Constraint_name, 0, (char *)0, 0}, {(char *)"data", __pyx_getprop_9pyscipopt_4scip_10Constraint_data, __pyx_setprop_9pyscipopt_4scip_10Constraint_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Constraint = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Constraint", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Constraint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Constraint, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_9pyscipopt_4scip_10Constraint_1__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Constraint, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Constraint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Constraint, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Constraint, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Constraint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_9pyscipopt_4scip_Model(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_9pyscipopt_4scip_Model *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_9pyscipopt_4scip_Model *)o); p->_bestSol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); Py_INCREF(Py_None); p->data = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip_Model(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip_Model *p = (struct __pyx_obj_9pyscipopt_4scip_Model *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_9pyscipopt_4scip_5Model_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->_bestSol); Py_CLEAR(p->data); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_9pyscipopt_4scip_Model(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip_Model *p = (struct __pyx_obj_9pyscipopt_4scip_Model *)o; if (p->_bestSol) { e = (*v)(((PyObject *)p->_bestSol), a); if (e) return e; } if (p->data) { e = (*v)(p->data, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip_Model(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip_Model *p = (struct __pyx_obj_9pyscipopt_4scip_Model *)o; tmp = ((PyObject*)p->_bestSol); p->_bestSol = ((struct __pyx_obj_9pyscipopt_4scip_Solution *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->data); p->data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_9pyscipopt_4scip_5Model_data(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_9pyscipopt_4scip_5Model_4data_1__get__(o); } static int __pyx_setprop_9pyscipopt_4scip_5Model_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_9pyscipopt_4scip_5Model_4data_3__set__(o, v); } else { return __pyx_pw_9pyscipopt_4scip_5Model_4data_5__del__(o); } } static PyMethodDef __pyx_methods_9pyscipopt_4scip_Model[] = { {"create", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_5create, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_4create}, {"includeDefaultPlugins", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_7includeDefaultPlugins, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_6includeDefaultPlugins}, {"createProbBasic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_9createProbBasic, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_8createProbBasic}, {"freeProb", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_11freeProb, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_10freeProb}, {"freeTransform", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_13freeTransform, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_12freeTransform}, {"version", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_15version, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_14version}, {"printVersion", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_17printVersion, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_16printVersion}, {"getProbName", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_19getProbName, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_18getProbName}, {"getTotalTime", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_21getTotalTime, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_20getTotalTime}, {"getSolvingTime", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_23getSolvingTime, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_22getSolvingTime}, {"getReadingTime", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_25getReadingTime, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_24getReadingTime}, {"getPresolvingTime", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_27getPresolvingTime, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_26getPresolvingTime}, {"getNNodes", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_29getNNodes, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_28getNNodes}, {"getUpperbound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_31getUpperbound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_30getUpperbound}, {"getLowerbound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_33getLowerbound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_32getLowerbound}, {"getCurrentNode", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_35getCurrentNode, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_34getCurrentNode}, {"getNLPIterations", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_37getNLPIterations, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_36getNLPIterations}, {"getGap", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_39getGap, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_38getGap}, {"getDepth", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_41getDepth, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_40getDepth}, {"infinity", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_43infinity, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_42infinity}, {"epsilon", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_45epsilon, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_44epsilon}, {"feastol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_47feastol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_46feastol}, {"feasFrac", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_49feasFrac, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_48feasFrac}, {"frac", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_51frac, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_50frac}, {"isZero", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_53isZero, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_52isZero}, {"isFeasZero", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_55isFeasZero, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_54isFeasZero}, {"isInfinity", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_57isInfinity, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_56isInfinity}, {"isFeasNegative", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_59isFeasNegative, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_58isFeasNegative}, {"isFeasIntegral", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_61isFeasIntegral, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_60isFeasIntegral}, {"isLE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_63isLE, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_62isLE}, {"isLT", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_65isLT, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_64isLT}, {"isGE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_67isGE, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_66isGE}, {"isGT", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_69isGT, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_68isGT}, {"getCondition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_71getCondition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_70getCondition}, {"setMinimize", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_73setMinimize, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_72setMinimize}, {"setMaximize", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_75setMaximize, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_74setMaximize}, {"setObjlimit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_77setObjlimit, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_76setObjlimit}, {"getObjlimit", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_79getObjlimit, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_78getObjlimit}, {"setObjective", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_81setObjective, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_80setObjective}, {"getObjective", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_83getObjective, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_82getObjective}, {"addObjoffset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_85addObjoffset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_84addObjoffset}, {"getObjoffset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_87getObjoffset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_86getObjoffset}, {"setPresolve", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_89setPresolve, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_88setPresolve}, {"setProbName", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_91setProbName, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_90setProbName}, {"setSeparating", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_93setSeparating, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_92setSeparating}, {"setHeuristics", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_95setHeuristics, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_94setHeuristics}, {"disablePropagation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_97disablePropagation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_96disablePropagation}, {"writeProblem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_99writeProblem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_98writeProblem}, {"addVar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_101addVar, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_100addVar}, {"releaseVar", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_103releaseVar, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_102releaseVar}, {"getTransformedVar", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_105getTransformedVar, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_104getTransformedVar}, {"addVarLocks", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_107addVarLocks, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_106addVarLocks}, {"fixVar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_109fixVar, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_108fixVar}, {"delVar", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_111delVar, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_110delVar}, {"tightenVarLb", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_113tightenVarLb, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_112tightenVarLb}, {"tightenVarUb", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_115tightenVarUb, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_114tightenVarUb}, {"tightenVarUbGlobal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_117tightenVarUbGlobal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_116tightenVarUbGlobal}, {"tightenVarLbGlobal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_119tightenVarLbGlobal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_118tightenVarLbGlobal}, {"chgVarLb", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_121chgVarLb, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_120chgVarLb}, {"chgVarUb", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_123chgVarUb, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_122chgVarUb}, {"chgVarLbGlobal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_125chgVarLbGlobal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_124chgVarLbGlobal}, {"chgVarUbGlobal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_127chgVarUbGlobal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_126chgVarUbGlobal}, {"chgVarLbNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_129chgVarLbNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_128chgVarLbNode}, {"chgVarUbNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_131chgVarUbNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_130chgVarUbNode}, {"chgVarType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_133chgVarType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_132chgVarType}, {"getVars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_135getVars, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_134getVars}, {"getNVars", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_137getNVars, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_136getNVars}, {"getNConss", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_139getNConss, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_138getNConss}, {"updateNodeLowerbound", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_141updateNodeLowerbound, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_140updateNodeLowerbound}, {"getLPSolstat", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_143getLPSolstat, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_142getLPSolstat}, {"constructLP", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_145constructLP, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_144constructLP}, {"getLPObjVal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_147getLPObjVal, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_146getLPObjVal}, {"getLPColsData", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_149getLPColsData, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_148getLPColsData}, {"getLPRowsData", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_151getLPRowsData, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_150getLPRowsData}, {"getNLPRows", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_153getNLPRows, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_152getNLPRows}, {"getNLPCols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_155getNLPCols, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_154getNLPCols}, {"getLPBasisInd", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_157getLPBasisInd, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_156getLPBasisInd}, {"getLPBInvRow", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_159getLPBInvRow, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_158getLPBInvRow}, {"getLPBInvARow", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_161getLPBInvARow, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_160getLPBInvARow}, {"isLPSolBasic", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_163isLPSolBasic, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_162isLPSolBasic}, {"createEmptyRowSepa", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_165createEmptyRowSepa, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_164createEmptyRowSepa}, {"createEmptyRowUnspec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_167createEmptyRowUnspec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_166createEmptyRowUnspec}, {"getRowActivity", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_169getRowActivity, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_168getRowActivity}, {"getRowLPActivity", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_171getRowLPActivity, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_170getRowLPActivity}, {"releaseRow", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_173releaseRow, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_172releaseRow}, {"cacheRowExtensions", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_175cacheRowExtensions, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_174cacheRowExtensions}, {"flushRowExtensions", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_177flushRowExtensions, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_176flushRowExtensions}, {"addVarToRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_179addVarToRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_178addVarToRow}, {"printRow", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_181printRow, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_180printRow}, {"addPoolCut", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_183addPoolCut, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_182addPoolCut}, {"getCutEfficacy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_185getCutEfficacy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_184getCutEfficacy}, {"isCutEfficacious", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_187isCutEfficacious, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_186isCutEfficacious}, {"addCut", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_189addCut, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_188addCut}, {"getNCuts", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_191getNCuts, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_190getNCuts}, {"getNCutsApplied", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_193getNCutsApplied, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_192getNCutsApplied}, {"addCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_195addCons, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_194addCons}, {"_addLinCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_197_addLinCons, METH_VARARGS|METH_KEYWORDS, 0}, {"_addQuadCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_199_addQuadCons, METH_VARARGS|METH_KEYWORDS, 0}, {"_addNonlinearCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_201_addNonlinearCons, METH_VARARGS|METH_KEYWORDS, 0}, {"_addGenNonlinearCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_203_addGenNonlinearCons, METH_VARARGS|METH_KEYWORDS, 0}, {"addConsCoeff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_205addConsCoeff, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_204addConsCoeff}, {"addConsNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_207addConsNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_206addConsNode}, {"addConsLocal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_209addConsLocal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_208addConsLocal}, {"addConsSOS1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_211addConsSOS1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_210addConsSOS1}, {"addConsSOS2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_213addConsSOS2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_212addConsSOS2}, {"addConsAnd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_215addConsAnd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_214addConsAnd}, {"addConsOr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_217addConsOr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_216addConsOr}, {"addConsXor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_219addConsXor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_218addConsXor}, {"addConsCardinality", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_221addConsCardinality, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_220addConsCardinality}, {"addConsIndicator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_223addConsIndicator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_222addConsIndicator}, {"addPyCons", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_225addPyCons, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_224addPyCons}, {"addVarSOS1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_227addVarSOS1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_226addVarSOS1}, {"appendVarSOS1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_229appendVarSOS1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_228appendVarSOS1}, {"addVarSOS2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_231addVarSOS2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_230addVarSOS2}, {"appendVarSOS2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_233appendVarSOS2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_232appendVarSOS2}, {"setInitial", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_235setInitial, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_234setInitial}, {"setRemovable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_237setRemovable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_236setRemovable}, {"setEnforced", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_239setEnforced, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_238setEnforced}, {"setCheck", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_241setCheck, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_240setCheck}, {"chgRhs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_243chgRhs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_242chgRhs}, {"chgLhs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_245chgLhs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_244chgLhs}, {"getRhs", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_247getRhs, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_246getRhs}, {"getLhs", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_249getLhs, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_248getLhs}, {"getActivity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_251getActivity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_250getActivity}, {"getSlack", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_253getSlack, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_252getSlack}, {"getTransformedCons", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_255getTransformedCons, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_254getTransformedCons}, {"getTermsQuadratic", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_257getTermsQuadratic, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_256getTermsQuadratic}, {"setRelaxSolVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_259setRelaxSolVal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_258setRelaxSolVal}, {"getConss", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_261getConss, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_260getConss}, {"getNConss", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_263getNConss, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_262getNConss}, {"delCons", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_265delCons, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_264delCons}, {"delConsLocal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_267delConsLocal, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_266delConsLocal}, {"getValsLinear", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_269getValsLinear, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_268getValsLinear}, {"getDualMultiplier", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_271getDualMultiplier, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_270getDualMultiplier}, {"getDualsolLinear", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_273getDualsolLinear, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_272getDualsolLinear}, {"getDualfarkasLinear", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_275getDualfarkasLinear, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_274getDualfarkasLinear}, {"getVarRedcost", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_277getVarRedcost, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_276getVarRedcost}, {"optimize", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_279optimize, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_278optimize}, {"presolve", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_281presolve, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_280presolve}, {"initBendersDefault", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_283initBendersDefault, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_282initBendersDefault}, {"computeBestSolSubproblems", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_285computeBestSolSubproblems, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_284computeBestSolSubproblems}, {"freeBendersSubproblems", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_287freeBendersSubproblems, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_286freeBendersSubproblems}, {"updateBendersLowerbounds", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_289updateBendersLowerbounds, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_288updateBendersLowerbounds}, {"activateBenders", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_291activateBenders, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_290activateBenders}, {"addBendersSubproblem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_293addBendersSubproblem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_292addBendersSubproblem}, {"setupBendersSubproblem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_295setupBendersSubproblem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_294setupBendersSubproblem}, {"solveBendersSubproblem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_297solveBendersSubproblem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_296solveBendersSubproblem}, {"getBendersVar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_299getBendersVar, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_298getBendersVar}, {"includeEventhdlr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_301includeEventhdlr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_300includeEventhdlr}, {"includePricer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_303includePricer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_302includePricer}, {"includeConshdlr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_305includeConshdlr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_304includeConshdlr}, {"createCons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_307createCons, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_306createCons}, {"includePresol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_309includePresol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_308includePresol}, {"includeSepa", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_311includeSepa, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_310includeSepa}, {"includeProp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_313includeProp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_312includeProp}, {"includeHeur", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_315includeHeur, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_314includeHeur}, {"includeRelax", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_317includeRelax, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_316includeRelax}, {"includeBranchrule", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_319includeBranchrule, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_318includeBranchrule}, {"getChildren", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_321getChildren, METH_NOARGS, 0}, {"includeBenders", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_323includeBenders, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_322includeBenders}, {"includeBenderscut", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_325includeBenderscut, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_324includeBenderscut}, {"getLPBranchCands", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_327getLPBranchCands, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_326getLPBranchCands}, {"getPseudoBranchCands", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_329getPseudoBranchCands, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_328getPseudoBranchCands}, {"branchVar", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_331branchVar, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_330branchVar}, {"branchVarVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_333branchVarVal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_332branchVarVal}, {"calcNodeselPriority", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_335calcNodeselPriority, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_334calcNodeselPriority}, {"calcChildEstimate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_337calcChildEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_336calcChildEstimate}, {"createChild", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_339createChild, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_338createChild}, {"startDive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_341startDive, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_340startDive}, {"endDive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_343endDive, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_342endDive}, {"chgVarObjDive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_345chgVarObjDive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_344chgVarObjDive}, {"chgVarLbDive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_347chgVarLbDive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_346chgVarLbDive}, {"chgVarUbDive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_349chgVarUbDive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_348chgVarUbDive}, {"getVarLbDive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_351getVarLbDive, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_350getVarLbDive}, {"getVarUbDive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_353getVarUbDive, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_352getVarUbDive}, {"chgRowLhsDive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_355chgRowLhsDive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_354chgRowLhsDive}, {"chgRowRhsDive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_357chgRowRhsDive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_356chgRowRhsDive}, {"addRowDive", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_359addRowDive, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_358addRowDive}, {"solveDiveLP", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_361solveDiveLP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_360solveDiveLP}, {"inRepropagation", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_363inRepropagation, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_362inRepropagation}, {"startProbing", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_365startProbing, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_364startProbing}, {"endProbing", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_367endProbing, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_366endProbing}, {"chgVarObjProbing", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_369chgVarObjProbing, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_368chgVarObjProbing}, {"fixVarProbing", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_371fixVarProbing, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_370fixVarProbing}, {"isObjChangedProbing", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_373isObjChangedProbing, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_372isObjChangedProbing}, {"inProbing", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_375inProbing, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_374inProbing}, {"solveProbingLP", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_377solveProbingLP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_376solveProbingLP}, {"interruptSolve", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_379interruptSolve, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_378interruptSolve}, {"createSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_381createSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_380createSol}, {"printBestSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_383printBestSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_382printBestSol}, {"printSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_385printSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_384printSol}, {"writeBestSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_387writeBestSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_386writeBestSol}, {"writeSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_389writeSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_388writeSol}, {"readSol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_391readSol, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_390readSol}, {"readSolFile", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_393readSolFile, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_392readSolFile}, {"setSolVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_395setSolVal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_394setSolVal}, {"trySol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_397trySol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_396trySol}, {"checkSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_399checkSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_398checkSol}, {"addSol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_401addSol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_400addSol}, {"freeSol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_403freeSol, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_402freeSol}, {"getSols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_405getSols, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_404getSols}, {"getBestSol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_407getBestSol, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_406getBestSol}, {"getSolObjVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_409getSolObjVal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_408getSolObjVal}, {"getObjVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_411getObjVal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_410getObjVal}, {"getSolVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_413getSolVal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_412getSolVal}, {"getVal", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_415getVal, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_414getVal}, {"getPrimalbound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_417getPrimalbound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_416getPrimalbound}, {"getDualbound", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_419getDualbound, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_418getDualbound}, {"getDualboundRoot", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_421getDualboundRoot, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_420getDualboundRoot}, {"writeName", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_423writeName, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_422writeName}, {"getStage", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_425getStage, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_424getStage}, {"getStatus", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_427getStatus, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_426getStatus}, {"getObjectiveSense", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_429getObjectiveSense, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_428getObjectiveSense}, {"catchEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_431catchEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_430catchEvent}, {"dropEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_433dropEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_432dropEvent}, {"catchVarEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_435catchVarEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_434catchVarEvent}, {"dropVarEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_437dropVarEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_436dropVarEvent}, {"catchRowEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_439catchRowEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_438catchRowEvent}, {"dropRowEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_441dropRowEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_440dropRowEvent}, {"printStatistics", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_443printStatistics, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_442printStatistics}, {"writeStatistics", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_445writeStatistics, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_444writeStatistics}, {"getNLPs", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_447getNLPs, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_446getNLPs}, {"hideOutput", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_449hideOutput, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_448hideOutput}, {"redirectOutput", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_451redirectOutput, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_450redirectOutput}, {"setBoolParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_453setBoolParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_452setBoolParam}, {"setIntParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_455setIntParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_454setIntParam}, {"setLongintParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_457setLongintParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_456setLongintParam}, {"setRealParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_459setRealParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_458setRealParam}, {"setCharParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_461setCharParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_460setCharParam}, {"setStringParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_463setStringParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_462setStringParam}, {"setParam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_465setParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_464setParam}, {"getParam", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_467getParam, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_466getParam}, {"readParams", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_469readParams, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_468readParams}, {"writeParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_471writeParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_470writeParams}, {"resetParam", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_473resetParam, METH_O, __pyx_doc_9pyscipopt_4scip_5Model_472resetParam}, {"resetParams", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_475resetParams, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_474resetParams}, {"setEmphasis", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_477setEmphasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_476setEmphasis}, {"readProblem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_479readProblem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_478readProblem}, {"count", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_481count, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_480count}, {"getNCountedSols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_483getNCountedSols, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_482getNCountedSols}, {"setParamsCountsols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_485setParamsCountsols, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_484setParamsCountsols}, {"freeReoptSolve", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_487freeReoptSolve, METH_NOARGS, __pyx_doc_9pyscipopt_4scip_5Model_486freeReoptSolve}, {"chgReoptObjective", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_489chgReoptObjective, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_488chgReoptObjective}, {"getVariablePseudocost", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_491getVariablePseudocost, METH_O, 0}, {"includeNodesel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_493includeNodesel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pyscipopt_4scip_5Model_492includeNodesel}, {"getMapping", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_495getMapping, METH_NOARGS, 0}, {"getTimeSol", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_497getTimeSol, METH_NOARGS, 0}, {"getNPrimalSols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_499getNPrimalSols, METH_NOARGS, 0}, {"setup_ml_nodelsel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_501setup_ml_nodelsel, METH_VARARGS|METH_KEYWORDS, 0}, {"getState", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_503getState, METH_VARARGS|METH_KEYWORDS, 0}, {"getDingStateRows", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_505getDingStateRows, METH_NOARGS, 0}, {"getDingStateLPgraph", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_507getDingStateLPgraph, METH_NOARGS, 0}, {"getDingStateCols", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_509getDingStateCols, METH_NOARGS, 0}, {"getKhalilState", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_511getKhalilState, METH_VARARGS|METH_KEYWORDS, 0}, {"getSolvingStats", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_513getSolvingStats, METH_NOARGS, 0}, {"executeBranchRule", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pyscipopt_4scip_5Model_515executeBranchRule, METH_VARARGS|METH_KEYWORDS, 0}, {"getConsVals", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_517getConsVals, METH_NOARGS, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_519__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_9pyscipopt_4scip_5Model_521__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9pyscipopt_4scip_Model[] = { {(char *)"data", __pyx_getprop_9pyscipopt_4scip_5Model_data, __pyx_setprop_9pyscipopt_4scip_5Model_data, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_9pyscipopt_4scip_Model = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.Model", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip_Model), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip_Model, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip_Model, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip_Model, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9pyscipopt_4scip_Model, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9pyscipopt_4scip_Model, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_9pyscipopt_4scip_5Model_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip_Model, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct____init__[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct____init__ = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct____init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct____init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct____init__[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct____init__]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct____init__(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct____init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct____init__[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct____init__++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct____init__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *)o; if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct____init__(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__ = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct____init__", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct____init__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct____init__, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct____init__, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct____init__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct____init__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_1_genexpr[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_1_genexpr = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_1_genexpr[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_1_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_v); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_1_genexpr[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_v) { e = (*v)(p->__pyx_v_v, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_1_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_1_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_2_degree[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_2_degree = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_2_degree(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_2_degree > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_2_degree[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_2_degree]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_2_degree(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_2_degree < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_2_degree[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_2_degree++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_2_degree(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct_2_degree(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_9pyscipopt_4scip_Expr *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_2_degree", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_2_degree), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_2_degree, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_2_degree, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct_2_degree, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_2_degree, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_3_genexpr[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_3_genexpr = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_3_genexpr[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_3_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_3_genexpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_v); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_3_genexpr[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_v) { e = (*v)(p->__pyx_v_v, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_3_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_3_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_3_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_4_addCols[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_4_addCols = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_4_addCols(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_4_addCols > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_4_addCols[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_4_addCols]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_4_addCols(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_entrieslist); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_4_addCols < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_4_addCols[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_4_addCols++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_4_addCols(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *)o; if (p->__pyx_v_entrieslist) { e = (*v)(p->__pyx_v_entrieslist, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct_4_addCols(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols *)o; tmp = ((PyObject*)p->__pyx_v_entrieslist); p->__pyx_v_entrieslist = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_4_addCols", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_4_addCols), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_4_addCols, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_4_addCols, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct_4_addCols, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_4_addCols, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_5_genexpr[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_5_genexpr = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_5_genexpr[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_5_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_5_genexpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_entries); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_5_genexpr[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_entries) { e = (*v)(p->__pyx_v_entries, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_5_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_5_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_5_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_5_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_5_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_6_addRows[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_6_addRows = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_6_addRows(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_6_addRows > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_6_addRows[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_6_addRows]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_6_addRows(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_entrieslist); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_6_addRows < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_6_addRows[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_6_addRows++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_6_addRows(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *)o; if (p->__pyx_v_entrieslist) { e = (*v)(p->__pyx_v_entrieslist, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct_6_addRows(PyObject *o) { PyObject* tmp; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows *)o; tmp = ((PyObject*)p->__pyx_v_entrieslist); p->__pyx_v_entrieslist = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_6_addRows", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_6_addRows), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_6_addRows, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_6_addRows, /*tp_traverse*/ __pyx_tp_clear_9pyscipopt_4scip___pyx_scope_struct_6_addRows, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_6_addRows, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_7_genexpr[8]; static int __pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_7_genexpr = 0; static PyObject *__pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr)))) { o = (PyObject*)__pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_7_genexpr[--__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_7_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_7_genexpr(PyObject *o) { struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_entries); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr)))) { __pyx_freelist_9pyscipopt_4scip___pyx_scope_struct_7_genexpr[__pyx_freecount_9pyscipopt_4scip___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_entries) { e = (*v)(p->__pyx_v_entries, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr = { PyVarObject_HEAD_INIT(0, 0) "pyscipopt.scip.__pyx_scope_struct_7_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9pyscipopt_4scip___pyx_scope_struct_7_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9pyscipopt_4scip___pyx_scope_struct_7_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9pyscipopt_4scip___pyx_scope_struct_7_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9pyscipopt_4scip___pyx_scope_struct_7_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_scip(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_scip}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "scip", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, {&__pyx_n_s_AFTERLPLOOP, __pyx_k_AFTERLPLOOP, sizeof(__pyx_k_AFTERLPLOOP), 0, 0, 1, 1}, {&__pyx_n_s_AFTERLPNODE, __pyx_k_AFTERLPNODE, sizeof(__pyx_k_AFTERLPNODE), 0, 0, 1, 1}, {&__pyx_n_s_AFTERLPPLUNGE, __pyx_k_AFTERLPPLUNGE, sizeof(__pyx_k_AFTERLPPLUNGE), 0, 0, 1, 1}, {&__pyx_n_s_AFTERPROPLOOP, __pyx_k_AFTERPROPLOOP, sizeof(__pyx_k_AFTERPROPLOOP), 0, 0, 1, 1}, {&__pyx_n_s_AFTERPSEUDONODE, __pyx_k_AFTERPSEUDONODE, sizeof(__pyx_k_AFTERPSEUDONODE), 0, 0, 1, 1}, {&__pyx_n_s_AFTERPSEUDOPLUNGE, __pyx_k_AFTERPSEUDOPLUNGE, sizeof(__pyx_k_AFTERPSEUDOPLUNGE), 0, 0, 1, 1}, {&__pyx_n_s_AGGRESSIVE, __pyx_k_AGGRESSIVE, sizeof(__pyx_k_AGGRESSIVE), 0, 0, 1, 1}, {&__pyx_n_u_ANDcons, __pyx_k_ANDcons, sizeof(__pyx_k_ANDcons), 0, 1, 0, 1}, {&__pyx_n_s_AUTO, __pyx_k_AUTO, sizeof(__pyx_k_AUTO), 0, 0, 1, 1}, {&__pyx_n_u_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 1, 0, 1}, {&__pyx_n_s_BEFORELP, __pyx_k_BEFORELP, sizeof(__pyx_k_BEFORELP), 0, 0, 1, 1}, {&__pyx_n_s_BEFORENODE, __pyx_k_BEFORENODE, sizeof(__pyx_k_BEFORENODE), 0, 0, 1, 1}, {&__pyx_n_s_BEFOREPRESOL, __pyx_k_BEFOREPRESOL, sizeof(__pyx_k_BEFOREPRESOL), 0, 0, 1, 1}, {&__pyx_n_s_BESTSOLFOUND, __pyx_k_BESTSOLFOUND, sizeof(__pyx_k_BESTSOLFOUND), 0, 0, 1, 1}, {&__pyx_n_s_BESTSOLLIMIT, __pyx_k_BESTSOLLIMIT, sizeof(__pyx_k_BESTSOLLIMIT), 0, 0, 1, 1}, {&__pyx_n_u_BINARY, __pyx_k_BINARY, sizeof(__pyx_k_BINARY), 0, 1, 0, 1}, {&__pyx_n_s_BRANCHED, __pyx_k_BRANCHED, sizeof(__pyx_k_BRANCHED), 0, 0, 1, 1}, {&__pyx_n_s_Benders, __pyx_k_Benders, sizeof(__pyx_k_Benders), 0, 0, 1, 1}, {&__pyx_n_s_Benderscut, __pyx_k_Benderscut, sizeof(__pyx_k_Benderscut), 0, 0, 1, 1}, {&__pyx_n_s_Branchrule, __pyx_k_Branchrule, sizeof(__pyx_k_Branchrule), 0, 0, 1, 1}, {&__pyx_n_u_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 1, 0, 1}, {&__pyx_n_s_CHECK, __pyx_k_CHECK, sizeof(__pyx_k_CHECK), 0, 0, 1, 1}, {&__pyx_n_s_CHILD, __pyx_k_CHILD, sizeof(__pyx_k_CHILD), 0, 0, 1, 1}, {&__pyx_n_s_CONSADDED, __pyx_k_CONSADDED, sizeof(__pyx_k_CONSADDED), 0, 0, 1, 1}, {&__pyx_n_s_CONSCHANGED, __pyx_k_CONSCHANGED, sizeof(__pyx_k_CONSCHANGED), 0, 0, 1, 1}, {&__pyx_n_s_CONST, __pyx_k_CONST, sizeof(__pyx_k_CONST), 0, 0, 1, 1}, {&__pyx_n_u_CONTINUOUS, __pyx_k_CONTINUOUS, sizeof(__pyx_k_CONTINUOUS), 0, 1, 0, 1}, {&__pyx_n_s_COUNTER, __pyx_k_COUNTER, sizeof(__pyx_k_COUNTER), 0, 0, 1, 1}, {&__pyx_n_s_CPSOLVER, __pyx_k_CPSOLVER, sizeof(__pyx_k_CPSOLVER), 0, 0, 1, 1}, {&__pyx_n_s_CUTOFF, __pyx_k_CUTOFF, sizeof(__pyx_k_CUTOFF), 0, 0, 1, 1}, {&__pyx_kp_u_Can_t_evaluate_constraints_as_bo, __pyx_k_Can_t_evaluate_constraints_as_bo, sizeof(__pyx_k_Can_t_evaluate_constraints_as_bo), 0, 1, 0, 0}, {&__pyx_n_u_CardinalityCons, __pyx_k_CardinalityCons, sizeof(__pyx_k_CardinalityCons), 0, 1, 0, 1}, {&__pyx_n_s_Column, __pyx_k_Column, sizeof(__pyx_k_Column), 0, 0, 1, 1}, {&__pyx_n_s_Conshdlr, __pyx_k_Conshdlr, sizeof(__pyx_k_Conshdlr), 0, 0, 1, 1}, {&__pyx_n_s_Constant, __pyx_k_Constant, sizeof(__pyx_k_Constant), 0, 0, 1, 1}, {&__pyx_kp_u_Constant_offsets_in_objective_ar, __pyx_k_Constant_offsets_in_objective_ar, sizeof(__pyx_k_Constant_offsets_in_objective_ar), 0, 1, 0, 0}, {&__pyx_n_s_Constraint, __pyx_k_Constraint, sizeof(__pyx_k_Constraint), 0, 0, 1, 1}, {&__pyx_n_s_DEADEND, __pyx_k_DEADEND, sizeof(__pyx_k_DEADEND), 0, 0, 1, 1}, {&__pyx_n_s_DEFAULT, __pyx_k_DEFAULT, sizeof(__pyx_k_DEFAULT), 0, 0, 1, 1}, {&__pyx_n_s_DELAYED, __pyx_k_DELAYED, sizeof(__pyx_k_DELAYED), 0, 0, 1, 1}, {&__pyx_n_s_DIDNOTFIND, __pyx_k_DIDNOTFIND, sizeof(__pyx_k_DIDNOTFIND), 0, 0, 1, 1}, {&__pyx_n_s_DIDNOTRUN, __pyx_k_DIDNOTRUN, sizeof(__pyx_k_DIDNOTRUN), 0, 0, 1, 1}, {&__pyx_n_s_DISABLED, __pyx_k_DISABLED, sizeof(__pyx_k_DISABLED), 0, 0, 1, 1}, {&__pyx_n_s_DOWNWARDS, __pyx_k_DOWNWARDS, sizeof(__pyx_k_DOWNWARDS), 0, 0, 1, 1}, {&__pyx_n_s_DURINGLPLOOP, __pyx_k_DURINGLPLOOP, sizeof(__pyx_k_DURINGLPLOOP), 0, 0, 1, 1}, {&__pyx_n_s_DURINGPRESOLLOOP, __pyx_k_DURINGPRESOLLOOP, sizeof(__pyx_k_DURINGPRESOLLOOP), 0, 0, 1, 1}, {&__pyx_n_s_DURINGPRICINGLOOP, __pyx_k_DURINGPRICINGLOOP, sizeof(__pyx_k_DURINGPRICINGLOOP), 0, 0, 1, 1}, {&__pyx_n_s_EASYCIP, __pyx_k_EASYCIP, sizeof(__pyx_k_EASYCIP), 0, 0, 1, 1}, {&__pyx_n_s_ERROR, __pyx_k_ERROR, sizeof(__pyx_k_ERROR), 0, 0, 1, 1}, {&__pyx_n_s_EXHAUSTIVE, __pyx_k_EXHAUSTIVE, sizeof(__pyx_k_EXHAUSTIVE), 0, 0, 1, 1}, {&__pyx_n_s_EXITPRESOLVE, __pyx_k_EXITPRESOLVE, sizeof(__pyx_k_EXITPRESOLVE), 0, 0, 1, 1}, {&__pyx_n_s_EXITSOLVE, __pyx_k_EXITSOLVE, sizeof(__pyx_k_EXITSOLVE), 0, 0, 1, 1}, {&__pyx_kp_u_Error_branching_rule_not_found, __pyx_k_Error_branching_rule_not_found, sizeof(__pyx_k_Error_branching_rule_not_found), 0, 1, 0, 0}, {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1}, {&__pyx_n_s_Eventhdlr, __pyx_k_Eventhdlr, sizeof(__pyx_k_Eventhdlr), 0, 0, 1, 1}, {&__pyx_n_s_Expr, __pyx_k_Expr, sizeof(__pyx_k_Expr), 0, 0, 1, 1}, {&__pyx_kp_u_ExprCons, __pyx_k_ExprCons, sizeof(__pyx_k_ExprCons), 0, 1, 0, 0}, {&__pyx_n_s_ExprCons_2, __pyx_k_ExprCons_2, sizeof(__pyx_k_ExprCons_2), 0, 0, 1, 1}, {&__pyx_kp_u_ExprCons_already_has_lower_bound, __pyx_k_ExprCons_already_has_lower_bound, sizeof(__pyx_k_ExprCons_already_has_lower_bound), 0, 1, 0, 0}, {&__pyx_kp_u_ExprCons_already_has_upper_bound, __pyx_k_ExprCons_already_has_upper_bound, sizeof(__pyx_k_ExprCons_already_has_upper_bound), 0, 1, 0, 0}, {&__pyx_kp_u_Expr_s, __pyx_k_Expr_s, sizeof(__pyx_k_Expr_s), 0, 1, 0, 0}, {&__pyx_n_s_FAST, __pyx_k_FAST, sizeof(__pyx_k_FAST), 0, 0, 1, 1}, {&__pyx_n_s_FEASIBILITY, __pyx_k_FEASIBILITY, sizeof(__pyx_k_FEASIBILITY), 0, 0, 1, 1}, {&__pyx_n_s_FEASIBLE, __pyx_k_FEASIBLE, sizeof(__pyx_k_FEASIBLE), 0, 0, 1, 1}, {&__pyx_n_s_FIRSTLPSOLVED, __pyx_k_FIRSTLPSOLVED, sizeof(__pyx_k_FIRSTLPSOLVED), 0, 0, 1, 1}, {&__pyx_n_s_FIXED, __pyx_k_FIXED, sizeof(__pyx_k_FIXED), 0, 0, 1, 1}, {&__pyx_n_s_FOCUSNODE, __pyx_k_FOCUSNODE, sizeof(__pyx_k_FOCUSNODE), 0, 0, 1, 1}, {&__pyx_n_s_FORK, __pyx_k_FORK, sizeof(__pyx_k_FORK), 0, 0, 1, 1}, {&__pyx_n_s_FOUNDSOL, __pyx_k_FOUNDSOL, sizeof(__pyx_k_FOUNDSOL), 0, 0, 1, 1}, {&__pyx_n_s_FREE, __pyx_k_FREE, sizeof(__pyx_k_FREE), 0, 0, 1, 1}, {&__pyx_n_s_FREETRANS, __pyx_k_FREETRANS, sizeof(__pyx_k_FREETRANS), 0, 0, 1, 1}, {&__pyx_n_s_GAPLIMIT, __pyx_k_GAPLIMIT, sizeof(__pyx_k_GAPLIMIT), 0, 0, 1, 1}, {&__pyx_n_s_GHOLEADDED, __pyx_k_GHOLEADDED, sizeof(__pyx_k_GHOLEADDED), 0, 0, 1, 1}, {&__pyx_n_s_GHOLEREMOVED, __pyx_k_GHOLEREMOVED, sizeof(__pyx_k_GHOLEREMOVED), 0, 0, 1, 1}, {&__pyx_n_s_GLBCHANGED, __pyx_k_GLBCHANGED, sizeof(__pyx_k_GLBCHANGED), 0, 0, 1, 1}, {&__pyx_n_s_GUBCHANGED, __pyx_k_GUBCHANGED, sizeof(__pyx_k_GUBCHANGED), 0, 0, 1, 1}, {&__pyx_n_s_GenExpr, __pyx_k_GenExpr, sizeof(__pyx_k_GenExpr), 0, 0, 1, 1}, {&__pyx_n_s_HARDLP, __pyx_k_HARDLP, sizeof(__pyx_k_HARDLP), 0, 0, 1, 1}, {&__pyx_n_s_Heur, __pyx_k_Heur, sizeof(__pyx_k_Heur), 0, 0, 1, 1}, {&__pyx_n_u_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 1, 0, 1}, {&__pyx_n_s_IMPLADDED, __pyx_k_IMPLADDED, sizeof(__pyx_k_IMPLADDED), 0, 0, 1, 1}, {&__pyx_n_s_INFEASIBLE, __pyx_k_INFEASIBLE, sizeof(__pyx_k_INFEASIBLE), 0, 0, 1, 1}, {&__pyx_n_s_INFORUNBD, __pyx_k_INFORUNBD, sizeof(__pyx_k_INFORUNBD), 0, 0, 1, 1}, {&__pyx_n_s_INIT, __pyx_k_INIT, sizeof(__pyx_k_INIT), 0, 0, 1, 1}, {&__pyx_n_s_INITPRESOLVE, __pyx_k_INITPRESOLVE, sizeof(__pyx_k_INITPRESOLVE), 0, 0, 1, 1}, {&__pyx_n_s_INITSOLVE, __pyx_k_INITSOLVE, sizeof(__pyx_k_INITSOLVE), 0, 0, 1, 1}, {&__pyx_n_u_INTEGER, __pyx_k_INTEGER, sizeof(__pyx_k_INTEGER), 0, 1, 0, 1}, {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1}, {&__pyx_n_s_ITERLIMIT, __pyx_k_ITERLIMIT, sizeof(__pyx_k_ITERLIMIT), 0, 0, 1, 1}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_k_Incompatible_checksums_s_vs_0x20, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x20), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_k_Incompatible_checksums_s_vs_0x6f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x6f), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x88, __pyx_k_Incompatible_checksums_s_vs_0x88, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x88), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x8f, __pyx_k_Incompatible_checksums_s_vs_0x8f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x8f), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x9b, __pyx_k_Incompatible_checksums_s_vs_0x9b, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x9b), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xa0, __pyx_k_Incompatible_checksums_s_vs_0xa0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa0), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb3, __pyx_k_Incompatible_checksums_s_vs_0xb3, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb3), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xba, __pyx_k_Incompatible_checksums_s_vs_0xba, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xba), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xec, __pyx_k_Incompatible_checksums_s_vs_0xec, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xec), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xfe, __pyx_k_Incompatible_checksums_s_vs_0xfe, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xfe), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xfe_2, __pyx_k_Incompatible_checksums_s_vs_0xfe_2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xfe_2), 0, 0, 1, 0}, {&__pyx_n_u_IndicatorCons, __pyx_k_IndicatorCons, sizeof(__pyx_k_IndicatorCons), 0, 1, 0, 1}, {&__pyx_n_s_JUNCTION, __pyx_k_JUNCTION, sizeof(__pyx_k_JUNCTION), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_n_s_LBRELAXED, __pyx_k_LBRELAXED, sizeof(__pyx_k_LBRELAXED), 0, 0, 1, 1}, {&__pyx_n_s_LBTIGHTENED, __pyx_k_LBTIGHTENED, sizeof(__pyx_k_LBTIGHTENED), 0, 0, 1, 1}, {&__pyx_n_s_LEAF, __pyx_k_LEAF, sizeof(__pyx_k_LEAF), 0, 0, 1, 1}, {&__pyx_n_s_LHOLEADDED, __pyx_k_LHOLEADDED, sizeof(__pyx_k_LHOLEADDED), 0, 0, 1, 1}, {&__pyx_n_s_LHOLEREMOVED, __pyx_k_LHOLEREMOVED, sizeof(__pyx_k_LHOLEREMOVED), 0, 0, 1, 1}, {&__pyx_n_s_LP, __pyx_k_LP, sizeof(__pyx_k_LP), 0, 0, 1, 1}, {&__pyx_n_u_LP, __pyx_k_LP, sizeof(__pyx_k_LP), 0, 1, 0, 1}, {&__pyx_n_s_LPEVENT, __pyx_k_LPEVENT, sizeof(__pyx_k_LPEVENT), 0, 0, 1, 1}, {&__pyx_n_s_LPSOLVED, __pyx_k_LPSOLVED, sizeof(__pyx_k_LPSOLVED), 0, 0, 1, 1}, {&__pyx_n_s_LookupError, __pyx_k_LookupError, sizeof(__pyx_k_LookupError), 0, 0, 1, 1}, {&__pyx_n_s_MAJOR, __pyx_k_MAJOR, sizeof(__pyx_k_MAJOR), 0, 0, 1, 1}, {&__pyx_n_s_MEDIUM, __pyx_k_MEDIUM, sizeof(__pyx_k_MEDIUM), 0, 0, 1, 1}, {&__pyx_n_s_MEMLIMIT, __pyx_k_MEMLIMIT, sizeof(__pyx_k_MEMLIMIT), 0, 0, 1, 1}, {&__pyx_n_s_MINOR, __pyx_k_MINOR, sizeof(__pyx_k_MINOR), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_Model, __pyx_k_Model, sizeof(__pyx_k_Model), 0, 0, 1, 1}, {&__pyx_n_s_NEWROUND, __pyx_k_NEWROUND, sizeof(__pyx_k_NEWROUND), 0, 0, 1, 1}, {&__pyx_n_s_NODEBRANCHED, __pyx_k_NODEBRANCHED, sizeof(__pyx_k_NODEBRANCHED), 0, 0, 1, 1}, {&__pyx_n_s_NODEFEASIBLE, __pyx_k_NODEFEASIBLE, sizeof(__pyx_k_NODEFEASIBLE), 0, 0, 1, 1}, {&__pyx_n_s_NODEFOCUSED, __pyx_k_NODEFOCUSED, sizeof(__pyx_k_NODEFOCUSED), 0, 0, 1, 1}, {&__pyx_n_s_NODEINFEASIBLE, __pyx_k_NODEINFEASIBLE, sizeof(__pyx_k_NODEINFEASIBLE), 0, 0, 1, 1}, {&__pyx_n_s_NODELIMIT, __pyx_k_NODELIMIT, sizeof(__pyx_k_NODELIMIT), 0, 0, 1, 1}, {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1}, {&__pyx_n_s_NOTSOLVED, __pyx_k_NOTSOLVED, sizeof(__pyx_k_NOTSOLVED), 0, 0, 1, 1}, {&__pyx_n_s_Node, __pyx_k_Node, sizeof(__pyx_k_Node), 0, 0, 1, 1}, {&__pyx_n_s_Nodesel, __pyx_k_Nodesel, sizeof(__pyx_k_Nodesel), 0, 0, 1, 1}, {&__pyx_kp_u_Nonlinear_objective_functions_ar, __pyx_k_Nonlinear_objective_functions_ar, sizeof(__pyx_k_Nonlinear_objective_functions_ar), 0, 1, 0, 0}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_kp_u_Not_a_valid_parameter_name, __pyx_k_Not_a_valid_parameter_name, sizeof(__pyx_k_Not_a_valid_parameter_name), 0, 1, 0, 0}, {&__pyx_n_s_OBJCHANGED, __pyx_k_OBJCHANGED, sizeof(__pyx_k_OBJCHANGED), 0, 0, 1, 1}, {&__pyx_n_s_OBJLIMIT, __pyx_k_OBJLIMIT, sizeof(__pyx_k_OBJLIMIT), 0, 0, 1, 1}, {&__pyx_n_s_OFF, __pyx_k_OFF, sizeof(__pyx_k_OFF), 0, 0, 1, 1}, {&__pyx_n_s_OPTIMAL, __pyx_k_OPTIMAL, sizeof(__pyx_k_OPTIMAL), 0, 0, 1, 1}, {&__pyx_n_s_OPTIMALITY, __pyx_k_OPTIMALITY, sizeof(__pyx_k_OPTIMALITY), 0, 0, 1, 1}, {&__pyx_n_u_ORcons, __pyx_k_ORcons, sizeof(__pyx_k_ORcons), 0, 1, 0, 1}, {&__pyx_n_s_Op, __pyx_k_Op, sizeof(__pyx_k_Op), 0, 0, 1, 1}, {&__pyx_n_s_Op_getOpIndex, __pyx_k_Op_getOpIndex, sizeof(__pyx_k_Op_getOpIndex), 0, 0, 1, 1}, {&__pyx_n_s_Operator, __pyx_k_Operator, sizeof(__pyx_k_Operator), 0, 0, 1, 1}, {&__pyx_n_s_PATCH, __pyx_k_PATCH, sizeof(__pyx_k_PATCH), 0, 0, 1, 1}, {&__pyx_n_s_PHASEFEAS, __pyx_k_PHASEFEAS, sizeof(__pyx_k_PHASEFEAS), 0, 0, 1, 1}, {&__pyx_n_s_PHASEIMPROVE, __pyx_k_PHASEIMPROVE, sizeof(__pyx_k_PHASEIMPROVE), 0, 0, 1, 1}, {&__pyx_n_s_PHASEPROOF, __pyx_k_PHASEPROOF, sizeof(__pyx_k_PHASEPROOF), 0, 0, 1, 1}, {&__pyx_n_s_POORSOLFOUND, __pyx_k_POORSOLFOUND, sizeof(__pyx_k_POORSOLFOUND), 0, 0, 1, 1}, {&__pyx_n_s_PRESOLVED, __pyx_k_PRESOLVED, sizeof(__pyx_k_PRESOLVED), 0, 0, 1, 1}, {&__pyx_n_s_PRESOLVEROUND, __pyx_k_PRESOLVEROUND, sizeof(__pyx_k_PRESOLVEROUND), 0, 0, 1, 1}, {&__pyx_n_s_PRESOLVING, __pyx_k_PRESOLVING, sizeof(__pyx_k_PRESOLVING), 0, 0, 1, 1}, {&__pyx_n_s_PROBINGNODE, __pyx_k_PROBINGNODE, sizeof(__pyx_k_PROBINGNODE), 0, 0, 1, 1}, {&__pyx_n_s_PROBLEM, __pyx_k_PROBLEM, sizeof(__pyx_k_PROBLEM), 0, 0, 1, 1}, {&__pyx_n_s_PSEUDO, __pyx_k_PSEUDO, sizeof(__pyx_k_PSEUDO), 0, 0, 1, 1}, {&__pyx_n_s_PSEUDOFORK, __pyx_k_PSEUDOFORK, sizeof(__pyx_k_PSEUDOFORK), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_BENDERSENFOTYPE, __pyx_k_PY_SCIP_BENDERSENFOTYPE, sizeof(__pyx_k_PY_SCIP_BENDERSENFOTYPE), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_BRANCHDIR, __pyx_k_PY_SCIP_BRANCHDIR, sizeof(__pyx_k_PY_SCIP_BRANCHDIR), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_CALL, __pyx_k_PY_SCIP_CALL, sizeof(__pyx_k_PY_SCIP_CALL), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_EVENTTYPE, __pyx_k_PY_SCIP_EVENTTYPE, sizeof(__pyx_k_PY_SCIP_EVENTTYPE), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_HEURTIMING, __pyx_k_PY_SCIP_HEURTIMING, sizeof(__pyx_k_PY_SCIP_HEURTIMING), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_LPSOLSTAT, __pyx_k_PY_SCIP_LPSOLSTAT, sizeof(__pyx_k_PY_SCIP_LPSOLSTAT), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_NODETYPE, __pyx_k_PY_SCIP_NODETYPE, sizeof(__pyx_k_PY_SCIP_NODETYPE), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_PARAMEMPHASIS, __pyx_k_PY_SCIP_PARAMEMPHASIS, sizeof(__pyx_k_PY_SCIP_PARAMEMPHASIS), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_PARAMSETTING, __pyx_k_PY_SCIP_PARAMSETTING, sizeof(__pyx_k_PY_SCIP_PARAMSETTING), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_PRESOLTIMING, __pyx_k_PY_SCIP_PRESOLTIMING, sizeof(__pyx_k_PY_SCIP_PRESOLTIMING), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_PROPTIMING, __pyx_k_PY_SCIP_PROPTIMING, sizeof(__pyx_k_PY_SCIP_PROPTIMING), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_RESULT, __pyx_k_PY_SCIP_RESULT, sizeof(__pyx_k_PY_SCIP_RESULT), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_STAGE, __pyx_k_PY_SCIP_STAGE, sizeof(__pyx_k_PY_SCIP_STAGE), 0, 0, 1, 1}, {&__pyx_n_s_PY_SCIP_STATUS, __pyx_k_PY_SCIP_STATUS, sizeof(__pyx_k_PY_SCIP_STATUS), 0, 0, 1, 1}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_PowExpr, __pyx_k_PowExpr, sizeof(__pyx_k_PowExpr), 0, 0, 1, 1}, {&__pyx_n_s_Presol, __pyx_k_Presol, sizeof(__pyx_k_Presol), 0, 0, 1, 1}, {&__pyx_n_s_Pricer, __pyx_k_Pricer, sizeof(__pyx_k_Pricer), 0, 0, 1, 1}, {&__pyx_n_s_ProdExpr, __pyx_k_ProdExpr, sizeof(__pyx_k_ProdExpr), 0, 0, 1, 1}, {&__pyx_n_s_Prop, __pyx_k_Prop, sizeof(__pyx_k_Prop), 0, 0, 1, 1}, {&__pyx_kp_u_Provide_BOOLEAN_value_as_rhsvar, __pyx_k_Provide_BOOLEAN_value_as_rhsvar, sizeof(__pyx_k_Provide_BOOLEAN_value_as_rhsvar), 0, 1, 0, 0}, {&__pyx_n_s_REDUCEDDOM, __pyx_k_REDUCEDDOM, sizeof(__pyx_k_REDUCEDDOM), 0, 0, 1, 1}, {&__pyx_n_s_REFOCUSNODE, __pyx_k_REFOCUSNODE, sizeof(__pyx_k_REFOCUSNODE), 0, 0, 1, 1}, {&__pyx_n_s_RELAX, __pyx_k_RELAX, sizeof(__pyx_k_RELAX), 0, 0, 1, 1}, {&__pyx_n_s_RESTARTLIMIT, __pyx_k_RESTARTLIMIT, sizeof(__pyx_k_RESTARTLIMIT), 0, 0, 1, 1}, {&__pyx_n_s_ROWADDEDLP, __pyx_k_ROWADDEDLP, sizeof(__pyx_k_ROWADDEDLP), 0, 0, 1, 1}, {&__pyx_n_s_ROWADDEDSEPA, __pyx_k_ROWADDEDSEPA, sizeof(__pyx_k_ROWADDEDSEPA), 0, 0, 1, 1}, {&__pyx_n_s_ROWCOEFCHANGED, __pyx_k_ROWCOEFCHANGED, sizeof(__pyx_k_ROWCOEFCHANGED), 0, 0, 1, 1}, {&__pyx_n_s_ROWCONSTCHANGED, __pyx_k_ROWCONSTCHANGED, sizeof(__pyx_k_ROWCONSTCHANGED), 0, 0, 1, 1}, {&__pyx_n_s_ROWDELETEDLP, __pyx_k_ROWDELETEDLP, sizeof(__pyx_k_ROWDELETEDLP), 0, 0, 1, 1}, {&__pyx_n_s_ROWDELETEDSEPA, __pyx_k_ROWDELETEDSEPA, sizeof(__pyx_k_ROWDELETEDSEPA), 0, 0, 1, 1}, {&__pyx_n_s_ROWSIDECHANGED, __pyx_k_ROWSIDECHANGED, sizeof(__pyx_k_ROWSIDECHANGED), 0, 0, 1, 1}, {&__pyx_kp_u_Ranged_ExprCons_is_not_well_defi, __pyx_k_Ranged_ExprCons_is_not_well_defi, sizeof(__pyx_k_Ranged_ExprCons_is_not_well_defi), 0, 1, 0, 0}, {&__pyx_n_s_Relax, __pyx_k_Relax, sizeof(__pyx_k_Relax), 0, 0, 1, 1}, {&__pyx_n_s_Row, __pyx_k_Row, sizeof(__pyx_k_Row), 0, 0, 1, 1}, {&__pyx_kp_u_SCIP_a_required_plugin_was_not_f, __pyx_k_SCIP_a_required_plugin_was_not_f, sizeof(__pyx_k_SCIP_a_required_plugin_was_not_f), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_cannot_create_file, __pyx_k_SCIP_cannot_create_file, sizeof(__pyx_k_SCIP_cannot_create_file), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_error_in_LP_solver, __pyx_k_SCIP_error_in_LP_solver, sizeof(__pyx_k_SCIP_error_in_LP_solver), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_error_in_input_data, __pyx_k_SCIP_error_in_input_data, sizeof(__pyx_k_SCIP_error_in_input_data), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_file_not_found_error, __pyx_k_SCIP_file_not_found_error, sizeof(__pyx_k_SCIP_file_not_found_error), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_insufficient_memory_error, __pyx_k_SCIP_insufficient_memory_error, sizeof(__pyx_k_SCIP_insufficient_memory_error), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_maximal_branching_depth_lev, __pyx_k_SCIP_maximal_branching_depth_lev, sizeof(__pyx_k_SCIP_maximal_branching_depth_lev), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_method_cannot_be_called_at, __pyx_k_SCIP_method_cannot_be_called_at, sizeof(__pyx_k_SCIP_method_cannot_be_called_at), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_method_returned_an_invalid, __pyx_k_SCIP_method_returned_an_invalid, sizeof(__pyx_k_SCIP_method_returned_an_invalid), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_no_problem_exists, __pyx_k_SCIP_no_problem_exists, sizeof(__pyx_k_SCIP_no_problem_exists), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_read_error, __pyx_k_SCIP_read_error, sizeof(__pyx_k_SCIP_read_error), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_reading_solution_from_file, __pyx_k_SCIP_reading_solution_from_file, sizeof(__pyx_k_SCIP_reading_solution_from_file), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_returned_base_status_zero_f, __pyx_k_SCIP_returned_base_status_zero_f, sizeof(__pyx_k_SCIP_returned_base_status_zero_f), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_returned_unknown_base_statu, __pyx_k_SCIP_returned_unknown_base_statu, sizeof(__pyx_k_SCIP_returned_unknown_base_statu), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_the_given_key_is_already_ex, __pyx_k_SCIP_the_given_key_is_already_ex, sizeof(__pyx_k_SCIP_the_given_key_is_already_ex), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_the_parameter_is_not_of_the, __pyx_k_SCIP_the_parameter_is_not_of_the, sizeof(__pyx_k_SCIP_the_parameter_is_not_of_the), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_the_parameter_with_the_give, __pyx_k_SCIP_the_parameter_with_the_give, sizeof(__pyx_k_SCIP_the_parameter_with_the_give), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_the_value_is_invalid_for_th, __pyx_k_SCIP_the_value_is_invalid_for_th, sizeof(__pyx_k_SCIP_the_value_is_invalid_for_th), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_unknown_return_code, __pyx_k_SCIP_unknown_return_code, sizeof(__pyx_k_SCIP_unknown_return_code), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_unspecified_error, __pyx_k_SCIP_unspecified_error, sizeof(__pyx_k_SCIP_unspecified_error), 0, 1, 0, 0}, {&__pyx_kp_u_SCIP_write_error, __pyx_k_SCIP_write_error, sizeof(__pyx_k_SCIP_write_error), 0, 1, 0, 0}, {&__pyx_n_s_SEPARATED, __pyx_k_SEPARATED, sizeof(__pyx_k_SEPARATED), 0, 0, 1, 1}, {&__pyx_n_s_SIBLING, __pyx_k_SIBLING, sizeof(__pyx_k_SIBLING), 0, 0, 1, 1}, {&__pyx_n_s_SOLLIMIT, __pyx_k_SOLLIMIT, sizeof(__pyx_k_SOLLIMIT), 0, 0, 1, 1}, {&__pyx_n_s_SOLVED, __pyx_k_SOLVED, sizeof(__pyx_k_SOLVED), 0, 0, 1, 1}, {&__pyx_n_s_SOLVELP, __pyx_k_SOLVELP, sizeof(__pyx_k_SOLVELP), 0, 0, 1, 1}, {&__pyx_n_s_SOLVING, __pyx_k_SOLVING, sizeof(__pyx_k_SOLVING), 0, 0, 1, 1}, {&__pyx_n_u_SOS1cons, __pyx_k_SOS1cons, sizeof(__pyx_k_SOS1cons), 0, 1, 0, 1}, {&__pyx_n_u_SOS2cons, __pyx_k_SOS2cons, sizeof(__pyx_k_SOS2cons), 0, 1, 0, 1}, {&__pyx_n_s_STALLNODELIMIT, __pyx_k_STALLNODELIMIT, sizeof(__pyx_k_STALLNODELIMIT), 0, 0, 1, 1}, {&__pyx_n_s_SUBROOT, __pyx_k_SUBROOT, sizeof(__pyx_k_SUBROOT), 0, 0, 1, 1}, {&__pyx_n_s_SUCCESS, __pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 0, 1, 1}, {&__pyx_n_s_SUSPENDED, __pyx_k_SUSPENDED, sizeof(__pyx_k_SUSPENDED), 0, 0, 1, 1}, {&__pyx_n_s_SYNC, __pyx_k_SYNC, sizeof(__pyx_k_SYNC), 0, 0, 1, 1}, {&__pyx_n_s_Sepa, __pyx_k_Sepa, sizeof(__pyx_k_Sepa), 0, 0, 1, 1}, {&__pyx_n_s_Solution, __pyx_k_Solution, sizeof(__pyx_k_Solution), 0, 0, 1, 1}, {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, {&__pyx_n_s_SumExpr, __pyx_k_SumExpr, sizeof(__pyx_k_SumExpr), 0, 0, 1, 1}, {&__pyx_n_s_TIMELIMIT, __pyx_k_TIMELIMIT, sizeof(__pyx_k_TIMELIMIT), 0, 0, 1, 1}, {&__pyx_n_s_TOTALNODELIMIT, __pyx_k_TOTALNODELIMIT, sizeof(__pyx_k_TOTALNODELIMIT), 0, 0, 1, 1}, {&__pyx_n_s_TRANSFORMED, __pyx_k_TRANSFORMED, sizeof(__pyx_k_TRANSFORMED), 0, 0, 1, 1}, {&__pyx_n_s_TRANSFORMING, __pyx_k_TRANSFORMING, sizeof(__pyx_k_TRANSFORMING), 0, 0, 1, 1}, {&__pyx_n_s_Term, __pyx_k_Term, sizeof(__pyx_k_Term), 0, 0, 1, 1}, {&__pyx_n_s_Term___add, __pyx_k_Term___add, sizeof(__pyx_k_Term___add), 0, 0, 1, 1}, {&__pyx_n_s_Term___eq, __pyx_k_Term___eq, sizeof(__pyx_k_Term___eq), 0, 0, 1, 1}, {&__pyx_n_s_Term___getitem, __pyx_k_Term___getitem, sizeof(__pyx_k_Term___getitem), 0, 0, 1, 1}, {&__pyx_n_s_Term___hash, __pyx_k_Term___hash, sizeof(__pyx_k_Term___hash), 0, 0, 1, 1}, {&__pyx_n_s_Term___init, __pyx_k_Term___init, sizeof(__pyx_k_Term___init), 0, 0, 1, 1}, {&__pyx_n_s_Term___init___locals_genexpr, __pyx_k_Term___init___locals_genexpr, sizeof(__pyx_k_Term___init___locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_Term___init___locals_lambda, __pyx_k_Term___init___locals_lambda, sizeof(__pyx_k_Term___init___locals_lambda), 0, 0, 1, 1}, {&__pyx_n_s_Term___len, __pyx_k_Term___len, sizeof(__pyx_k_Term___len), 0, 0, 1, 1}, {&__pyx_n_s_Term___repr, __pyx_k_Term___repr, sizeof(__pyx_k_Term___repr), 0, 0, 1, 1}, {&__pyx_kp_u_Term_s, __pyx_k_Term_s, sizeof(__pyx_k_Term_s), 0, 1, 0, 0}, {&__pyx_kp_s_This_is_a_monomial_term, __pyx_k_This_is_a_monomial_term, sizeof(__pyx_k_This_is_a_monomial_term), 0, 0, 1, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_UBRELAXED, __pyx_k_UBRELAXED, sizeof(__pyx_k_UBRELAXED), 0, 0, 1, 1}, {&__pyx_n_s_UBTIGHTENED, __pyx_k_UBTIGHTENED, sizeof(__pyx_k_UBTIGHTENED), 0, 0, 1, 1}, {&__pyx_n_s_UNBOUNDED, __pyx_k_UNBOUNDED, sizeof(__pyx_k_UNBOUNDED), 0, 0, 1, 1}, {&__pyx_n_s_UNBOUNDEDRAY, __pyx_k_UNBOUNDEDRAY, sizeof(__pyx_k_UNBOUNDEDRAY), 0, 0, 1, 1}, {&__pyx_n_s_UNKNOWN, __pyx_k_UNKNOWN, sizeof(__pyx_k_UNKNOWN), 0, 0, 1, 1}, {&__pyx_n_s_UPWARDS, __pyx_k_UPWARDS, sizeof(__pyx_k_UPWARDS), 0, 0, 1, 1}, {&__pyx_n_s_USERINTERRUPT, __pyx_k_USERINTERRUPT, sizeof(__pyx_k_USERINTERRUPT), 0, 0, 1, 1}, {&__pyx_n_s_UnaryExpr, __pyx_k_UnaryExpr, sizeof(__pyx_k_UnaryExpr), 0, 0, 1, 1}, {&__pyx_n_s_VARADDED, __pyx_k_VARADDED, sizeof(__pyx_k_VARADDED), 0, 0, 1, 1}, {&__pyx_n_s_VARDELETED, __pyx_k_VARDELETED, sizeof(__pyx_k_VARDELETED), 0, 0, 1, 1}, {&__pyx_n_s_VARFIXED, __pyx_k_VARFIXED, sizeof(__pyx_k_VARFIXED), 0, 0, 1, 1}, {&__pyx_n_s_VARUNLOCKED, __pyx_k_VARUNLOCKED, sizeof(__pyx_k_VARUNLOCKED), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_VarExpr, __pyx_k_VarExpr, sizeof(__pyx_k_VarExpr), 0, 0, 1, 1}, {&__pyx_n_s_Variable, __pyx_k_Variable, sizeof(__pyx_k_Variable), 0, 0, 1, 1}, {&__pyx_n_s_Warning, __pyx_k_Warning, sizeof(__pyx_k_Warning), 0, 0, 1, 1}, {&__pyx_n_u_XORcons, __pyx_k_XORcons, sizeof(__pyx_k_XORcons), 0, 1, 0, 1}, {&__pyx_n_s_ZeroDivisionError, __pyx_k_ZeroDivisionError, sizeof(__pyx_k_ZeroDivisionError), 0, 0, 1, 1}, {&__pyx_kp_u__132, __pyx_k__132, sizeof(__pyx_k__132), 0, 1, 0, 0}, {&__pyx_kp_u__133, __pyx_k__133, sizeof(__pyx_k__133), 0, 1, 0, 0}, {&__pyx_kp_u__134, __pyx_k__134, sizeof(__pyx_k__134), 0, 1, 0, 0}, {&__pyx_kp_u__135, __pyx_k__135, sizeof(__pyx_k__135), 0, 1, 0, 0}, {&__pyx_kp_u__136, __pyx_k__136, sizeof(__pyx_k__136), 0, 1, 0, 0}, {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0}, {&__pyx_kp_u__84, __pyx_k__84, sizeof(__pyx_k__84), 0, 1, 0, 0}, {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0}, {&__pyx_n_u_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 1, 0, 1}, {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1}, {&__pyx_n_u_acons_max1, __pyx_k_acons_max1, sizeof(__pyx_k_acons_max1), 0, 1, 0, 1}, {&__pyx_n_u_acons_max2, __pyx_k_acons_max2, sizeof(__pyx_k_acons_max2), 0, 1, 0, 1}, {&__pyx_n_u_acons_max3, __pyx_k_acons_max3, sizeof(__pyx_k_acons_max3), 0, 1, 0, 1}, {&__pyx_n_u_acons_max4, __pyx_k_acons_max4, sizeof(__pyx_k_acons_max4), 0, 1, 0, 1}, {&__pyx_n_u_acons_mean1, __pyx_k_acons_mean1, sizeof(__pyx_k_acons_mean1), 0, 1, 0, 1}, {&__pyx_n_u_acons_mean2, __pyx_k_acons_mean2, sizeof(__pyx_k_acons_mean2), 0, 1, 0, 1}, {&__pyx_n_u_acons_mean3, __pyx_k_acons_mean3, sizeof(__pyx_k_acons_mean3), 0, 1, 0, 1}, {&__pyx_n_u_acons_mean4, __pyx_k_acons_mean4, sizeof(__pyx_k_acons_mean4), 0, 1, 0, 1}, {&__pyx_n_u_acons_min1, __pyx_k_acons_min1, sizeof(__pyx_k_acons_min1), 0, 1, 0, 1}, {&__pyx_n_u_acons_min2, __pyx_k_acons_min2, sizeof(__pyx_k_acons_min2), 0, 1, 0, 1}, {&__pyx_n_u_acons_min3, __pyx_k_acons_min3, sizeof(__pyx_k_acons_min3), 0, 1, 0, 1}, {&__pyx_n_u_acons_min4, __pyx_k_acons_min4, sizeof(__pyx_k_acons_min4), 0, 1, 0, 1}, {&__pyx_n_u_acons_nb1, __pyx_k_acons_nb1, sizeof(__pyx_k_acons_nb1), 0, 1, 0, 1}, {&__pyx_n_u_acons_nb2, __pyx_k_acons_nb2, sizeof(__pyx_k_acons_nb2), 0, 1, 0, 1}, {&__pyx_n_u_acons_nb3, __pyx_k_acons_nb3, sizeof(__pyx_k_acons_nb3), 0, 1, 0, 1}, {&__pyx_n_u_acons_nb4, __pyx_k_acons_nb4, sizeof(__pyx_k_acons_nb4), 0, 1, 0, 1}, {&__pyx_n_u_acons_sum1, __pyx_k_acons_sum1, sizeof(__pyx_k_acons_sum1), 0, 1, 0, 1}, {&__pyx_n_u_acons_sum2, __pyx_k_acons_sum2, sizeof(__pyx_k_acons_sum2), 0, 1, 0, 1}, {&__pyx_n_u_acons_sum3, __pyx_k_acons_sum3, sizeof(__pyx_k_acons_sum3), 0, 1, 0, 1}, {&__pyx_n_u_acons_sum4, __pyx_k_acons_sum4, sizeof(__pyx_k_acons_sum4), 0, 1, 0, 1}, {&__pyx_n_u_acons_var1, __pyx_k_acons_var1, sizeof(__pyx_k_acons_var1), 0, 1, 0, 1}, {&__pyx_n_u_acons_var2, __pyx_k_acons_var2, sizeof(__pyx_k_acons_var2), 0, 1, 0, 1}, {&__pyx_n_u_acons_var3, __pyx_k_acons_var3, sizeof(__pyx_k_acons_var3), 0, 1, 0, 1}, {&__pyx_n_u_acons_var4, __pyx_k_acons_var4, sizeof(__pyx_k_acons_var4), 0, 1, 0, 1}, {&__pyx_n_u_activities, __pyx_k_activities, sizeof(__pyx_k_activities), 0, 1, 0, 1}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_addCols_locals_genexpr, __pyx_k_addCols_locals_genexpr, sizeof(__pyx_k_addCols_locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_addGenNonlinearCons, __pyx_k_addGenNonlinearCons, sizeof(__pyx_k_addGenNonlinearCons), 0, 0, 1, 1}, {&__pyx_n_s_addLinCons, __pyx_k_addLinCons, sizeof(__pyx_k_addLinCons), 0, 0, 1, 1}, {&__pyx_n_s_addNonlinearCons, __pyx_k_addNonlinearCons, sizeof(__pyx_k_addNonlinearCons), 0, 0, 1, 1}, {&__pyx_n_s_addObjoffset, __pyx_k_addObjoffset, sizeof(__pyx_k_addObjoffset), 0, 0, 1, 1}, {&__pyx_n_s_addQuadCons, __pyx_k_addQuadCons, sizeof(__pyx_k_addQuadCons), 0, 0, 1, 1}, {&__pyx_n_s_addRows_locals_genexpr, __pyx_k_addRows_locals_genexpr, sizeof(__pyx_k_addRows_locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_add_2, __pyx_k_add_2, sizeof(__pyx_k_add_2), 0, 0, 1, 1}, {&__pyx_n_u_ages, __pyx_k_ages, sizeof(__pyx_k_ages), 0, 1, 0, 1}, {&__pyx_n_s_allowaddcons, __pyx_k_allowaddcons, sizeof(__pyx_k_allowaddcons), 0, 0, 1, 1}, {&__pyx_n_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_u_avgconfliclengthscore, __pyx_k_avgconfliclengthscore, sizeof(__pyx_k_avgconfliclengthscore), 0, 1, 0, 1}, {&__pyx_n_u_avgconfliclengthscorecurrentrun, __pyx_k_avgconfliclengthscorecurrentrun, sizeof(__pyx_k_avgconfliclengthscorecurrentrun), 0, 1, 0, 1}, {&__pyx_n_u_avgconflictscore, __pyx_k_avgconflictscore, sizeof(__pyx_k_avgconflictscore), 0, 1, 0, 1}, {&__pyx_n_u_avgconflictscorecurrentrun, __pyx_k_avgconflictscorecurrentrun, sizeof(__pyx_k_avgconflictscorecurrentrun), 0, 1, 0, 1}, {&__pyx_n_u_avgcuroffscorecurrentrun, __pyx_k_avgcuroffscorecurrentrun, sizeof(__pyx_k_avgcuroffscorecurrentrun), 0, 1, 0, 1}, {&__pyx_n_u_avgcutoffscore, __pyx_k_avgcutoffscore, sizeof(__pyx_k_avgcutoffscore), 0, 1, 0, 1}, {&__pyx_n_u_avgdualbound, __pyx_k_avgdualbound, sizeof(__pyx_k_avgdualbound), 0, 1, 0, 1}, {&__pyx_n_u_avgincvals, __pyx_k_avgincvals, sizeof(__pyx_k_avgincvals), 0, 1, 0, 1}, {&__pyx_n_u_avginferencescore, __pyx_k_avginferencescore, sizeof(__pyx_k_avginferencescore), 0, 1, 0, 1}, {&__pyx_n_u_avginferencescorecurrentrun, __pyx_k_avginferencescorecurrentrun, sizeof(__pyx_k_avginferencescorecurrentrun), 0, 1, 0, 1}, {&__pyx_n_u_avglowerbound, __pyx_k_avglowerbound, sizeof(__pyx_k_avglowerbound), 0, 1, 0, 1}, {&__pyx_n_u_avgpseudocostscore, __pyx_k_avgpseudocostscore, sizeof(__pyx_k_avgpseudocostscore), 0, 1, 0, 1}, {&__pyx_n_u_avgpseudocostscorecurrentrun, __pyx_k_avgpseudocostscorecurrentrun, sizeof(__pyx_k_avgpseudocostscorecurrentrun), 0, 1, 0, 1}, {&__pyx_n_u_basestats, __pyx_k_basestats, sizeof(__pyx_k_basestats), 0, 1, 0, 1}, {&__pyx_n_u_basic, __pyx_k_basic, sizeof(__pyx_k_basic), 0, 1, 0, 1}, {&__pyx_n_s_bdtype, __pyx_k_bdtype, sizeof(__pyx_k_bdtype), 0, 0, 1, 1}, {&__pyx_n_s_benders, __pyx_k_benders, sizeof(__pyx_k_benders), 0, 0, 1, 1}, {&__pyx_n_s_benderscreatesub, __pyx_k_benderscreatesub, sizeof(__pyx_k_benderscreatesub), 0, 0, 1, 1}, {&__pyx_n_s_benderscut, __pyx_k_benderscut, sizeof(__pyx_k_benderscut), 0, 0, 1, 1}, {&__pyx_n_s_benderscutexec, __pyx_k_benderscutexec, sizeof(__pyx_k_benderscutexec), 0, 0, 1, 1}, {&__pyx_n_s_benderscutexit, __pyx_k_benderscutexit, sizeof(__pyx_k_benderscutexit), 0, 0, 1, 1}, {&__pyx_n_s_benderscutexitsol, __pyx_k_benderscutexitsol, sizeof(__pyx_k_benderscutexitsol), 0, 0, 1, 1}, {&__pyx_n_s_benderscutfree, __pyx_k_benderscutfree, sizeof(__pyx_k_benderscutfree), 0, 0, 1, 1}, {&__pyx_n_s_benderscutinit, __pyx_k_benderscutinit, sizeof(__pyx_k_benderscutinit), 0, 0, 1, 1}, {&__pyx_n_s_benderscutinitsol, __pyx_k_benderscutinitsol, sizeof(__pyx_k_benderscutinitsol), 0, 0, 1, 1}, {&__pyx_n_s_bendersexit, __pyx_k_bendersexit, sizeof(__pyx_k_bendersexit), 0, 0, 1, 1}, {&__pyx_n_s_bendersexitpre, __pyx_k_bendersexitpre, sizeof(__pyx_k_bendersexitpre), 0, 0, 1, 1}, {&__pyx_n_s_bendersexitsol, __pyx_k_bendersexitsol, sizeof(__pyx_k_bendersexitsol), 0, 0, 1, 1}, {&__pyx_n_s_bendersfree, __pyx_k_bendersfree, sizeof(__pyx_k_bendersfree), 0, 0, 1, 1}, {&__pyx_n_s_bendersfreesub, __pyx_k_bendersfreesub, sizeof(__pyx_k_bendersfreesub), 0, 0, 1, 1}, {&__pyx_n_s_bendersgetvar, __pyx_k_bendersgetvar, sizeof(__pyx_k_bendersgetvar), 0, 0, 1, 1}, {&__pyx_n_s_bendersinit, __pyx_k_bendersinit, sizeof(__pyx_k_bendersinit), 0, 0, 1, 1}, {&__pyx_n_s_bendersinitpre, __pyx_k_bendersinitpre, sizeof(__pyx_k_bendersinitpre), 0, 0, 1, 1}, {&__pyx_n_s_bendersinitsol, __pyx_k_bendersinitsol, sizeof(__pyx_k_bendersinitsol), 0, 0, 1, 1}, {&__pyx_n_s_benderspostsolve, __pyx_k_benderspostsolve, sizeof(__pyx_k_benderspostsolve), 0, 0, 1, 1}, {&__pyx_n_s_benderspresubsolve, __pyx_k_benderspresubsolve, sizeof(__pyx_k_benderspresubsolve), 0, 0, 1, 1}, {&__pyx_n_s_benderssolvesub, __pyx_k_benderssolvesub, sizeof(__pyx_k_benderssolvesub), 0, 0, 1, 1}, {&__pyx_n_s_benderssolvesubconvex, __pyx_k_benderssolvesubconvex, sizeof(__pyx_k_benderssolvesubconvex), 0, 0, 1, 1}, {&__pyx_n_s_binvar, __pyx_k_binvar, sizeof(__pyx_k_binvar), 0, 0, 1, 1}, {&__pyx_n_s_both, __pyx_k_both, sizeof(__pyx_k_both), 0, 0, 1, 1}, {&__pyx_n_s_branchdir, __pyx_k_branchdir, sizeof(__pyx_k_branchdir), 0, 0, 1, 1}, {&__pyx_n_s_branchexecext, __pyx_k_branchexecext, sizeof(__pyx_k_branchexecext), 0, 0, 1, 1}, {&__pyx_n_s_branchexeclp, __pyx_k_branchexeclp, sizeof(__pyx_k_branchexeclp), 0, 0, 1, 1}, {&__pyx_n_s_branchexecps, __pyx_k_branchexecps, sizeof(__pyx_k_branchexecps), 0, 0, 1, 1}, {&__pyx_n_s_branchexit, __pyx_k_branchexit, sizeof(__pyx_k_branchexit), 0, 0, 1, 1}, {&__pyx_n_s_branchexitsol, __pyx_k_branchexitsol, sizeof(__pyx_k_branchexitsol), 0, 0, 1, 1}, {&__pyx_n_s_branchfree, __pyx_k_branchfree, sizeof(__pyx_k_branchfree), 0, 0, 1, 1}, {&__pyx_n_s_branchinit, __pyx_k_branchinit, sizeof(__pyx_k_branchinit), 0, 0, 1, 1}, {&__pyx_n_s_branchinitsol, __pyx_k_branchinitsol, sizeof(__pyx_k_branchinitsol), 0, 0, 1, 1}, {&__pyx_n_s_branchrule, __pyx_k_branchrule, sizeof(__pyx_k_branchrule), 0, 0, 1, 1}, {&__pyx_n_s_buildGenExprObj, __pyx_k_buildGenExprObj, sizeof(__pyx_k_buildGenExprObj), 0, 0, 1, 1}, {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, {&__pyx_n_s_candidates, __pyx_k_candidates, sizeof(__pyx_k_candidates), 0, 0, 1, 1}, {&__pyx_kp_u_cannot_create_Constraint_with_SC, __pyx_k_cannot_create_Constraint_with_SC, sizeof(__pyx_k_cannot_create_Constraint_with_SC), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_divide_by_0, __pyx_k_cannot_divide_by_0, sizeof(__pyx_k_cannot_divide_by_0), 0, 1, 0, 0}, {&__pyx_n_u_cardinality, __pyx_k_cardinality, sizeof(__pyx_k_cardinality), 0, 1, 0, 1}, {&__pyx_n_s_cardval, __pyx_k_cardval, sizeof(__pyx_k_cardval), 0, 0, 1, 1}, {&__pyx_n_u_cdeg_max, __pyx_k_cdeg_max, sizeof(__pyx_k_cdeg_max), 0, 1, 0, 1}, {&__pyx_n_u_cdeg_max_ratio, __pyx_k_cdeg_max_ratio, sizeof(__pyx_k_cdeg_max_ratio), 0, 1, 0, 1}, {&__pyx_n_u_cdeg_mean, __pyx_k_cdeg_mean, sizeof(__pyx_k_cdeg_mean), 0, 1, 0, 1}, {&__pyx_n_u_cdeg_mean_ratio, __pyx_k_cdeg_mean_ratio, sizeof(__pyx_k_cdeg_mean_ratio), 0, 1, 0, 1}, {&__pyx_n_u_cdeg_min, __pyx_k_cdeg_min, sizeof(__pyx_k_cdeg_min), 0, 1, 0, 1}, {&__pyx_n_u_cdeg_min_ratio, __pyx_k_cdeg_min_ratio, sizeof(__pyx_k_cdeg_min_ratio), 0, 1, 0, 1}, {&__pyx_n_u_cdeg_var, __pyx_k_cdeg_var, sizeof(__pyx_k_cdeg_var), 0, 1, 0, 1}, {&__pyx_n_s_ceil, __pyx_k_ceil, sizeof(__pyx_k_ceil), 0, 0, 1, 1}, {&__pyx_n_s_chckpriority, __pyx_k_chckpriority, sizeof(__pyx_k_chckpriority), 0, 0, 1, 1}, {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1}, {&__pyx_n_u_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 1, 0, 1}, {&__pyx_n_s_checkbounds, __pyx_k_checkbounds, sizeof(__pyx_k_checkbounds), 0, 0, 1, 1}, {&__pyx_n_s_checkint, __pyx_k_checkint, sizeof(__pyx_k_checkint), 0, 0, 1, 1}, {&__pyx_n_s_checkintegrality, __pyx_k_checkintegrality, sizeof(__pyx_k_checkintegrality), 0, 0, 1, 1}, {&__pyx_n_s_checklprows, __pyx_k_checklprows, sizeof(__pyx_k_checklprows), 0, 0, 1, 1}, {&__pyx_n_s_child, __pyx_k_child, sizeof(__pyx_k_child), 0, 0, 1, 1}, {&__pyx_n_s_children, __pyx_k_children, sizeof(__pyx_k_children), 0, 0, 1, 1}, {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1}, {&__pyx_kp_u_cip, __pyx_k_cip, sizeof(__pyx_k_cip), 0, 1, 0, 0}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_coef, __pyx_k_coef, sizeof(__pyx_k_coef), 0, 0, 1, 1}, {&__pyx_n_s_coeff, __pyx_k_coeff, sizeof(__pyx_k_coeff), 0, 0, 1, 1}, {&__pyx_kp_u_coefficients_not_available_for_c, __pyx_k_coefficients_not_available_for_c, sizeof(__pyx_k_coefficients_not_available_for_c), 0, 1, 0, 0}, {&__pyx_n_s_coeffs, __pyx_k_coeffs, sizeof(__pyx_k_coeffs), 0, 0, 1, 1}, {&__pyx_n_s_coefs, __pyx_k_coefs, sizeof(__pyx_k_coefs), 0, 0, 1, 1}, {&__pyx_n_u_coefs, __pyx_k_coefs, sizeof(__pyx_k_coefs), 0, 1, 0, 1}, {&__pyx_n_u_coefs_neg, __pyx_k_coefs_neg, sizeof(__pyx_k_coefs_neg), 0, 1, 0, 1}, {&__pyx_n_u_coefs_pos, __pyx_k_coefs_pos, sizeof(__pyx_k_coefs_pos), 0, 1, 0, 1}, {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1}, {&__pyx_n_u_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 1, 0, 1}, {&__pyx_n_u_col_cdeg_max, __pyx_k_col_cdeg_max, sizeof(__pyx_k_col_cdeg_max), 0, 1, 0, 1}, {&__pyx_n_u_col_cdeg_mean, __pyx_k_col_cdeg_mean, sizeof(__pyx_k_col_cdeg_mean), 0, 1, 0, 1}, {&__pyx_n_u_col_cdeg_min, __pyx_k_col_cdeg_min, sizeof(__pyx_k_col_cdeg_min), 0, 1, 0, 1}, {&__pyx_n_u_col_cdeg_std, __pyx_k_col_cdeg_std, sizeof(__pyx_k_col_cdeg_std), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_max1_unit_weight, __pyx_k_col_coef_max1_unit_weight, sizeof(__pyx_k_col_coef_max1_unit_weight), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_max2_inverse_sum, __pyx_k_col_coef_max2_inverse_sum, sizeof(__pyx_k_col_coef_max2_inverse_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_max3_dual_cost, __pyx_k_col_coef_max3_dual_cost, sizeof(__pyx_k_col_coef_max3_dual_cost), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_mean1_unit_weight, __pyx_k_col_coef_mean1_unit_weight, sizeof(__pyx_k_col_coef_mean1_unit_weight), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_mean2_inverse_sum, __pyx_k_col_coef_mean2_inverse_sum, sizeof(__pyx_k_col_coef_mean2_inverse_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_mean3_dual_cost, __pyx_k_col_coef_mean3_dual_cost, sizeof(__pyx_k_col_coef_mean3_dual_cost), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_min1_unit_weight, __pyx_k_col_coef_min1_unit_weight, sizeof(__pyx_k_col_coef_min1_unit_weight), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_min2_inverse_sum, __pyx_k_col_coef_min2_inverse_sum, sizeof(__pyx_k_col_coef_min2_inverse_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_min3_dual_cost, __pyx_k_col_coef_min3_dual_cost, sizeof(__pyx_k_col_coef_min3_dual_cost), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_std1_unit_weight, __pyx_k_col_coef_std1_unit_weight, sizeof(__pyx_k_col_coef_std1_unit_weight), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_std2_inverse_sum, __pyx_k_col_coef_std2_inverse_sum, sizeof(__pyx_k_col_coef_std2_inverse_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_std3_dual_cost, __pyx_k_col_coef_std3_dual_cost, sizeof(__pyx_k_col_coef_std3_dual_cost), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_sum1_unit_weight, __pyx_k_col_coef_sum1_unit_weight, sizeof(__pyx_k_col_coef_sum1_unit_weight), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_sum2_inverse_sum, __pyx_k_col_coef_sum2_inverse_sum, sizeof(__pyx_k_col_coef_sum2_inverse_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_coef_sum3_dual_cost, __pyx_k_col_coef_sum3_dual_cost, sizeof(__pyx_k_col_coef_sum3_dual_cost), 0, 1, 0, 1}, {&__pyx_n_u_col_coefs, __pyx_k_col_coefs, sizeof(__pyx_k_col_coefs), 0, 1, 0, 1}, {&__pyx_n_u_col_coefs_neg, __pyx_k_col_coefs_neg, sizeof(__pyx_k_col_coefs_neg), 0, 1, 0, 1}, {&__pyx_n_u_col_coefs_pos, __pyx_k_col_coefs_pos, sizeof(__pyx_k_col_coefs_pos), 0, 1, 0, 1}, {&__pyx_n_u_col_lbs, __pyx_k_col_lbs, sizeof(__pyx_k_col_lbs), 0, 1, 0, 1}, {&__pyx_n_u_col_ncoefs_max, __pyx_k_col_ncoefs_max, sizeof(__pyx_k_col_ncoefs_max), 0, 1, 0, 1}, {&__pyx_n_u_col_ncoefs_mean, __pyx_k_col_ncoefs_mean, sizeof(__pyx_k_col_ncoefs_mean), 0, 1, 0, 1}, {&__pyx_n_u_col_ncoefs_min, __pyx_k_col_ncoefs_min, sizeof(__pyx_k_col_ncoefs_min), 0, 1, 0, 1}, {&__pyx_n_u_col_ncoefs_std, __pyx_k_col_ncoefs_std, sizeof(__pyx_k_col_ncoefs_std), 0, 1, 0, 1}, {&__pyx_n_u_col_ncoefs_sum, __pyx_k_col_ncoefs_sum, sizeof(__pyx_k_col_ncoefs_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_ndown_locks, __pyx_k_col_ndown_locks, sizeof(__pyx_k_col_ndown_locks), 0, 1, 0, 1}, {&__pyx_n_u_col_nlhs_ratio_max, __pyx_k_col_nlhs_ratio_max, sizeof(__pyx_k_col_nlhs_ratio_max), 0, 1, 0, 1}, {&__pyx_n_u_col_nlhs_ratio_min, __pyx_k_col_nlhs_ratio_min, sizeof(__pyx_k_col_nlhs_ratio_min), 0, 1, 0, 1}, {&__pyx_n_u_col_nnzrs, __pyx_k_col_nnzrs, sizeof(__pyx_k_col_nnzrs), 0, 1, 0, 1}, {&__pyx_n_u_col_nrhs_ratio_max, __pyx_k_col_nrhs_ratio_max, sizeof(__pyx_k_col_nrhs_ratio_max), 0, 1, 0, 1}, {&__pyx_n_u_col_nrhs_ratio_min, __pyx_k_col_nrhs_ratio_min, sizeof(__pyx_k_col_nrhs_ratio_min), 0, 1, 0, 1}, {&__pyx_n_u_col_nup_locks, __pyx_k_col_nup_locks, sizeof(__pyx_k_col_nup_locks), 0, 1, 0, 1}, {&__pyx_n_u_col_pcoefs_max, __pyx_k_col_pcoefs_max, sizeof(__pyx_k_col_pcoefs_max), 0, 1, 0, 1}, {&__pyx_n_u_col_pcoefs_mean, __pyx_k_col_pcoefs_mean, sizeof(__pyx_k_col_pcoefs_mean), 0, 1, 0, 1}, {&__pyx_n_u_col_pcoefs_min, __pyx_k_col_pcoefs_min, sizeof(__pyx_k_col_pcoefs_min), 0, 1, 0, 1}, {&__pyx_n_u_col_pcoefs_std, __pyx_k_col_pcoefs_std, sizeof(__pyx_k_col_pcoefs_std), 0, 1, 0, 1}, {&__pyx_n_u_col_pcoefs_sum, __pyx_k_col_pcoefs_sum, sizeof(__pyx_k_col_pcoefs_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_plhs_ratio_max, __pyx_k_col_plhs_ratio_max, sizeof(__pyx_k_col_plhs_ratio_max), 0, 1, 0, 1}, {&__pyx_n_u_col_plhs_ratio_min, __pyx_k_col_plhs_ratio_min, sizeof(__pyx_k_col_plhs_ratio_min), 0, 1, 0, 1}, {&__pyx_n_u_col_prhs_ratio_max, __pyx_k_col_prhs_ratio_max, sizeof(__pyx_k_col_prhs_ratio_max), 0, 1, 0, 1}, {&__pyx_n_u_col_prhs_ratio_min, __pyx_k_col_prhs_ratio_min, sizeof(__pyx_k_col_prhs_ratio_min), 0, 1, 0, 1}, {&__pyx_n_u_col_ps_down, __pyx_k_col_ps_down, sizeof(__pyx_k_col_ps_down), 0, 1, 0, 1}, {&__pyx_n_u_col_ps_product, __pyx_k_col_ps_product, sizeof(__pyx_k_col_ps_product), 0, 1, 0, 1}, {&__pyx_n_u_col_ps_ratio, __pyx_k_col_ps_ratio, sizeof(__pyx_k_col_ps_ratio), 0, 1, 0, 1}, {&__pyx_n_u_col_ps_sum, __pyx_k_col_ps_sum, sizeof(__pyx_k_col_ps_sum), 0, 1, 0, 1}, {&__pyx_n_u_col_ps_up, __pyx_k_col_ps_up, sizeof(__pyx_k_col_ps_up), 0, 1, 0, 1}, {&__pyx_n_u_col_red_costs, __pyx_k_col_red_costs, sizeof(__pyx_k_col_red_costs), 0, 1, 0, 1}, {&__pyx_n_u_col_sol_frac_down, __pyx_k_col_sol_frac_down, sizeof(__pyx_k_col_sol_frac_down), 0, 1, 0, 1}, {&__pyx_n_u_col_sol_frac_up, __pyx_k_col_sol_frac_up, sizeof(__pyx_k_col_sol_frac_up), 0, 1, 0, 1}, {&__pyx_n_u_col_sol_isfrac, __pyx_k_col_sol_isfrac, sizeof(__pyx_k_col_sol_isfrac), 0, 1, 0, 1}, {&__pyx_n_u_col_solvals, __pyx_k_col_solvals, sizeof(__pyx_k_col_solvals), 0, 1, 0, 1}, {&__pyx_n_u_col_type_binary, __pyx_k_col_type_binary, sizeof(__pyx_k_col_type_binary), 0, 1, 0, 1}, {&__pyx_n_u_col_type_int, __pyx_k_col_type_int, sizeof(__pyx_k_col_type_int), 0, 1, 0, 1}, {&__pyx_n_u_col_ubs, __pyx_k_col_ubs, sizeof(__pyx_k_col_ubs), 0, 1, 0, 1}, {&__pyx_n_u_colidxs, __pyx_k_colidxs, sizeof(__pyx_k_colidxs), 0, 1, 0, 1}, {&__pyx_n_s_comments, __pyx_k_comments, sizeof(__pyx_k_comments), 0, 0, 1, 1}, {&__pyx_n_s_completely, __pyx_k_completely, sizeof(__pyx_k_completely), 0, 0, 1, 1}, {&__pyx_n_s_confvar, __pyx_k_confvar, sizeof(__pyx_k_confvar), 0, 0, 1, 1}, {&__pyx_n_s_cons, __pyx_k_cons, sizeof(__pyx_k_cons), 0, 0, 1, 1}, {&__pyx_n_u_cons_basis_status, __pyx_k_cons_basis_status, sizeof(__pyx_k_cons_basis_status), 0, 1, 0, 1}, {&__pyx_n_u_cons_coef_max, __pyx_k_cons_coef_max, sizeof(__pyx_k_cons_coef_max), 0, 1, 0, 1}, {&__pyx_n_u_cons_coef_mean, __pyx_k_cons_coef_mean, sizeof(__pyx_k_cons_coef_mean), 0, 1, 0, 1}, {&__pyx_n_u_cons_coef_min, __pyx_k_cons_coef_min, sizeof(__pyx_k_cons_coef_min), 0, 1, 0, 1}, {&__pyx_n_u_cons_coef_stdev, __pyx_k_cons_coef_stdev, sizeof(__pyx_k_cons_coef_stdev), 0, 1, 0, 1}, {&__pyx_n_u_cons_dual_sol, __pyx_k_cons_dual_sol, sizeof(__pyx_k_cons_dual_sol), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_AND, __pyx_k_cons_is_AND, sizeof(__pyx_k_cons_is_AND), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_OR, __pyx_k_cons_is_OR, sizeof(__pyx_k_cons_is_OR), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_XOR, __pyx_k_cons_is_XOR, sizeof(__pyx_k_cons_is_XOR), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_aggregation, __pyx_k_cons_is_aggregation, sizeof(__pyx_k_cons_is_aggregation), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_cardinality, __pyx_k_cons_is_cardinality, sizeof(__pyx_k_cons_is_cardinality), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_general_linear, __pyx_k_cons_is_general_linear, sizeof(__pyx_k_cons_is_general_linear), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_knapsack, __pyx_k_cons_is_knapsack, sizeof(__pyx_k_cons_is_knapsack), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_linking, __pyx_k_cons_is_linking, sizeof(__pyx_k_cons_is_linking), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_logicor, __pyx_k_cons_is_logicor, sizeof(__pyx_k_cons_is_logicor), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_precedence, __pyx_k_cons_is_precedence, sizeof(__pyx_k_cons_is_precedence), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_singleton, __pyx_k_cons_is_singleton, sizeof(__pyx_k_cons_is_singleton), 0, 1, 0, 1}, {&__pyx_n_u_cons_is_variable_bound, __pyx_k_cons_is_variable_bound, sizeof(__pyx_k_cons_is_variable_bound), 0, 1, 0, 1}, {&__pyx_n_u_cons_lhs, __pyx_k_cons_lhs, sizeof(__pyx_k_cons_lhs), 0, 1, 0, 1}, {&__pyx_n_u_cons_matrix, __pyx_k_cons_matrix, sizeof(__pyx_k_cons_matrix), 0, 1, 0, 1}, {&__pyx_n_u_cons_nneg, __pyx_k_cons_nneg, sizeof(__pyx_k_cons_nneg), 0, 1, 0, 1}, {&__pyx_n_u_cons_nnzrs, __pyx_k_cons_nnzrs, sizeof(__pyx_k_cons_nnzrs), 0, 1, 0, 1}, {&__pyx_n_u_cons_npos, __pyx_k_cons_npos, sizeof(__pyx_k_cons_npos), 0, 1, 0, 1}, {&__pyx_n_u_cons_rhs, __pyx_k_cons_rhs, sizeof(__pyx_k_cons_rhs), 0, 1, 0, 1}, {&__pyx_n_u_cons_sum_abs, __pyx_k_cons_sum_abs, sizeof(__pyx_k_cons_sum_abs), 0, 1, 0, 1}, {&__pyx_n_u_cons_sum_neg, __pyx_k_cons_sum_neg, sizeof(__pyx_k_cons_sum_neg), 0, 1, 0, 1}, {&__pyx_n_u_cons_sum_pos, __pyx_k_cons_sum_pos, sizeof(__pyx_k_cons_sum_pos), 0, 1, 0, 1}, {&__pyx_n_s_consactive, __pyx_k_consactive, sizeof(__pyx_k_consactive), 0, 0, 1, 1}, {&__pyx_n_s_conscheck, __pyx_k_conscheck, sizeof(__pyx_k_conscheck), 0, 0, 1, 1}, {&__pyx_n_s_conscopy, __pyx_k_conscopy, sizeof(__pyx_k_conscopy), 0, 0, 1, 1}, {&__pyx_n_s_consdeactive, __pyx_k_consdeactive, sizeof(__pyx_k_consdeactive), 0, 0, 1, 1}, {&__pyx_n_s_consdelete, __pyx_k_consdelete, sizeof(__pyx_k_consdelete), 0, 0, 1, 1}, {&__pyx_n_s_consdelvars, __pyx_k_consdelvars, sizeof(__pyx_k_consdelvars), 0, 0, 1, 1}, {&__pyx_n_s_consdisable, __pyx_k_consdisable, sizeof(__pyx_k_consdisable), 0, 0, 1, 1}, {&__pyx_n_s_consenable, __pyx_k_consenable, sizeof(__pyx_k_consenable), 0, 0, 1, 1}, {&__pyx_n_s_consenfolp, __pyx_k_consenfolp, sizeof(__pyx_k_consenfolp), 0, 0, 1, 1}, {&__pyx_n_s_consenfops, __pyx_k_consenfops, sizeof(__pyx_k_consenfops), 0, 0, 1, 1}, {&__pyx_n_s_consenforelax, __pyx_k_consenforelax, sizeof(__pyx_k_consenforelax), 0, 0, 1, 1}, {&__pyx_n_s_consexit, __pyx_k_consexit, sizeof(__pyx_k_consexit), 0, 0, 1, 1}, {&__pyx_n_s_consexitpre, __pyx_k_consexitpre, sizeof(__pyx_k_consexitpre), 0, 0, 1, 1}, {&__pyx_n_s_consexitsol, __pyx_k_consexitsol, sizeof(__pyx_k_consexitsol), 0, 0, 1, 1}, {&__pyx_n_s_consfree, __pyx_k_consfree, sizeof(__pyx_k_consfree), 0, 0, 1, 1}, {&__pyx_n_s_consgetdivebdchgs, __pyx_k_consgetdivebdchgs, sizeof(__pyx_k_consgetdivebdchgs), 0, 0, 1, 1}, {&__pyx_n_s_consgetnvars, __pyx_k_consgetnvars, sizeof(__pyx_k_consgetnvars), 0, 0, 1, 1}, {&__pyx_n_s_consgetvars, __pyx_k_consgetvars, sizeof(__pyx_k_consgetvars), 0, 0, 1, 1}, {&__pyx_n_s_conshdlr, __pyx_k_conshdlr, sizeof(__pyx_k_conshdlr), 0, 0, 1, 1}, {&__pyx_n_s_consinit, __pyx_k_consinit, sizeof(__pyx_k_consinit), 0, 0, 1, 1}, {&__pyx_n_s_consinitlp, __pyx_k_consinitlp, sizeof(__pyx_k_consinitlp), 0, 0, 1, 1}, {&__pyx_n_s_consinitpre, __pyx_k_consinitpre, sizeof(__pyx_k_consinitpre), 0, 0, 1, 1}, {&__pyx_n_s_consinitsol, __pyx_k_consinitsol, sizeof(__pyx_k_consinitsol), 0, 0, 1, 1}, {&__pyx_n_s_conslock, __pyx_k_conslock, sizeof(__pyx_k_conslock), 0, 0, 1, 1}, {&__pyx_n_s_consparse, __pyx_k_consparse, sizeof(__pyx_k_consparse), 0, 0, 1, 1}, {&__pyx_n_s_conspresol, __pyx_k_conspresol, sizeof(__pyx_k_conspresol), 0, 0, 1, 1}, {&__pyx_n_s_consprint, __pyx_k_consprint, sizeof(__pyx_k_consprint), 0, 0, 1, 1}, {&__pyx_n_s_consprop, __pyx_k_consprop, sizeof(__pyx_k_consprop), 0, 0, 1, 1}, {&__pyx_n_s_consresprop, __pyx_k_consresprop, sizeof(__pyx_k_consresprop), 0, 0, 1, 1}, {&__pyx_n_s_conssepalp, __pyx_k_conssepalp, sizeof(__pyx_k_conssepalp), 0, 0, 1, 1}, {&__pyx_n_s_conssepasol, __pyx_k_conssepasol, sizeof(__pyx_k_conssepasol), 0, 0, 1, 1}, {&__pyx_n_s_const, __pyx_k_const, sizeof(__pyx_k_const), 0, 0, 1, 1}, {&__pyx_n_u_const, __pyx_k_const, sizeof(__pyx_k_const), 0, 1, 0, 1}, {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1}, {&__pyx_n_s_constraint, __pyx_k_constraint, sizeof(__pyx_k_constraint), 0, 0, 1, 1}, {&__pyx_kp_u_constraint_is_not_quadratic, __pyx_k_constraint_is_not_quadratic, sizeof(__pyx_k_constraint_is_not_quadratic), 0, 1, 0, 0}, {&__pyx_n_s_constraints, __pyx_k_constraints, sizeof(__pyx_k_constraints), 0, 0, 1, 1}, {&__pyx_kp_u_constraints_benders_active, __pyx_k_constraints_benders_active, sizeof(__pyx_k_constraints_benders_active), 0, 1, 0, 0}, {&__pyx_kp_u_constraints_benderslp_active, __pyx_k_constraints_benderslp_active, sizeof(__pyx_k_constraints_benderslp_active), 0, 1, 0, 0}, {&__pyx_n_s_constrans, __pyx_k_constrans, sizeof(__pyx_k_constrans), 0, 0, 1, 1}, {&__pyx_n_s_consvars, __pyx_k_consvars, sizeof(__pyx_k_consvars), 0, 0, 1, 1}, {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, {&__pyx_kp_u_could_not_change_variable_type_o, __pyx_k_could_not_change_variable_type_o, sizeof(__pyx_k_could_not_change_variable_type_o), 0, 1, 0, 0}, {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1}, {&__pyx_n_s_createProbBasic, __pyx_k_createProbBasic, sizeof(__pyx_k_createProbBasic), 0, 0, 1, 1}, {&__pyx_n_s_createSol, __pyx_k_createSol, sizeof(__pyx_k_createSol), 0, 0, 1, 1}, {&__pyx_n_u_cumulative, __pyx_k_cumulative, sizeof(__pyx_k_cumulative), 0, 1, 0, 1}, {&__pyx_n_s_cut, __pyx_k_cut, sizeof(__pyx_k_cut), 0, 0, 1, 1}, {&__pyx_n_s_cutlp, __pyx_k_cutlp, sizeof(__pyx_k_cutlp), 0, 0, 1, 1}, {&__pyx_n_u_cutoffbound, __pyx_k_cutoffbound, sizeof(__pyx_k_cutoffbound), 0, 1, 0, 1}, {&__pyx_n_u_cutoffdepth, __pyx_k_cutoffdepth, sizeof(__pyx_k_cutoffdepth), 0, 1, 0, 1}, {&__pyx_n_s_cutpseudo, __pyx_k_cutpseudo, sizeof(__pyx_k_cutpseudo), 0, 0, 1, 1}, {&__pyx_n_s_cutrelax, __pyx_k_cutrelax, sizeof(__pyx_k_cutrelax), 0, 0, 1, 1}, {&__pyx_n_s_defaultPlugins, __pyx_k_defaultPlugins, sizeof(__pyx_k_defaultPlugins), 0, 0, 1, 1}, {&__pyx_n_s_degree, __pyx_k_degree, sizeof(__pyx_k_degree), 0, 0, 1, 1}, {&__pyx_n_s_degree_locals_genexpr, __pyx_k_degree_locals_genexpr, sizeof(__pyx_k_degree_locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_delay, __pyx_k_delay, sizeof(__pyx_k_delay), 0, 0, 1, 1}, {&__pyx_n_s_delayprop, __pyx_k_delayprop, sizeof(__pyx_k_delayprop), 0, 0, 1, 1}, {&__pyx_n_s_delaysepa, __pyx_k_delaysepa, sizeof(__pyx_k_delaysepa), 0, 0, 1, 1}, {&__pyx_n_u_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 1, 0, 1}, {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1}, {&__pyx_n_u_deterministictime, __pyx_k_deterministictime, sizeof(__pyx_k_deterministictime), 0, 1, 0, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_dispchar, __pyx_k_dispchar, sizeof(__pyx_k_dispchar), 0, 0, 1, 1}, {&__pyx_n_s_div, __pyx_k_div, sizeof(__pyx_k_div), 0, 0, 1, 1}, {&__pyx_n_s_div_2, __pyx_k_div_2, sizeof(__pyx_k_div_2), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_dual, __pyx_k_dual, sizeof(__pyx_k_dual), 0, 0, 1, 1}, {&__pyx_kp_u_dual_solution_values_not_availab, __pyx_k_dual_solution_values_not_availab, sizeof(__pyx_k_dual_solution_values_not_availab), 0, 1, 0, 0}, {&__pyx_n_u_dualbound, __pyx_k_dualbound, sizeof(__pyx_k_dualbound), 0, 1, 0, 1}, {&__pyx_n_u_dualboundroot, __pyx_k_dualboundroot, sizeof(__pyx_k_dualboundroot), 0, 1, 0, 1}, {&__pyx_n_u_dualsols, __pyx_k_dualsols, sizeof(__pyx_k_dualsols), 0, 1, 0, 1}, {&__pyx_n_s_dynamic, __pyx_k_dynamic, sizeof(__pyx_k_dynamic), 0, 0, 1, 1}, {&__pyx_n_u_dynamic, __pyx_k_dynamic, sizeof(__pyx_k_dynamic), 0, 1, 0, 1}, {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, {&__pyx_n_s_eagerfreq, __pyx_k_eagerfreq, sizeof(__pyx_k_eagerfreq), 0, 0, 1, 1}, {&__pyx_n_u_effectiverootdepth, __pyx_k_effectiverootdepth, sizeof(__pyx_k_effectiverootdepth), 0, 1, 0, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_enablepricing, __pyx_k_enablepricing, sizeof(__pyx_k_enablepricing), 0, 0, 1, 1}, {&__pyx_n_s_enfopriority, __pyx_k_enfopriority, sizeof(__pyx_k_enfopriority), 0, 0, 1, 1}, {&__pyx_n_s_enforce, __pyx_k_enforce, sizeof(__pyx_k_enforce), 0, 0, 1, 1}, {&__pyx_n_u_enforce, __pyx_k_enforce, sizeof(__pyx_k_enforce), 0, 1, 0, 1}, {&__pyx_n_s_enfotype, __pyx_k_enfotype, sizeof(__pyx_k_enfotype), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_entries, __pyx_k_entries, sizeof(__pyx_k_entries), 0, 0, 1, 1}, {&__pyx_n_s_entrieslist, __pyx_k_entrieslist, sizeof(__pyx_k_entrieslist), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1}, {&__pyx_n_s_estimate, __pyx_k_estimate, sizeof(__pyx_k_estimate), 0, 0, 1, 1}, {&__pyx_kp_u_event_handler_not_found, __pyx_k_event_handler_not_found, sizeof(__pyx_k_event_handler_not_found), 0, 1, 0, 0}, {&__pyx_n_s_eventcopy, __pyx_k_eventcopy, sizeof(__pyx_k_eventcopy), 0, 0, 1, 1}, {&__pyx_n_s_eventdelete, __pyx_k_eventdelete, sizeof(__pyx_k_eventdelete), 0, 0, 1, 1}, {&__pyx_n_s_eventexec, __pyx_k_eventexec, sizeof(__pyx_k_eventexec), 0, 0, 1, 1}, {&__pyx_n_s_eventexit, __pyx_k_eventexit, sizeof(__pyx_k_eventexit), 0, 0, 1, 1}, {&__pyx_n_s_eventexitsol, __pyx_k_eventexitsol, sizeof(__pyx_k_eventexitsol), 0, 0, 1, 1}, {&__pyx_n_s_eventfree, __pyx_k_eventfree, sizeof(__pyx_k_eventfree), 0, 0, 1, 1}, {&__pyx_n_s_eventhdlr, __pyx_k_eventhdlr, sizeof(__pyx_k_eventhdlr), 0, 0, 1, 1}, {&__pyx_n_s_eventinit, __pyx_k_eventinit, sizeof(__pyx_k_eventinit), 0, 0, 1, 1}, {&__pyx_n_s_eventinitsol, __pyx_k_eventinitsol, sizeof(__pyx_k_eventinitsol), 0, 0, 1, 1}, {&__pyx_n_s_eventtype, __pyx_k_eventtype, sizeof(__pyx_k_eventtype), 0, 0, 1, 1}, {&__pyx_n_s_exact, __pyx_k_exact, sizeof(__pyx_k_exact), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1}, {&__pyx_n_u_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 1, 0, 1}, {&__pyx_kp_u_expected_inequality_that_has_eit, __pyx_k_expected_inequality_that_has_eit, sizeof(__pyx_k_expected_inequality_that_has_eit), 0, 1, 0, 0}, {&__pyx_kp_u_expected_linear_inequality_expre, __pyx_k_expected_linear_inequality_expre, sizeof(__pyx_k_expected_linear_inequality_expre), 0, 1, 0, 0}, {&__pyx_n_s_expo, __pyx_k_expo, sizeof(__pyx_k_expo), 0, 0, 1, 1}, {&__pyx_kp_u_exponents_must_be_numbers, __pyx_k_exponents_must_be_numbers, sizeof(__pyx_k_exponents_must_be_numbers), 0, 1, 0, 0}, {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1}, {&__pyx_n_s_expr_richcmp, __pyx_k_expr_richcmp, sizeof(__pyx_k_expr_richcmp), 0, 0, 1, 1}, {&__pyx_n_s_expr_to_array, __pyx_k_expr_to_array, sizeof(__pyx_k_expr_to_array), 0, 0, 1, 1}, {&__pyx_n_s_expr_to_nodes, __pyx_k_expr_to_nodes, sizeof(__pyx_k_expr_to_nodes), 0, 0, 1, 1}, {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1}, {&__pyx_n_s_extension, __pyx_k_extension, sizeof(__pyx_k_extension), 0, 0, 1, 1}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, {&__pyx_n_s_fileno, __pyx_k_fileno, sizeof(__pyx_k_fileno), 0, 0, 1, 1}, {&__pyx_n_s_firstcol, __pyx_k_firstcol, sizeof(__pyx_k_firstcol), 0, 0, 1, 1}, {&__pyx_n_u_firstlpdualboundroot, __pyx_k_firstlpdualboundroot, sizeof(__pyx_k_firstlpdualboundroot), 0, 1, 0, 1}, {&__pyx_n_u_firstlplowerboundroot, __pyx_k_firstlplowerboundroot, sizeof(__pyx_k_firstlplowerboundroot), 0, 1, 0, 1}, {&__pyx_n_u_firstprimalbound, __pyx_k_firstprimalbound, sizeof(__pyx_k_firstprimalbound), 0, 1, 0, 1}, {&__pyx_n_s_firstrow, __pyx_k_firstrow, sizeof(__pyx_k_firstrow), 0, 0, 1, 1}, {&__pyx_n_s_fixedval, __pyx_k_fixedval, sizeof(__pyx_k_fixedval), 0, 0, 1, 1}, {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1}, {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1}, {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, {&__pyx_n_s_floor, __pyx_k_floor, sizeof(__pyx_k_floor), 0, 0, 1, 1}, {&__pyx_n_u_focusdepth, __pyx_k_focusdepth, sizeof(__pyx_k_focusdepth), 0, 1, 0, 1}, {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1}, {&__pyx_n_s_forcecut, __pyx_k_forcecut, sizeof(__pyx_k_forcecut), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_u_frac_down_infeas, __pyx_k_frac_down_infeas, sizeof(__pyx_k_frac_down_infeas), 0, 1, 0, 1}, {&__pyx_n_u_frac_up_infeas, __pyx_k_frac_up_infeas, sizeof(__pyx_k_frac_up_infeas), 0, 1, 0, 1}, {&__pyx_n_s_free, __pyx_k_free, sizeof(__pyx_k_free), 0, 0, 1, 1}, {&__pyx_n_s_freq, __pyx_k_freq, sizeof(__pyx_k_freq), 0, 0, 1, 1}, {&__pyx_n_s_freqofs, __pyx_k_freqofs, sizeof(__pyx_k_freqofs), 0, 0, 1, 1}, {&__pyx_n_u_gap, __pyx_k_gap, sizeof(__pyx_k_gap), 0, 1, 0, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_getNNonz, __pyx_k_getNNonz, sizeof(__pyx_k_getNNonz), 0, 0, 1, 1}, {&__pyx_n_s_getObj, __pyx_k_getObj, sizeof(__pyx_k_getObj), 0, 0, 1, 1}, {&__pyx_n_s_getObjectiveSense, __pyx_k_getObjectiveSense, sizeof(__pyx_k_getObjectiveSense), 0, 0, 1, 1}, {&__pyx_n_s_getOp, __pyx_k_getOp, sizeof(__pyx_k_getOp), 0, 0, 1, 1}, {&__pyx_n_s_getOpIndex, __pyx_k_getOpIndex, sizeof(__pyx_k_getOpIndex), 0, 0, 1, 1}, {&__pyx_n_s_getSolObjVal, __pyx_k_getSolObjVal, sizeof(__pyx_k_getSolObjVal), 0, 0, 1, 1}, {&__pyx_n_s_getSolVal, __pyx_k_getSolVal, sizeof(__pyx_k_getSolVal), 0, 0, 1, 1}, {&__pyx_n_s_getStage, __pyx_k_getStage, sizeof(__pyx_k_getStage), 0, 0, 1, 1}, {&__pyx_n_s_getTransformedCons, __pyx_k_getTransformedCons, sizeof(__pyx_k_getTransformedCons), 0, 0, 1, 1}, {&__pyx_n_s_getType, __pyx_k_getType, sizeof(__pyx_k_getType), 0, 0, 1, 1}, {&__pyx_n_s_getVars, __pyx_k_getVars, sizeof(__pyx_k_getVars), 0, 0, 1, 1}, {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_kp_u_given_coefficients_are_neither_E, __pyx_k_given_coefficients_are_neither_E, sizeof(__pyx_k_given_coefficients_are_neither_E), 0, 1, 0, 0}, {&__pyx_kp_u_given_coefficients_are_not_Expr, __pyx_k_given_coefficients_are_not_Expr, sizeof(__pyx_k_given_coefficients_are_not_Expr), 0, 1, 0, 0}, {&__pyx_kp_u_given_constraint_is_not_ExprCons, __pyx_k_given_constraint_is_not_ExprCons, sizeof(__pyx_k_given_constraint_is_not_ExprCons), 0, 1, 0, 0}, {&__pyx_kp_u_given_constraint_is_not_linear_d, __pyx_k_given_constraint_is_not_linear_d, sizeof(__pyx_k_given_constraint_is_not_linear_d), 0, 1, 0, 0}, {&__pyx_kp_u_given_constraint_is_not_quadrati, __pyx_k_given_constraint_is_not_quadrati, sizeof(__pyx_k_given_constraint_is_not_quadrati), 0, 1, 0, 0}, {&__pyx_n_s_globalcopy, __pyx_k_globalcopy, sizeof(__pyx_k_globalcopy), 0, 0, 1, 1}, {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1}, {&__pyx_n_s_hashval, __pyx_k_hashval, sizeof(__pyx_k_hashval), 0, 0, 1, 1}, {&__pyx_n_u_hashval, __pyx_k_hashval, sizeof(__pyx_k_hashval), 0, 1, 0, 1}, {&__pyx_n_s_heur, __pyx_k_heur, sizeof(__pyx_k_heur), 0, 0, 1, 1}, {&__pyx_n_s_heurexec, __pyx_k_heurexec, sizeof(__pyx_k_heurexec), 0, 0, 1, 1}, {&__pyx_n_s_heurexit, __pyx_k_heurexit, sizeof(__pyx_k_heurexit), 0, 0, 1, 1}, {&__pyx_n_s_heurexitsol, __pyx_k_heurexitsol, sizeof(__pyx_k_heurexitsol), 0, 0, 1, 1}, {&__pyx_n_s_heurfree, __pyx_k_heurfree, sizeof(__pyx_k_heurfree), 0, 0, 1, 1}, {&__pyx_n_s_heurinit, __pyx_k_heurinit, sizeof(__pyx_k_heurinit), 0, 0, 1, 1}, {&__pyx_n_s_heurinitsol, __pyx_k_heurinitsol, sizeof(__pyx_k_heurinitsol), 0, 0, 1, 1}, {&__pyx_n_s_heurtiming, __pyx_k_heurtiming, sizeof(__pyx_k_heurtiming), 0, 0, 1, 1}, {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_includeDefaultPlugins, __pyx_k_includeDefaultPlugins, sizeof(__pyx_k_includeDefaultPlugins), 0, 0, 1, 1}, {&__pyx_n_u_incvals, __pyx_k_incvals, sizeof(__pyx_k_incvals), 0, 1, 0, 1}, {&__pyx_n_s_indicator_arr, __pyx_k_indicator_arr, sizeof(__pyx_k_indicator_arr), 0, 0, 1, 1}, {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, {&__pyx_n_s_indvars, __pyx_k_indvars, sizeof(__pyx_k_indvars), 0, 0, 1, 1}, {&__pyx_n_u_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 1, 0, 1}, {&__pyx_n_s_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 0, 1, 1}, {&__pyx_n_u_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 1, 0, 1}, {&__pyx_n_s_inferinfo, __pyx_k_inferinfo, sizeof(__pyx_k_inferinfo), 0, 0, 1, 1}, {&__pyx_n_s_infinity, __pyx_k_infinity, sizeof(__pyx_k_infinity), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_initial, __pyx_k_initial, sizeof(__pyx_k_initial), 0, 0, 1, 1}, {&__pyx_n_u_initial, __pyx_k_initial, sizeof(__pyx_k_initial), 0, 1, 0, 1}, {&__pyx_n_u_inrepropagation, __pyx_k_inrepropagation, sizeof(__pyx_k_inrepropagation), 0, 1, 0, 1}, {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1}, {&__pyx_n_s_interpolation, __pyx_k_interpolation, sizeof(__pyx_k_interpolation), 0, 0, 1, 1}, {&__pyx_n_s_isChecked, __pyx_k_isChecked, sizeof(__pyx_k_isChecked), 0, 0, 1, 1}, {&__pyx_n_s_isDynamic, __pyx_k_isDynamic, sizeof(__pyx_k_isDynamic), 0, 0, 1, 1}, {&__pyx_n_s_isEnforced, __pyx_k_isEnforced, sizeof(__pyx_k_isEnforced), 0, 0, 1, 1}, {&__pyx_n_s_isInitial, __pyx_k_isInitial, sizeof(__pyx_k_isInitial), 0, 0, 1, 1}, {&__pyx_n_s_isLocal, __pyx_k_isLocal, sizeof(__pyx_k_isLocal), 0, 0, 1, 1}, {&__pyx_n_s_isModifiable, __pyx_k_isModifiable, sizeof(__pyx_k_isModifiable), 0, 0, 1, 1}, {&__pyx_n_s_isOriginal, __pyx_k_isOriginal, sizeof(__pyx_k_isOriginal), 0, 0, 1, 1}, {&__pyx_n_s_isPropagated, __pyx_k_isPropagated, sizeof(__pyx_k_isPropagated), 0, 0, 1, 1}, {&__pyx_n_s_isQuadratic, __pyx_k_isQuadratic, sizeof(__pyx_k_isQuadratic), 0, 0, 1, 1}, {&__pyx_n_s_isRemovable, __pyx_k_isRemovable, sizeof(__pyx_k_isRemovable), 0, 0, 1, 1}, {&__pyx_n_s_isSeparated, __pyx_k_isSeparated, sizeof(__pyx_k_isSeparated), 0, 0, 1, 1}, {&__pyx_n_s_isStickingAtNode, __pyx_k_isStickingAtNode, sizeof(__pyx_k_isStickingAtNode), 0, 0, 1, 1}, {&__pyx_n_u_is_at_lhs, __pyx_k_is_at_lhs, sizeof(__pyx_k_is_at_lhs), 0, 1, 0, 1}, {&__pyx_n_u_is_at_rhs, __pyx_k_is_at_rhs, sizeof(__pyx_k_is_at_rhs), 0, 1, 0, 1}, {&__pyx_n_s_is_integer, __pyx_k_is_integer, sizeof(__pyx_k_is_integer), 0, 0, 1, 1}, {&__pyx_n_u_is_local, __pyx_k_is_local, sizeof(__pyx_k_is_local), 0, 1, 0, 1}, {&__pyx_n_s_is_memory_freed, __pyx_k_is_memory_freed, sizeof(__pyx_k_is_memory_freed), 0, 0, 1, 1}, {&__pyx_n_u_is_modifiable, __pyx_k_is_modifiable, sizeof(__pyx_k_is_modifiable), 0, 1, 0, 1}, {&__pyx_n_s_is_number, __pyx_k_is_number, sizeof(__pyx_k_is_number), 0, 0, 1, 1}, {&__pyx_n_u_is_removable, __pyx_k_is_removable, sizeof(__pyx_k_is_removable), 0, 1, 0, 1}, {&__pyx_n_s_islpcut, __pyx_k_islpcut, sizeof(__pyx_k_islpcut), 0, 0, 1, 1}, {&__pyx_n_u_isprimalboundsol, __pyx_k_isprimalboundsol, sizeof(__pyx_k_isprimalboundsol), 0, 1, 0, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_itlim, __pyx_k_itlim, sizeof(__pyx_k_itlim), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_u_knapsack, __pyx_k_knapsack, sizeof(__pyx_k_knapsack), 0, 1, 0, 1}, {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1}, {&__pyx_n_s_lastcol, __pyx_k_lastcol, sizeof(__pyx_k_lastcol), 0, 0, 1, 1}, {&__pyx_n_s_lastrow, __pyx_k_lastrow, sizeof(__pyx_k_lastrow), 0, 0, 1, 1}, {&__pyx_n_s_lb, __pyx_k_lb, sizeof(__pyx_k_lb), 0, 0, 1, 1}, {&__pyx_n_s_lbs, __pyx_k_lbs, sizeof(__pyx_k_lbs), 0, 0, 1, 1}, {&__pyx_n_u_lbs, __pyx_k_lbs, sizeof(__pyx_k_lbs), 0, 1, 0, 1}, {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1}, {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1}, {&__pyx_n_u_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 1, 0, 1}, {&__pyx_n_s_lhs_2, __pyx_k_lhs_2, sizeof(__pyx_k_lhs_2), 0, 0, 1, 1}, {&__pyx_n_u_lhs_vec, __pyx_k_lhs_vec, sizeof(__pyx_k_lhs_vec), 0, 1, 0, 1}, {&__pyx_n_s_lhss, __pyx_k_lhss, sizeof(__pyx_k_lhss), 0, 0, 1, 1}, {&__pyx_n_u_lhss, __pyx_k_lhss, sizeof(__pyx_k_lhss), 0, 1, 0, 1}, {&__pyx_n_s_lincons, __pyx_k_lincons, sizeof(__pyx_k_lincons), 0, 0, 1, 1}, {&__pyx_n_u_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 1, 0, 1}, {&__pyx_kp_u_linked_SCIP_is_not_compatible_to, __pyx_k_linked_SCIP_is_not_compatible_to, sizeof(__pyx_k_linked_SCIP_is_not_compatible_to), 0, 1, 0, 0}, {&__pyx_kp_u_linked_SCIP_is_not_recommended_f, __pyx_k_linked_SCIP_is_not_recommended_f, sizeof(__pyx_k_linked_SCIP_is_not_recommended_f), 0, 1, 0, 0}, {&__pyx_n_u_linking, __pyx_k_linking, sizeof(__pyx_k_linking), 0, 1, 0, 1}, {&__pyx_n_s_local, __pyx_k_local, sizeof(__pyx_k_local), 0, 0, 1, 1}, {&__pyx_n_u_local, __pyx_k_local, sizeof(__pyx_k_local), 0, 1, 0, 1}, {&__pyx_n_s_locktype, __pyx_k_locktype, sizeof(__pyx_k_locktype), 0, 0, 1, 1}, {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1}, {&__pyx_n_u_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 1, 0, 1}, {&__pyx_n_u_logicor, __pyx_k_logicor, sizeof(__pyx_k_logicor), 0, 1, 0, 1}, {&__pyx_n_u_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 1, 0, 1}, {&__pyx_n_u_lowerbound, __pyx_k_lowerbound, sizeof(__pyx_k_lowerbound), 0, 1, 0, 1}, {&__pyx_n_u_lowerboundroot, __pyx_k_lowerboundroot, sizeof(__pyx_k_lowerboundroot), 0, 1, 0, 1}, {&__pyx_n_s_lowerbounds, __pyx_k_lowerbounds, sizeof(__pyx_k_lowerbounds), 0, 0, 1, 1}, {&__pyx_n_u_lp_obj, __pyx_k_lp_obj, sizeof(__pyx_k_lp_obj), 0, 1, 0, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1}, {&__pyx_n_u_mappedvar, __pyx_k_mappedvar, sizeof(__pyx_k_mappedvar), 0, 1, 0, 1}, {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1}, {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, {&__pyx_n_s_maxbounddist, __pyx_k_maxbounddist, sizeof(__pyx_k_maxbounddist), 0, 0, 1, 1}, {&__pyx_n_s_maxdepth, __pyx_k_maxdepth, sizeof(__pyx_k_maxdepth), 0, 0, 1, 1}, {&__pyx_n_u_maxdepth, __pyx_k_maxdepth, sizeof(__pyx_k_maxdepth), 0, 1, 0, 1}, {&__pyx_n_u_maximize, __pyx_k_maximize, sizeof(__pyx_k_maximize), 0, 1, 0, 1}, {&__pyx_n_s_maxprerounds, __pyx_k_maxprerounds, sizeof(__pyx_k_maxprerounds), 0, 0, 1, 1}, {&__pyx_n_s_maxrounds, __pyx_k_maxrounds, sizeof(__pyx_k_maxrounds), 0, 0, 1, 1}, {&__pyx_n_u_maxtotaldepth, __pyx_k_maxtotaldepth, sizeof(__pyx_k_maxtotaldepth), 0, 1, 0, 1}, {&__pyx_n_s_memsavepriority, __pyx_k_memsavepriority, sizeof(__pyx_k_memsavepriority), 0, 0, 1, 1}, {&__pyx_n_s_mergecandidates, __pyx_k_mergecandidates, sizeof(__pyx_k_mergecandidates), 0, 0, 1, 1}, {&__pyx_n_u_merged, __pyx_k_merged, sizeof(__pyx_k_merged), 0, 1, 0, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_kp_u_method_cannot_be_called_before_p, __pyx_k_method_cannot_be_called_before_p, sizeof(__pyx_k_method_cannot_be_called_before_p), 0, 1, 0, 0}, {&__pyx_kp_u_method_cannot_be_called_for_cons, __pyx_k_method_cannot_be_called_for_cons, sizeof(__pyx_k_method_cannot_be_called_for_cons), 0, 1, 0, 0}, {&__pyx_n_u_minimize, __pyx_k_minimize, sizeof(__pyx_k_minimize), 0, 1, 0, 1}, {&__pyx_n_s_minus, __pyx_k_minus, sizeof(__pyx_k_minus), 0, 0, 1, 1}, {&__pyx_n_u_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 1, 0, 1}, {&__pyx_kp_u_model_cip, __pyx_k_model_cip, sizeof(__pyx_k_model_cip), 0, 1, 0, 0}, {&__pyx_n_s_modifiable, __pyx_k_modifiable, sizeof(__pyx_k_modifiable), 0, 0, 1, 1}, {&__pyx_n_u_modifiable, __pyx_k_modifiable, sizeof(__pyx_k_modifiable), 0, 1, 0, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_mul, __pyx_k_mul, sizeof(__pyx_k_mul), 0, 0, 1, 1}, {&__pyx_n_s_mul_2, __pyx_k_mul_2, sizeof(__pyx_k_mul_2), 0, 0, 1, 1}, {&__pyx_n_u_nactivatednodes, __pyx_k_nactivatednodes, sizeof(__pyx_k_nactivatednodes), 0, 1, 0, 1}, {&__pyx_n_u_nactivesonss, __pyx_k_nactivesonss, sizeof(__pyx_k_nactivesonss), 0, 1, 0, 1}, {&__pyx_n_u_naddconss, __pyx_k_naddconss, sizeof(__pyx_k_naddconss), 0, 1, 0, 1}, {&__pyx_n_u_naddholes, __pyx_k_naddholes, sizeof(__pyx_k_naddholes), 0, 1, 0, 1}, {&__pyx_n_u_naggrvars, __pyx_k_naggrvars, sizeof(__pyx_k_naggrvars), 0, 1, 0, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_u_nb_down_infeas, __pyx_k_nb_down_infeas, sizeof(__pyx_k_nb_down_infeas), 0, 1, 0, 1}, {&__pyx_n_u_nb_up_infeas, __pyx_k_nb_up_infeas, sizeof(__pyx_k_nb_up_infeas), 0, 1, 0, 1}, {&__pyx_n_u_nbacktracks, __pyx_k_nbacktracks, sizeof(__pyx_k_nbacktracks), 0, 1, 0, 1}, {&__pyx_n_u_nbarrierlpiterations, __pyx_k_nbarrierlpiterations, sizeof(__pyx_k_nbarrierlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nbarrierlps, __pyx_k_nbarrierlps, sizeof(__pyx_k_nbarrierlps), 0, 1, 0, 1}, {&__pyx_n_u_nbestsolsfound, __pyx_k_nbestsolsfound, sizeof(__pyx_k_nbestsolsfound), 0, 1, 0, 1}, {&__pyx_n_u_nchgbds, __pyx_k_nchgbds, sizeof(__pyx_k_nchgbds), 0, 1, 0, 1}, {&__pyx_n_u_nchgcoefs, __pyx_k_nchgcoefs, sizeof(__pyx_k_nchgcoefs), 0, 1, 0, 1}, {&__pyx_n_u_nchgsides, __pyx_k_nchgsides, sizeof(__pyx_k_nchgsides), 0, 1, 0, 1}, {&__pyx_n_u_nchgvartypes, __pyx_k_nchgvartypes, sizeof(__pyx_k_nchgvartypes), 0, 1, 0, 1}, {&__pyx_n_s_nchildren, __pyx_k_nchildren, sizeof(__pyx_k_nchildren), 0, 0, 1, 1}, {&__pyx_n_s_ncols, __pyx_k_ncols, sizeof(__pyx_k_ncols), 0, 0, 1, 1}, {&__pyx_n_u_nconflictconssapplied, __pyx_k_nconflictconssapplied, sizeof(__pyx_k_nconflictconssapplied), 0, 1, 0, 1}, {&__pyx_n_u_nconflictconssfound, __pyx_k_nconflictconssfound, sizeof(__pyx_k_nconflictconssfound), 0, 1, 0, 1}, {&__pyx_n_u_nconflictconssfoundnode, __pyx_k_nconflictconssfoundnode, sizeof(__pyx_k_nconflictconssfoundnode), 0, 1, 0, 1}, {&__pyx_n_u_ncreatednodes, __pyx_k_ncreatednodes, sizeof(__pyx_k_ncreatednodes), 0, 1, 0, 1}, {&__pyx_n_u_ncreatednodesrun, __pyx_k_ncreatednodesrun, sizeof(__pyx_k_ncreatednodesrun), 0, 1, 0, 1}, {&__pyx_n_u_ncutsapplied, __pyx_k_ncutsapplied, sizeof(__pyx_k_ncutsapplied), 0, 1, 0, 1}, {&__pyx_n_u_ncutsfound, __pyx_k_ncutsfound, sizeof(__pyx_k_ncutsfound), 0, 1, 0, 1}, {&__pyx_n_u_ncutsfoundround, __pyx_k_ncutsfoundround, sizeof(__pyx_k_ncutsfoundround), 0, 1, 0, 1}, {&__pyx_n_u_ndeactivatednodes, __pyx_k_ndeactivatednodes, sizeof(__pyx_k_ndeactivatednodes), 0, 1, 0, 1}, {&__pyx_n_u_ndelayedcutoffs, __pyx_k_ndelayedcutoffs, sizeof(__pyx_k_ndelayedcutoffs), 0, 1, 0, 1}, {&__pyx_n_u_ndelconss, __pyx_k_ndelconss, sizeof(__pyx_k_ndelconss), 0, 1, 0, 1}, {&__pyx_n_u_ndivinglpiterations, __pyx_k_ndivinglpiterations, sizeof(__pyx_k_ndivinglpiterations), 0, 1, 0, 1}, {&__pyx_n_u_ndivinglps, __pyx_k_ndivinglps, sizeof(__pyx_k_ndivinglps), 0, 1, 0, 1}, {&__pyx_n_u_nduallpiterations, __pyx_k_nduallpiterations, sizeof(__pyx_k_nduallpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nduallps, __pyx_k_nduallps, sizeof(__pyx_k_nduallps), 0, 1, 0, 1}, {&__pyx_n_u_ndualresolvelpiterations, __pyx_k_ndualresolvelpiterations, sizeof(__pyx_k_ndualresolvelpiterations), 0, 1, 0, 1}, {&__pyx_n_u_ndualresolvelps, __pyx_k_ndualresolvelps, sizeof(__pyx_k_ndualresolvelps), 0, 1, 0, 1}, {&__pyx_n_s_needscons, __pyx_k_needscons, sizeof(__pyx_k_needscons), 0, 0, 1, 1}, {&__pyx_n_u_nenabledconss, __pyx_k_nenabledconss, sizeof(__pyx_k_nenabledconss), 0, 1, 0, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_newCheck, __pyx_k_newCheck, sizeof(__pyx_k_newCheck), 0, 0, 1, 1}, {&__pyx_n_s_newEnf, __pyx_k_newEnf, sizeof(__pyx_k_newEnf), 0, 0, 1, 1}, {&__pyx_n_s_newInit, __pyx_k_newInit, sizeof(__pyx_k_newInit), 0, 0, 1, 1}, {&__pyx_n_s_newRem, __pyx_k_newRem, sizeof(__pyx_k_newRem), 0, 0, 1, 1}, {&__pyx_n_s_newbound, __pyx_k_newbound, sizeof(__pyx_k_newbound), 0, 0, 1, 1}, {&__pyx_n_s_newlhs, __pyx_k_newlhs, sizeof(__pyx_k_newlhs), 0, 0, 1, 1}, {&__pyx_n_s_newobj, __pyx_k_newobj, sizeof(__pyx_k_newobj), 0, 0, 1, 1}, {&__pyx_n_s_newrhs, __pyx_k_newrhs, sizeof(__pyx_k_newrhs), 0, 0, 1, 1}, {&__pyx_n_s_newval, __pyx_k_newval, sizeof(__pyx_k_newval), 0, 0, 1, 1}, {&__pyx_n_u_nfeasibleleaves, __pyx_k_nfeasibleleaves, sizeof(__pyx_k_nfeasibleleaves), 0, 1, 0, 1}, {&__pyx_n_u_nfixedvars, __pyx_k_nfixedvars, sizeof(__pyx_k_nfixedvars), 0, 1, 0, 1}, {&__pyx_n_u_ninfeasibleleaves, __pyx_k_ninfeasibleleaves, sizeof(__pyx_k_ninfeasibleleaves), 0, 1, 0, 1}, {&__pyx_n_u_ninternalnodes, __pyx_k_ninternalnodes, sizeof(__pyx_k_ninternalnodes), 0, 1, 0, 1}, {&__pyx_n_u_nleaves, __pyx_k_nleaves, sizeof(__pyx_k_nleaves), 0, 1, 0, 1}, {&__pyx_n_u_nlimsolsfound, __pyx_k_nlimsolsfound, sizeof(__pyx_k_nlimsolsfound), 0, 1, 0, 1}, {&__pyx_n_s_nlocksdown, __pyx_k_nlocksdown, sizeof(__pyx_k_nlocksdown), 0, 0, 1, 1}, {&__pyx_n_s_nlocksneg, __pyx_k_nlocksneg, sizeof(__pyx_k_nlocksneg), 0, 0, 1, 1}, {&__pyx_n_s_nlockspos, __pyx_k_nlockspos, sizeof(__pyx_k_nlockspos), 0, 0, 1, 1}, {&__pyx_n_s_nlocksup, __pyx_k_nlocksup, sizeof(__pyx_k_nlocksup), 0, 0, 1, 1}, {&__pyx_n_u_nlpiterations, __pyx_k_nlpiterations, sizeof(__pyx_k_nlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nlps, __pyx_k_nlps, sizeof(__pyx_k_nlps), 0, 1, 0, 1}, {&__pyx_n_s_nmarkedconss, __pyx_k_nmarkedconss, sizeof(__pyx_k_nmarkedconss), 0, 0, 1, 1}, {&__pyx_n_s_nnewaddconss, __pyx_k_nnewaddconss, sizeof(__pyx_k_nnewaddconss), 0, 0, 1, 1}, {&__pyx_n_u_nnewaddconss, __pyx_k_nnewaddconss, sizeof(__pyx_k_nnewaddconss), 0, 1, 0, 1}, {&__pyx_n_u_nnewaddholes, __pyx_k_nnewaddholes, sizeof(__pyx_k_nnewaddholes), 0, 1, 0, 1}, {&__pyx_n_s_nnewaggrvars, __pyx_k_nnewaggrvars, sizeof(__pyx_k_nnewaggrvars), 0, 0, 1, 1}, {&__pyx_n_u_nnewaggrvars, __pyx_k_nnewaggrvars, sizeof(__pyx_k_nnewaggrvars), 0, 1, 0, 1}, {&__pyx_n_s_nnewchgbds, __pyx_k_nnewchgbds, sizeof(__pyx_k_nnewchgbds), 0, 0, 1, 1}, {&__pyx_n_u_nnewchgbds, __pyx_k_nnewchgbds, sizeof(__pyx_k_nnewchgbds), 0, 1, 0, 1}, {&__pyx_n_s_nnewchgcoefs, __pyx_k_nnewchgcoefs, sizeof(__pyx_k_nnewchgcoefs), 0, 0, 1, 1}, {&__pyx_n_u_nnewchgcoefs, __pyx_k_nnewchgcoefs, sizeof(__pyx_k_nnewchgcoefs), 0, 1, 0, 1}, {&__pyx_n_s_nnewchgsides, __pyx_k_nnewchgsides, sizeof(__pyx_k_nnewchgsides), 0, 0, 1, 1}, {&__pyx_n_u_nnewchgsides, __pyx_k_nnewchgsides, sizeof(__pyx_k_nnewchgsides), 0, 1, 0, 1}, {&__pyx_n_s_nnewchgvartypes, __pyx_k_nnewchgvartypes, sizeof(__pyx_k_nnewchgvartypes), 0, 0, 1, 1}, {&__pyx_n_u_nnewchgvartypes, __pyx_k_nnewchgvartypes, sizeof(__pyx_k_nnewchgvartypes), 0, 1, 0, 1}, {&__pyx_n_s_nnewdelconss, __pyx_k_nnewdelconss, sizeof(__pyx_k_nnewdelconss), 0, 0, 1, 1}, {&__pyx_n_u_nnewdelconss, __pyx_k_nnewdelconss, sizeof(__pyx_k_nnewdelconss), 0, 1, 0, 1}, {&__pyx_n_s_nnewfixedvars, __pyx_k_nnewfixedvars, sizeof(__pyx_k_nnewfixedvars), 0, 0, 1, 1}, {&__pyx_n_u_nnewfixedvars, __pyx_k_nnewfixedvars, sizeof(__pyx_k_nnewfixedvars), 0, 1, 0, 1}, {&__pyx_n_s_nnewholes, __pyx_k_nnewholes, sizeof(__pyx_k_nnewholes), 0, 0, 1, 1}, {&__pyx_n_s_nnewupgdconss, __pyx_k_nnewupgdconss, sizeof(__pyx_k_nnewupgdconss), 0, 0, 1, 1}, {&__pyx_n_u_nnewupgdconss, __pyx_k_nnewupgdconss, sizeof(__pyx_k_nnewupgdconss), 0, 1, 0, 1}, {&__pyx_n_u_nnodeinitlpiterations, __pyx_k_nnodeinitlpiterations, sizeof(__pyx_k_nnodeinitlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nnodeinitlps, __pyx_k_nnodeinitlps, sizeof(__pyx_k_nnodeinitlps), 0, 1, 0, 1}, {&__pyx_n_u_nnodelpiterations, __pyx_k_nnodelpiterations, sizeof(__pyx_k_nnodelpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nnodelps, __pyx_k_nnodelps, sizeof(__pyx_k_nnodelps), 0, 1, 0, 1}, {&__pyx_n_u_nnodes, __pyx_k_nnodes, sizeof(__pyx_k_nnodes), 0, 1, 0, 1}, {&__pyx_n_u_nnodesleft, __pyx_k_nnodesleft, sizeof(__pyx_k_nnodesleft), 0, 1, 0, 1}, {&__pyx_n_u_nnzrs, __pyx_k_nnzrs, sizeof(__pyx_k_nnzrs), 0, 1, 0, 1}, {&__pyx_n_u_nnzs, __pyx_k_nnzs, sizeof(__pyx_k_nnzs), 0, 1, 0, 1}, {&__pyx_kp_u_no_dual_solution_available_for_c, __pyx_k_no_dual_solution_available_for_c, sizeof(__pyx_k_no_dual_solution_available_for_c), 0, 1, 0, 0}, {&__pyx_kp_u_no_reduced_cost_available_for_va, __pyx_k_no_reduced_cost_available_for_va, sizeof(__pyx_k_no_reduced_cost_available_for_va), 0, 1, 0, 0}, {&__pyx_n_u_nobjlimleaves, __pyx_k_nobjlimleaves, sizeof(__pyx_k_nobjlimleaves), 0, 1, 0, 1}, {&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1}, {&__pyx_n_s_node1, __pyx_k_node1, sizeof(__pyx_k_node1), 0, 0, 1, 1}, {&__pyx_n_s_node2, __pyx_k_node2, sizeof(__pyx_k_node2), 0, 0, 1, 1}, {&__pyx_n_s_nodecomp, __pyx_k_nodecomp, sizeof(__pyx_k_nodecomp), 0, 0, 1, 1}, {&__pyx_n_s_nodeexit, __pyx_k_nodeexit, sizeof(__pyx_k_nodeexit), 0, 0, 1, 1}, {&__pyx_n_s_nodeexitsol, __pyx_k_nodeexitsol, sizeof(__pyx_k_nodeexitsol), 0, 0, 1, 1}, {&__pyx_n_s_nodefree, __pyx_k_nodefree, sizeof(__pyx_k_nodefree), 0, 0, 1, 1}, {&__pyx_n_s_nodeinfeasible, __pyx_k_nodeinfeasible, sizeof(__pyx_k_nodeinfeasible), 0, 0, 1, 1}, {&__pyx_n_s_nodeinit, __pyx_k_nodeinit, sizeof(__pyx_k_nodeinit), 0, 0, 1, 1}, {&__pyx_n_s_nodeinitsol, __pyx_k_nodeinitsol, sizeof(__pyx_k_nodeinitsol), 0, 0, 1, 1}, {&__pyx_n_s_nodes, __pyx_k_nodes, sizeof(__pyx_k_nodes), 0, 0, 1, 1}, {&__pyx_n_s_nodesel, __pyx_k_nodesel, sizeof(__pyx_k_nodesel), 0, 0, 1, 1}, {&__pyx_n_s_nodeselect, __pyx_k_nodeselect, sizeof(__pyx_k_nodeselect), 0, 0, 1, 1}, {&__pyx_n_s_nodeselprio, __pyx_k_nodeselprio, sizeof(__pyx_k_nodeselprio), 0, 0, 1, 1}, {&__pyx_n_s_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 0, 1, 1}, {&__pyx_n_u_norms, __pyx_k_norms, sizeof(__pyx_k_norms), 0, 1, 0, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_u_npricerounds, __pyx_k_npricerounds, sizeof(__pyx_k_npricerounds), 0, 1, 0, 1}, {&__pyx_n_u_npricevars, __pyx_k_npricevars, sizeof(__pyx_k_npricevars), 0, 1, 0, 1}, {&__pyx_n_u_npricevarsapplied, __pyx_k_npricevarsapplied, sizeof(__pyx_k_npricevarsapplied), 0, 1, 0, 1}, {&__pyx_n_u_npricevarsfound, __pyx_k_npricevarsfound, sizeof(__pyx_k_npricevarsfound), 0, 1, 0, 1}, {&__pyx_n_u_nprimallpiterations, __pyx_k_nprimallpiterations, sizeof(__pyx_k_nprimallpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nprimallps, __pyx_k_nprimallps, sizeof(__pyx_k_nprimallps), 0, 1, 0, 1}, {&__pyx_n_u_nprimalresolvelpiterations, __pyx_k_nprimalresolvelpiterations, sizeof(__pyx_k_nprimalresolvelpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nprimalresolvelps, __pyx_k_nprimalresolvelps, sizeof(__pyx_k_nprimalresolvelps), 0, 1, 0, 1}, {&__pyx_n_s_npriomergecands, __pyx_k_npriomergecands, sizeof(__pyx_k_npriomergecands), 0, 0, 1, 1}, {&__pyx_n_u_nreoptruns, __pyx_k_nreoptruns, sizeof(__pyx_k_nreoptruns), 0, 1, 0, 1}, {&__pyx_n_u_nresolvelpiterations, __pyx_k_nresolvelpiterations, sizeof(__pyx_k_nresolvelpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nresolvelps, __pyx_k_nresolvelps, sizeof(__pyx_k_nresolvelps), 0, 1, 0, 1}, {&__pyx_n_u_nrhs_ratio_max, __pyx_k_nrhs_ratio_max, sizeof(__pyx_k_nrhs_ratio_max), 0, 1, 0, 1}, {&__pyx_n_u_nrhs_ratio_min, __pyx_k_nrhs_ratio_min, sizeof(__pyx_k_nrhs_ratio_min), 0, 1, 0, 1}, {&__pyx_n_u_nrootfirstlpiterations, __pyx_k_nrootfirstlpiterations, sizeof(__pyx_k_nrootfirstlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nrootlpiterations, __pyx_k_nrootlpiterations, sizeof(__pyx_k_nrootlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nrootstrongbranchlpiterations, __pyx_k_nrootstrongbranchlpiterations, sizeof(__pyx_k_nrootstrongbranchlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nrootstrongbranchs, __pyx_k_nrootstrongbranchs, sizeof(__pyx_k_nrootstrongbranchs), 0, 1, 0, 1}, {&__pyx_n_s_nrounds, __pyx_k_nrounds, sizeof(__pyx_k_nrounds), 0, 0, 1, 1}, {&__pyx_n_s_nrows, __pyx_k_nrows, sizeof(__pyx_k_nrows), 0, 0, 1, 1}, {&__pyx_n_u_nruns, __pyx_k_nruns, sizeof(__pyx_k_nruns), 0, 1, 0, 1}, {&__pyx_n_u_nseparounds, __pyx_k_nseparounds, sizeof(__pyx_k_nseparounds), 0, 1, 0, 1}, {&__pyx_n_u_nsolsfound, __pyx_k_nsolsfound, sizeof(__pyx_k_nsolsfound), 0, 1, 0, 1}, {&__pyx_n_u_nstrongbranchlpiterations, __pyx_k_nstrongbranchlpiterations, sizeof(__pyx_k_nstrongbranchlpiterations), 0, 1, 0, 1}, {&__pyx_n_u_nstrongbranchs, __pyx_k_nstrongbranchs, sizeof(__pyx_k_nstrongbranchs), 0, 1, 0, 1}, {&__pyx_n_s_nsubproblems, __pyx_k_nsubproblems, sizeof(__pyx_k_nsubproblems), 0, 0, 1, 1}, {&__pyx_n_u_ntotalnodes, __pyx_k_ntotalnodes, sizeof(__pyx_k_ntotalnodes), 0, 1, 0, 1}, {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0}, {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0}, {&__pyx_n_u_nupgdconss, __pyx_k_nupgdconss, sizeof(__pyx_k_nupgdconss), 0, 1, 0, 1}, {&__pyx_n_s_nusefulconss, __pyx_k_nusefulconss, sizeof(__pyx_k_nusefulconss), 0, 0, 1, 1}, {&__pyx_n_u_nvars, __pyx_k_nvars, sizeof(__pyx_k_nvars), 0, 1, 0, 1}, {&__pyx_n_u_nzrcoef, __pyx_k_nzrcoef, sizeof(__pyx_k_nzrcoef), 0, 1, 0, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_u_objcossims, __pyx_k_objcossims, sizeof(__pyx_k_objcossims), 0, 1, 0, 1}, {&__pyx_n_u_objective, __pyx_k_objective, sizeof(__pyx_k_objective), 0, 1, 0, 1}, {&__pyx_n_s_objinfeasible, __pyx_k_objinfeasible, sizeof(__pyx_k_objinfeasible), 0, 0, 1, 1}, {&__pyx_n_s_objs, __pyx_k_objs, sizeof(__pyx_k_objs), 0, 0, 1, 1}, {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, {&__pyx_n_s_onlychanged, __pyx_k_onlychanged, sizeof(__pyx_k_onlychanged), 0, 0, 1, 1}, {&__pyx_n_s_onlyconvex, __pyx_k_onlyconvex, sizeof(__pyx_k_onlyconvex), 0, 0, 1, 1}, {&__pyx_n_s_onlyroot, __pyx_k_onlyroot, sizeof(__pyx_k_onlyroot), 0, 0, 1, 1}, {&__pyx_n_s_op, __pyx_k_op, sizeof(__pyx_k_op), 0, 0, 1, 1}, {&__pyx_n_s_op_2, __pyx_k_op_2, sizeof(__pyx_k_op_2), 0, 0, 1, 1}, {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, {&__pyx_n_u_opennodes_10quant, __pyx_k_opennodes_10quant, sizeof(__pyx_k_opennodes_10quant), 0, 1, 0, 1}, {&__pyx_n_u_opennodes_25quant, __pyx_k_opennodes_25quant, sizeof(__pyx_k_opennodes_25quant), 0, 1, 0, 1}, {&__pyx_n_u_opennodes_50quant, __pyx_k_opennodes_50quant, sizeof(__pyx_k_opennodes_50quant), 0, 1, 0, 1}, {&__pyx_n_u_opennodes_75quant, __pyx_k_opennodes_75quant, sizeof(__pyx_k_opennodes_75quant), 0, 1, 0, 1}, {&__pyx_n_u_opennodes_90quant, __pyx_k_opennodes_90quant, sizeof(__pyx_k_opennodes_90quant), 0, 1, 0, 1}, {&__pyx_n_s_operatorIndexDic, __pyx_k_operatorIndexDic, sizeof(__pyx_k_operatorIndexDic), 0, 0, 1, 1}, {&__pyx_n_u_optimal, __pyx_k_optimal, sizeof(__pyx_k_optimal), 0, 1, 0, 1}, {&__pyx_n_u_or, __pyx_k_or, sizeof(__pyx_k_or), 0, 1, 0, 1}, {&__pyx_n_s_origcopy, __pyx_k_origcopy, sizeof(__pyx_k_origcopy), 0, 0, 1, 1}, {&__pyx_n_s_original, __pyx_k_original, sizeof(__pyx_k_original), 0, 0, 1, 1}, {&__pyx_kp_u_origprob_sol, __pyx_k_origprob_sol, sizeof(__pyx_k_origprob_sol), 0, 1, 0, 0}, {&__pyx_kp_u_origprob_stats, __pyx_k_origprob_stats, sizeof(__pyx_k_origprob_stats), 0, 1, 0, 0}, {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1}, {&__pyx_n_u_ota_nn_max, __pyx_k_ota_nn_max, sizeof(__pyx_k_ota_nn_max), 0, 1, 0, 1}, {&__pyx_n_u_ota_nn_min, __pyx_k_ota_nn_min, sizeof(__pyx_k_ota_nn_min), 0, 1, 0, 1}, {&__pyx_n_u_ota_np_max, __pyx_k_ota_np_max, sizeof(__pyx_k_ota_np_max), 0, 1, 0, 1}, {&__pyx_n_u_ota_np_min, __pyx_k_ota_np_min, sizeof(__pyx_k_ota_np_min), 0, 1, 0, 1}, {&__pyx_n_u_ota_pn_max, __pyx_k_ota_pn_max, sizeof(__pyx_k_ota_pn_max), 0, 1, 0, 1}, {&__pyx_n_u_ota_pn_min, __pyx_k_ota_pn_min, sizeof(__pyx_k_ota_pn_min), 0, 1, 0, 1}, {&__pyx_n_u_ota_pp_max, __pyx_k_ota_pp_max, sizeof(__pyx_k_ota_pp_max), 0, 1, 0, 1}, {&__pyx_n_u_ota_pp_min, __pyx_k_ota_pp_min, sizeof(__pyx_k_ota_pp_min), 0, 1, 0, 1}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_overwrite_input, __pyx_k_overwrite_input, sizeof(__pyx_k_overwrite_input), 0, 0, 1, 1}, {&__pyx_n_s_paraemphasis, __pyx_k_paraemphasis, sizeof(__pyx_k_paraemphasis), 0, 0, 1, 1}, {&__pyx_kp_u_param_set, __pyx_k_param_set, sizeof(__pyx_k_param_set), 0, 1, 0, 0}, {&__pyx_n_s_percentile, __pyx_k_percentile, sizeof(__pyx_k_percentile), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, {&__pyx_n_u_plungedepth, __pyx_k_plungedepth, sizeof(__pyx_k_plungedepth), 0, 1, 0, 1}, {&__pyx_n_s_plus, __pyx_k_plus, sizeof(__pyx_k_plus), 0, 0, 1, 1}, {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, {&__pyx_n_s_power, __pyx_k_power, sizeof(__pyx_k_power), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_presol, __pyx_k_presol, sizeof(__pyx_k_presol), 0, 0, 1, 1}, {&__pyx_n_s_presolexec, __pyx_k_presolexec, sizeof(__pyx_k_presolexec), 0, 0, 1, 1}, {&__pyx_n_s_presolexit, __pyx_k_presolexit, sizeof(__pyx_k_presolexit), 0, 0, 1, 1}, {&__pyx_n_s_presolexitpre, __pyx_k_presolexitpre, sizeof(__pyx_k_presolexitpre), 0, 0, 1, 1}, {&__pyx_n_s_presolfree, __pyx_k_presolfree, sizeof(__pyx_k_presolfree), 0, 0, 1, 1}, {&__pyx_n_s_presolinit, __pyx_k_presolinit, sizeof(__pyx_k_presolinit), 0, 0, 1, 1}, {&__pyx_n_s_presolinitpre, __pyx_k_presolinitpre, sizeof(__pyx_k_presolinitpre), 0, 0, 1, 1}, {&__pyx_n_s_presolmaxrounds, __pyx_k_presolmaxrounds, sizeof(__pyx_k_presolmaxrounds), 0, 0, 1, 1}, {&__pyx_n_s_presolpriority, __pyx_k_presolpriority, sizeof(__pyx_k_presolpriority), 0, 0, 1, 1}, {&__pyx_n_s_presoltiming, __pyx_k_presoltiming, sizeof(__pyx_k_presoltiming), 0, 0, 1, 1}, {&__pyx_n_s_prev_state, __pyx_k_prev_state, sizeof(__pyx_k_prev_state), 0, 0, 1, 1}, {&__pyx_n_u_prhs_ratio_max, __pyx_k_prhs_ratio_max, sizeof(__pyx_k_prhs_ratio_max), 0, 1, 0, 1}, {&__pyx_n_u_prhs_ratio_min, __pyx_k_prhs_ratio_min, sizeof(__pyx_k_prhs_ratio_min), 0, 1, 0, 1}, {&__pyx_n_s_pricedVar, __pyx_k_pricedVar, sizeof(__pyx_k_pricedVar), 0, 0, 1, 1}, {&__pyx_n_s_pricer, __pyx_k_pricer, sizeof(__pyx_k_pricer), 0, 0, 1, 1}, {&__pyx_n_s_pricerexit, __pyx_k_pricerexit, sizeof(__pyx_k_pricerexit), 0, 0, 1, 1}, {&__pyx_n_s_pricerexitsol, __pyx_k_pricerexitsol, sizeof(__pyx_k_pricerexitsol), 0, 0, 1, 1}, {&__pyx_n_s_pricerfarkas, __pyx_k_pricerfarkas, sizeof(__pyx_k_pricerfarkas), 0, 0, 1, 1}, {&__pyx_n_s_pricerfree, __pyx_k_pricerfree, sizeof(__pyx_k_pricerfree), 0, 0, 1, 1}, {&__pyx_n_s_pricerinit, __pyx_k_pricerinit, sizeof(__pyx_k_pricerinit), 0, 0, 1, 1}, {&__pyx_n_s_pricerinitsol, __pyx_k_pricerinitsol, sizeof(__pyx_k_pricerinitsol), 0, 0, 1, 1}, {&__pyx_n_s_pricerredcost, __pyx_k_pricerredcost, sizeof(__pyx_k_pricerredcost), 0, 0, 1, 1}, {&__pyx_n_u_primalbound, __pyx_k_primalbound, sizeof(__pyx_k_primalbound), 0, 1, 0, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_print_memory_in_use, __pyx_k_print_memory_in_use, sizeof(__pyx_k_print_memory_in_use), 0, 0, 1, 1}, {&__pyx_n_s_printreason, __pyx_k_printreason, sizeof(__pyx_k_printreason), 0, 0, 1, 1}, {&__pyx_n_s_priority, __pyx_k_priority, sizeof(__pyx_k_priority), 0, 0, 1, 1}, {&__pyx_n_s_problemName, __pyx_k_problemName, sizeof(__pyx_k_problemName), 0, 0, 1, 1}, {&__pyx_n_s_probnumber, __pyx_k_probnumber, sizeof(__pyx_k_probnumber), 0, 0, 1, 1}, {&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1}, {&__pyx_n_u_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 1, 0, 1}, {&__pyx_n_s_prodexpr, __pyx_k_prodexpr, sizeof(__pyx_k_prodexpr), 0, 0, 1, 1}, {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1}, {&__pyx_n_s_propagate, __pyx_k_propagate, sizeof(__pyx_k_propagate), 0, 0, 1, 1}, {&__pyx_n_u_propagate, __pyx_k_propagate, sizeof(__pyx_k_propagate), 0, 1, 0, 1}, {&__pyx_kp_u_propagating_maxrounds, __pyx_k_propagating_maxrounds, sizeof(__pyx_k_propagating_maxrounds), 0, 1, 0, 0}, {&__pyx_kp_u_propagating_maxroundsroot, __pyx_k_propagating_maxroundsroot, sizeof(__pyx_k_propagating_maxroundsroot), 0, 1, 0, 0}, {&__pyx_n_s_propexec, __pyx_k_propexec, sizeof(__pyx_k_propexec), 0, 0, 1, 1}, {&__pyx_n_s_propexit, __pyx_k_propexit, sizeof(__pyx_k_propexit), 0, 0, 1, 1}, {&__pyx_n_s_propexitpre, __pyx_k_propexitpre, sizeof(__pyx_k_propexitpre), 0, 0, 1, 1}, {&__pyx_n_s_propexitsol, __pyx_k_propexitsol, sizeof(__pyx_k_propexitsol), 0, 0, 1, 1}, {&__pyx_n_s_propfree, __pyx_k_propfree, sizeof(__pyx_k_propfree), 0, 0, 1, 1}, {&__pyx_n_s_propfreq, __pyx_k_propfreq, sizeof(__pyx_k_propfreq), 0, 0, 1, 1}, {&__pyx_n_s_propinit, __pyx_k_propinit, sizeof(__pyx_k_propinit), 0, 0, 1, 1}, {&__pyx_n_s_propinitpre, __pyx_k_propinitpre, sizeof(__pyx_k_propinitpre), 0, 0, 1, 1}, {&__pyx_n_s_propinitsol, __pyx_k_propinitsol, sizeof(__pyx_k_propinitsol), 0, 0, 1, 1}, {&__pyx_n_s_proppresol, __pyx_k_proppresol, sizeof(__pyx_k_proppresol), 0, 0, 1, 1}, {&__pyx_n_s_propresprop, __pyx_k_propresprop, sizeof(__pyx_k_propresprop), 0, 0, 1, 1}, {&__pyx_n_s_proptiming, __pyx_k_proptiming, sizeof(__pyx_k_proptiming), 0, 0, 1, 1}, {&__pyx_n_s_proxy, __pyx_k_proxy, sizeof(__pyx_k_proxy), 0, 0, 1, 1}, {&__pyx_n_u_ps_down, __pyx_k_ps_down, sizeof(__pyx_k_ps_down), 0, 1, 0, 1}, {&__pyx_n_u_ps_product, __pyx_k_ps_product, sizeof(__pyx_k_ps_product), 0, 1, 0, 1}, {&__pyx_n_u_ps_ratio, __pyx_k_ps_ratio, sizeof(__pyx_k_ps_ratio), 0, 1, 0, 1}, {&__pyx_n_u_ps_sum, __pyx_k_ps_sum, sizeof(__pyx_k_ps_sum), 0, 1, 0, 1}, {&__pyx_n_u_ps_up, __pyx_k_ps_up, sizeof(__pyx_k_ps_up), 0, 1, 0, 1}, {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1}, {&__pyx_n_s_ptrtuple, __pyx_k_ptrtuple, sizeof(__pyx_k_ptrtuple), 0, 0, 1, 1}, {&__pyx_n_u_ptrtuple, __pyx_k_ptrtuple, sizeof(__pyx_k_ptrtuple), 0, 1, 0, 1}, {&__pyx_n_s_pyscipopt_scip, __pyx_k_pyscipopt_scip, sizeof(__pyx_k_pyscipopt_scip), 0, 0, 1, 1}, {&__pyx_kp_u_python_error_in_benderscreatesub, __pyx_k_python_error_in_benderscreatesub, sizeof(__pyx_k_python_error_in_benderscreatesub), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_benderscutexec_t, __pyx_k_python_error_in_benderscutexec_t, sizeof(__pyx_k_python_error_in_benderscutexec_t), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_bendersgetvar_th, __pyx_k_python_error_in_bendersgetvar_th, sizeof(__pyx_k_python_error_in_bendersgetvar_th), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_conscheck_this_m, __pyx_k_python_error_in_conscheck_this_m, sizeof(__pyx_k_python_error_in_conscheck_this_m), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_consenfolp_this, __pyx_k_python_error_in_consenfolp_this, sizeof(__pyx_k_python_error_in_consenfolp_this), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_consenfops_this, __pyx_k_python_error_in_consenfops_this, sizeof(__pyx_k_python_error_in_consenfops_this), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_consenforelax_th, __pyx_k_python_error_in_consenforelax_th, sizeof(__pyx_k_python_error_in_consenforelax_th), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_conslock_this_me, __pyx_k_python_error_in_conslock_this_me, sizeof(__pyx_k_python_error_in_conslock_this_me), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_eventexec_this_m, __pyx_k_python_error_in_eventexec_this_m, sizeof(__pyx_k_python_error_in_eventexec_this_m), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_heurexec_this_me, __pyx_k_python_error_in_heurexec_this_me, sizeof(__pyx_k_python_error_in_heurexec_this_me), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_presolexec_this, __pyx_k_python_error_in_presolexec_this, sizeof(__pyx_k_python_error_in_presolexec_this), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_pricerredcost_th, __pyx_k_python_error_in_pricerredcost_th, sizeof(__pyx_k_python_error_in_pricerredcost_th), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_propexec_this_me, __pyx_k_python_error_in_propexec_this_me, sizeof(__pyx_k_python_error_in_propexec_this_me), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_propresprop_this, __pyx_k_python_error_in_propresprop_this, sizeof(__pyx_k_python_error_in_propresprop_this), 0, 1, 0, 0}, {&__pyx_kp_u_python_error_in_relaxexec_this_m, __pyx_k_python_error_in_relaxexec_this_m, sizeof(__pyx_k_python_error_in_relaxexec_this_m), 0, 1, 0, 0}, {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Benders, __pyx_k_pyx_unpickle_Benders, sizeof(__pyx_k_pyx_unpickle_Benders), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Benderscut, __pyx_k_pyx_unpickle_Benderscut, sizeof(__pyx_k_pyx_unpickle_Benderscut), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Branchrule, __pyx_k_pyx_unpickle_Branchrule, sizeof(__pyx_k_pyx_unpickle_Branchrule), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Conshdlr, __pyx_k_pyx_unpickle_Conshdlr, sizeof(__pyx_k_pyx_unpickle_Conshdlr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Constant, __pyx_k_pyx_unpickle_Constant, sizeof(__pyx_k_pyx_unpickle_Constant), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Eventhdlr, __pyx_k_pyx_unpickle_Eventhdlr, sizeof(__pyx_k_pyx_unpickle_Eventhdlr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Expr, __pyx_k_pyx_unpickle_Expr, sizeof(__pyx_k_pyx_unpickle_Expr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_ExprCons, __pyx_k_pyx_unpickle_ExprCons, sizeof(__pyx_k_pyx_unpickle_ExprCons), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_GenExpr, __pyx_k_pyx_unpickle_GenExpr, sizeof(__pyx_k_pyx_unpickle_GenExpr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Heur, __pyx_k_pyx_unpickle_Heur, sizeof(__pyx_k_pyx_unpickle_Heur), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Nodesel, __pyx_k_pyx_unpickle_Nodesel, sizeof(__pyx_k_pyx_unpickle_Nodesel), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_BENDERSEN, __pyx_k_pyx_unpickle_PY_SCIP_BENDERSEN, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_BENDERSEN), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_BRANCHDIR, __pyx_k_pyx_unpickle_PY_SCIP_BRANCHDIR, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_BRANCHDIR), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_EVENTTYPE, __pyx_k_pyx_unpickle_PY_SCIP_EVENTTYPE, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_EVENTTYPE), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_HEURTIMIN, __pyx_k_pyx_unpickle_PY_SCIP_HEURTIMIN, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_HEURTIMIN), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_LPSOLSTAT, __pyx_k_pyx_unpickle_PY_SCIP_LPSOLSTAT, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_LPSOLSTAT), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_NODETYPE, __pyx_k_pyx_unpickle_PY_SCIP_NODETYPE, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_NODETYPE), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_PARAMEMPH, __pyx_k_pyx_unpickle_PY_SCIP_PARAMEMPH, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_PARAMEMPH), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_PARAMSETT, __pyx_k_pyx_unpickle_PY_SCIP_PARAMSETT, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_PARAMSETT), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_PRESOLTIM, __pyx_k_pyx_unpickle_PY_SCIP_PRESOLTIM, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_PRESOLTIM), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_PROPTIMIN, __pyx_k_pyx_unpickle_PY_SCIP_PROPTIMIN, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_PROPTIMIN), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_RESULT, __pyx_k_pyx_unpickle_PY_SCIP_RESULT, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_RESULT), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_STAGE, __pyx_k_pyx_unpickle_PY_SCIP_STAGE, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_STAGE), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PY_SCIP_STATUS, __pyx_k_pyx_unpickle_PY_SCIP_STATUS, sizeof(__pyx_k_pyx_unpickle_PY_SCIP_STATUS), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_PowExpr, __pyx_k_pyx_unpickle_PowExpr, sizeof(__pyx_k_pyx_unpickle_PowExpr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Presol, __pyx_k_pyx_unpickle_Presol, sizeof(__pyx_k_pyx_unpickle_Presol), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Pricer, __pyx_k_pyx_unpickle_Pricer, sizeof(__pyx_k_pyx_unpickle_Pricer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_ProdExpr, __pyx_k_pyx_unpickle_ProdExpr, sizeof(__pyx_k_pyx_unpickle_ProdExpr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Prop, __pyx_k_pyx_unpickle_Prop, sizeof(__pyx_k_pyx_unpickle_Prop), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Relax, __pyx_k_pyx_unpickle_Relax, sizeof(__pyx_k_pyx_unpickle_Relax), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Sepa, __pyx_k_pyx_unpickle_Sepa, sizeof(__pyx_k_pyx_unpickle_Sepa), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_SumExpr, __pyx_k_pyx_unpickle_SumExpr, sizeof(__pyx_k_pyx_unpickle_SumExpr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_UnaryExpr, __pyx_k_pyx_unpickle_UnaryExpr, sizeof(__pyx_k_pyx_unpickle_UnaryExpr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_VarExpr, __pyx_k_pyx_unpickle_VarExpr, sizeof(__pyx_k_pyx_unpickle_VarExpr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_quadcons, __pyx_k_quadcons, sizeof(__pyx_k_quadcons), 0, 0, 1, 1}, {&__pyx_n_u_quadratic, __pyx_k_quadratic, sizeof(__pyx_k_quadratic), 0, 1, 0, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_quickprod, __pyx_k_quickprod, sizeof(__pyx_k_quickprod), 0, 0, 1, 1}, {&__pyx_n_s_quicksum, __pyx_k_quicksum, sizeof(__pyx_k_quicksum), 0, 0, 1, 1}, {&__pyx_n_s_quiet, __pyx_k_quiet, sizeof(__pyx_k_quiet), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1}, {&__pyx_n_u_redcosts, __pyx_k_redcosts, sizeof(__pyx_k_redcosts), 0, 1, 0, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_relax, __pyx_k_relax, sizeof(__pyx_k_relax), 0, 0, 1, 1}, {&__pyx_n_s_relaxedbd, __pyx_k_relaxedbd, sizeof(__pyx_k_relaxedbd), 0, 0, 1, 1}, {&__pyx_n_s_relaxexec, __pyx_k_relaxexec, sizeof(__pyx_k_relaxexec), 0, 0, 1, 1}, {&__pyx_n_s_relaxexit, __pyx_k_relaxexit, sizeof(__pyx_k_relaxexit), 0, 0, 1, 1}, {&__pyx_n_s_relaxexitsol, __pyx_k_relaxexitsol, sizeof(__pyx_k_relaxexitsol), 0, 0, 1, 1}, {&__pyx_n_s_relaxfree, __pyx_k_relaxfree, sizeof(__pyx_k_relaxfree), 0, 0, 1, 1}, {&__pyx_n_s_relaxinit, __pyx_k_relaxinit, sizeof(__pyx_k_relaxinit), 0, 0, 1, 1}, {&__pyx_n_s_relaxinitsol, __pyx_k_relaxinitsol, sizeof(__pyx_k_relaxinitsol), 0, 0, 1, 1}, {&__pyx_n_s_removable, __pyx_k_removable, sizeof(__pyx_k_removable), 0, 0, 1, 1}, {&__pyx_n_u_removable, __pyx_k_removable, sizeof(__pyx_k_removable), 0, 1, 0, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_repr___locals_lambda, __pyx_k_repr___locals_lambda, sizeof(__pyx_k_repr___locals_lambda), 0, 0, 1, 1}, {&__pyx_n_u_repropdepth, __pyx_k_repropdepth, sizeof(__pyx_k_repropdepth), 0, 1, 0, 1}, {&__pyx_n_s_restart, __pyx_k_restart, sizeof(__pyx_k_restart), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_u_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 1, 0, 1}, {&__pyx_n_s_result_dict, __pyx_k_result_dict, sizeof(__pyx_k_result_dict), 0, 0, 1, 1}, {&__pyx_n_s_resvar, __pyx_k_resvar, sizeof(__pyx_k_resvar), 0, 0, 1, 1}, {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1}, {&__pyx_n_u_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 1, 0, 1}, {&__pyx_n_s_rhs_2, __pyx_k_rhs_2, sizeof(__pyx_k_rhs_2), 0, 0, 1, 1}, {&__pyx_n_u_rhs_vec, __pyx_k_rhs_vec, sizeof(__pyx_k_rhs_vec), 0, 1, 0, 1}, {&__pyx_n_s_rhss, __pyx_k_rhss, sizeof(__pyx_k_rhss), 0, 0, 1, 1}, {&__pyx_n_u_rhss, __pyx_k_rhss, sizeof(__pyx_k_rhss), 0, 1, 0, 1}, {&__pyx_n_s_rhsvar, __pyx_k_rhsvar, sizeof(__pyx_k_rhsvar), 0, 0, 1, 1}, {&__pyx_n_u_root_cdeg_max, __pyx_k_root_cdeg_max, sizeof(__pyx_k_root_cdeg_max), 0, 1, 0, 1}, {&__pyx_n_u_root_cdeg_mean, __pyx_k_root_cdeg_mean, sizeof(__pyx_k_root_cdeg_mean), 0, 1, 0, 1}, {&__pyx_n_u_root_cdeg_min, __pyx_k_root_cdeg_min, sizeof(__pyx_k_root_cdeg_min), 0, 1, 0, 1}, {&__pyx_n_u_root_cdeg_var, __pyx_k_root_cdeg_var, sizeof(__pyx_k_root_cdeg_var), 0, 1, 0, 1}, {&__pyx_n_s_root_info, __pyx_k_root_info, sizeof(__pyx_k_root_info), 0, 0, 1, 1}, {&__pyx_n_u_root_ncoefs_count, __pyx_k_root_ncoefs_count, sizeof(__pyx_k_root_ncoefs_count), 0, 1, 0, 1}, {&__pyx_n_u_root_ncoefs_max, __pyx_k_root_ncoefs_max, sizeof(__pyx_k_root_ncoefs_max), 0, 1, 0, 1}, {&__pyx_n_u_root_ncoefs_mean, __pyx_k_root_ncoefs_mean, sizeof(__pyx_k_root_ncoefs_mean), 0, 1, 0, 1}, {&__pyx_n_u_root_ncoefs_min, __pyx_k_root_ncoefs_min, sizeof(__pyx_k_root_ncoefs_min), 0, 1, 0, 1}, {&__pyx_n_u_root_ncoefs_var, __pyx_k_root_ncoefs_var, sizeof(__pyx_k_root_ncoefs_var), 0, 1, 0, 1}, {&__pyx_n_u_root_pcoefs_count, __pyx_k_root_pcoefs_count, sizeof(__pyx_k_root_pcoefs_count), 0, 1, 0, 1}, {&__pyx_n_u_root_pcoefs_max, __pyx_k_root_pcoefs_max, sizeof(__pyx_k_root_pcoefs_max), 0, 1, 0, 1}, {&__pyx_n_u_root_pcoefs_mean, __pyx_k_root_pcoefs_mean, sizeof(__pyx_k_root_pcoefs_mean), 0, 1, 0, 1}, {&__pyx_n_u_root_pcoefs_min, __pyx_k_root_pcoefs_min, sizeof(__pyx_k_root_pcoefs_min), 0, 1, 0, 1}, {&__pyx_n_u_root_pcoefs_var, __pyx_k_root_pcoefs_var, sizeof(__pyx_k_root_pcoefs_var), 0, 1, 0, 1}, {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1}, {&__pyx_n_u_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 1, 0, 1}, {&__pyx_n_u_rowidxs, __pyx_k_rowidxs, sizeof(__pyx_k_rowidxs), 0, 1, 0, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_kp_s_self__scip_self__valid_cannot_be, __pyx_k_self__scip_self__valid_cannot_be, sizeof(__pyx_k_self__scip_self__valid_cannot_be), 0, 0, 1, 0}, {&__pyx_kp_s_self_event_cannot_be_converted_t, __pyx_k_self_event_cannot_be_converted_t, sizeof(__pyx_k_self_event_cannot_be_converted_t), 0, 0, 1, 0}, {&__pyx_kp_s_self_lpi_cannot_be_converted_to, __pyx_k_self_lpi_cannot_be_converted_to, sizeof(__pyx_k_self_lpi_cannot_be_converted_to), 0, 0, 1, 0}, {&__pyx_kp_s_self_scip_col_cannot_be_converte, __pyx_k_self_scip_col_cannot_be_converte, sizeof(__pyx_k_self_scip_col_cannot_be_converte), 0, 0, 1, 0}, {&__pyx_kp_s_self_scip_cons_cannot_be_convert, __pyx_k_self_scip_cons_cannot_be_convert, sizeof(__pyx_k_self_scip_cons_cannot_be_convert), 0, 0, 1, 0}, {&__pyx_kp_s_self_scip_node_cannot_be_convert, __pyx_k_self_scip_node_cannot_be_convert, sizeof(__pyx_k_self_scip_node_cannot_be_convert), 0, 0, 1, 0}, {&__pyx_kp_s_self_scip_row_cannot_be_converte, __pyx_k_self_scip_row_cannot_be_converte, sizeof(__pyx_k_self_scip_row_cannot_be_converte), 0, 0, 1, 0}, {&__pyx_kp_s_self_scip_var_cannot_be_converte, __pyx_k_self_scip_var_cannot_be_converte, sizeof(__pyx_k_self_scip_var_cannot_be_converte), 0, 0, 1, 0}, {&__pyx_kp_s_self_sol_cannot_be_converted_to, __pyx_k_self_sol_cannot_be_converted_to, sizeof(__pyx_k_self_sol_cannot_be_converted_to), 0, 0, 1, 0}, {&__pyx_n_u_selnode, __pyx_k_selnode, sizeof(__pyx_k_selnode), 0, 1, 0, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_sense, __pyx_k_sense, sizeof(__pyx_k_sense), 0, 0, 1, 1}, {&__pyx_n_s_sepa, __pyx_k_sepa, sizeof(__pyx_k_sepa), 0, 0, 1, 1}, {&__pyx_n_s_sepaexeclp, __pyx_k_sepaexeclp, sizeof(__pyx_k_sepaexeclp), 0, 0, 1, 1}, {&__pyx_n_s_sepaexecsol, __pyx_k_sepaexecsol, sizeof(__pyx_k_sepaexecsol), 0, 0, 1, 1}, {&__pyx_n_s_sepaexit, __pyx_k_sepaexit, sizeof(__pyx_k_sepaexit), 0, 0, 1, 1}, {&__pyx_n_s_sepaexitsol, __pyx_k_sepaexitsol, sizeof(__pyx_k_sepaexitsol), 0, 0, 1, 1}, {&__pyx_n_s_sepafree, __pyx_k_sepafree, sizeof(__pyx_k_sepafree), 0, 0, 1, 1}, {&__pyx_n_s_sepafreq, __pyx_k_sepafreq, sizeof(__pyx_k_sepafreq), 0, 0, 1, 1}, {&__pyx_n_s_sepainit, __pyx_k_sepainit, sizeof(__pyx_k_sepainit), 0, 0, 1, 1}, {&__pyx_n_s_sepainitsol, __pyx_k_sepainitsol, sizeof(__pyx_k_sepainitsol), 0, 0, 1, 1}, {&__pyx_n_s_sepapriority, __pyx_k_sepapriority, sizeof(__pyx_k_sepapriority), 0, 0, 1, 1}, {&__pyx_n_s_separate, __pyx_k_separate, sizeof(__pyx_k_separate), 0, 0, 1, 1}, {&__pyx_n_u_separate, __pyx_k_separate, sizeof(__pyx_k_separate), 0, 1, 0, 1}, {&__pyx_n_s_setBoolParam, __pyx_k_setBoolParam, sizeof(__pyx_k_setBoolParam), 0, 0, 1, 1}, {&__pyx_n_s_setIntParam, __pyx_k_setIntParam, sizeof(__pyx_k_setIntParam), 0, 0, 1, 1}, {&__pyx_n_s_setMaximize, __pyx_k_setMaximize, sizeof(__pyx_k_setMaximize), 0, 0, 1, 1}, {&__pyx_n_s_setMinimize, __pyx_k_setMinimize, sizeof(__pyx_k_setMinimize), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_shareaux, __pyx_k_shareaux, sizeof(__pyx_k_shareaux), 0, 0, 1, 1}, {&__pyx_n_s_side, __pyx_k_side, sizeof(__pyx_k_side), 0, 0, 1, 1}, {&__pyx_n_u_skipsolve, __pyx_k_skipsolve, sizeof(__pyx_k_skipsolve), 0, 1, 0, 1}, {&__pyx_n_u_slack, __pyx_k_slack, sizeof(__pyx_k_slack), 0, 1, 0, 1}, {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1}, {&__pyx_n_s_sol, __pyx_k_sol, sizeof(__pyx_k_sol), 0, 0, 1, 1}, {&__pyx_n_u_sol_is_at_lb, __pyx_k_sol_is_at_lb, sizeof(__pyx_k_sol_is_at_lb), 0, 1, 0, 1}, {&__pyx_n_u_sol_is_at_ub, __pyx_k_sol_is_at_ub, sizeof(__pyx_k_sol_is_at_ub), 0, 1, 0, 1}, {&__pyx_n_u_solfracs, __pyx_k_solfracs, sizeof(__pyx_k_solfracs), 0, 1, 0, 1}, {&__pyx_n_s_solinfeasible, __pyx_k_solinfeasible, sizeof(__pyx_k_solinfeasible), 0, 0, 1, 1}, {&__pyx_n_s_solution, __pyx_k_solution, sizeof(__pyx_k_solution), 0, 0, 1, 1}, {&__pyx_n_s_solutions, __pyx_k_solutions, sizeof(__pyx_k_solutions), 0, 0, 1, 1}, {&__pyx_n_u_solvals, __pyx_k_solvals, sizeof(__pyx_k_solvals), 0, 1, 0, 1}, {&__pyx_n_s_solvecip, __pyx_k_solvecip, sizeof(__pyx_k_solvecip), 0, 0, 1, 1}, {&__pyx_n_u_solvingtime, __pyx_k_solvingtime, sizeof(__pyx_k_solvingtime), 0, 1, 0, 1}, {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1}, {&__pyx_n_s_sourceModel, __pyx_k_sourceModel, sizeof(__pyx_k_sourceModel), 0, 0, 1, 1}, {&__pyx_n_s_splitext, __pyx_k_splitext, sizeof(__pyx_k_splitext), 0, 0, 1, 1}, {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1}, {&__pyx_n_u_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 1, 0, 1}, {&__pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_k_src_pyscipopt_expr_pxi, sizeof(__pyx_k_src_pyscipopt_expr_pxi), 0, 0, 1, 0}, {&__pyx_kp_s_src_pyscipopt_scip_pyx, __pyx_k_src_pyscipopt_scip_pyx, sizeof(__pyx_k_src_pyscipopt_scip_pyx), 0, 0, 1, 0}, {&__pyx_n_u_stats, __pyx_k_stats, sizeof(__pyx_k_stats), 0, 1, 0, 1}, {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1}, {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1}, {&__pyx_n_s_stdpriority, __pyx_k_stdpriority, sizeof(__pyx_k_stdpriority), 0, 0, 1, 1}, {&__pyx_n_s_stickingatnode, __pyx_k_stickingatnode, sizeof(__pyx_k_stickingatnode), 0, 0, 1, 1}, {&__pyx_n_u_stickingatnode, __pyx_k_stickingatnode, sizeof(__pyx_k_stickingatnode), 0, 1, 0, 1}, {&__pyx_n_u_stopearly, __pyx_k_stopearly, sizeof(__pyx_k_stopearly), 0, 1, 0, 1}, {&__pyx_n_s_str_conversion, __pyx_k_str_conversion, sizeof(__pyx_k_str_conversion), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_subproblem, __pyx_k_subproblem, sizeof(__pyx_k_subproblem), 0, 0, 1, 1}, {&__pyx_n_u_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 1, 0, 1}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, {&__pyx_n_u_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 1, 0, 1}, {&__pyx_n_s_sumexpr, __pyx_k_sumexpr, sizeof(__pyx_k_sumexpr), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_u_targetcons, __pyx_k_targetcons, sizeof(__pyx_k_targetcons), 0, 1, 0, 1}, {&__pyx_n_s_targetvalue, __pyx_k_targetvalue, sizeof(__pyx_k_targetvalue), 0, 0, 1, 1}, {&__pyx_n_s_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 0, 1, 1}, {&__pyx_kp_u_term_length_must_be_1_or_2_but_i, __pyx_k_term_length_must_be_1_or_2_but_i, sizeof(__pyx_k_term_length_must_be_1_or_2_but_i), 0, 1, 0, 0}, {&__pyx_n_s_termlist, __pyx_k_termlist, sizeof(__pyx_k_termlist), 0, 0, 1, 1}, {&__pyx_n_s_terms, __pyx_k_terms, sizeof(__pyx_k_terms), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_u_timelimit, __pyx_k_timelimit, sizeof(__pyx_k_timelimit), 0, 1, 0, 1}, {&__pyx_n_s_timing, __pyx_k_timing, sizeof(__pyx_k_timing), 0, 0, 1, 1}, {&__pyx_n_s_timingmask, __pyx_k_timingmask, sizeof(__pyx_k_timingmask), 0, 0, 1, 1}, {&__pyx_kp_u_total_number_of_solutions_found, __pyx_k_total_number_of_solutions_found, sizeof(__pyx_k_total_number_of_solutions_found), 0, 1, 0, 0}, {&__pyx_n_s_trans, __pyx_k_trans, sizeof(__pyx_k_trans), 0, 0, 1, 1}, {&__pyx_n_s_transformed, __pyx_k_transformed, sizeof(__pyx_k_transformed), 0, 0, 1, 1}, {&__pyx_n_u_transgap, __pyx_k_transgap, sizeof(__pyx_k_transgap), 0, 1, 0, 1}, {&__pyx_n_u_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 1, 0, 1}, {&__pyx_n_s_truediv, __pyx_k_truediv, sizeof(__pyx_k_truediv), 0, 0, 1, 1}, {&__pyx_n_u_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 1, 0, 1}, {&__pyx_n_s_ub, __pyx_k_ub, sizeof(__pyx_k_ub), 0, 0, 1, 1}, {&__pyx_n_s_ubs, __pyx_k_ubs, sizeof(__pyx_k_ubs), 0, 0, 1, 1}, {&__pyx_n_u_ubs, __pyx_k_ubs, sizeof(__pyx_k_ubs), 0, 1, 0, 1}, {&__pyx_n_u_unbounded, __pyx_k_unbounded, sizeof(__pyx_k_unbounded), 0, 1, 0, 1}, {&__pyx_n_u_unknown, __pyx_k_unknown, sizeof(__pyx_k_unknown), 0, 1, 0, 1}, {&__pyx_kp_u_unrecognized_objective_sense, __pyx_k_unrecognized_objective_sense, sizeof(__pyx_k_unrecognized_objective_sense), 0, 1, 0, 0}, {&__pyx_kp_u_unrecognized_optimization_sense, __pyx_k_unrecognized_optimization_sense, sizeof(__pyx_k_unrecognized_optimization_sense), 0, 1, 0, 0}, {&__pyx_kp_u_unrecognized_variable_type, __pyx_k_unrecognized_variable_type, sizeof(__pyx_k_unrecognized_variable_type), 0, 1, 0, 0}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1}, {&__pyx_n_u_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 1, 0, 1}, {&__pyx_n_u_upperbound, __pyx_k_upperbound, sizeof(__pyx_k_upperbound), 0, 1, 0, 1}, {&__pyx_n_u_userinterrupt, __pyx_k_userinterrupt, sizeof(__pyx_k_userinterrupt), 0, 1, 0, 1}, {&__pyx_n_s_usessubscip, __pyx_k_usessubscip, sizeof(__pyx_k_usessubscip), 0, 0, 1, 1}, {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_val1, __pyx_k_val1, sizeof(__pyx_k_val1), 0, 0, 1, 1}, {&__pyx_n_s_val2, __pyx_k_val2, sizeof(__pyx_k_val2), 0, 0, 1, 1}, {&__pyx_n_s_validnode, __pyx_k_validnode, sizeof(__pyx_k_validnode), 0, 0, 1, 1}, {&__pyx_n_u_vals, __pyx_k_vals, sizeof(__pyx_k_vals), 0, 1, 0, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_value_to_array, __pyx_k_value_to_array, sizeof(__pyx_k_value_to_array), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1}, {&__pyx_n_u_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 1, 0, 1}, {&__pyx_n_u_varbound, __pyx_k_varbound, sizeof(__pyx_k_varbound), 0, 1, 0, 1}, {&__pyx_n_s_varexpr, __pyx_k_varexpr, sizeof(__pyx_k_varexpr), 0, 0, 1, 1}, {&__pyx_n_s_variable, __pyx_k_variable, sizeof(__pyx_k_variable), 0, 0, 1, 1}, {&__pyx_n_s_varidx, __pyx_k_varidx, sizeof(__pyx_k_varidx), 0, 0, 1, 1}, {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1}, {&__pyx_n_s_vartuple, __pyx_k_vartuple, sizeof(__pyx_k_vartuple), 0, 0, 1, 1}, {&__pyx_n_u_vartuple, __pyx_k_vartuple, sizeof(__pyx_k_vartuple), 0, 1, 0, 1}, {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_vtype, __pyx_k_vtype, sizeof(__pyx_k_vtype), 0, 0, 1, 1}, {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1}, {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1}, {&__pyx_n_s_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 0, 0, 1, 1}, {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1}, {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, {&__pyx_n_s_write_zeros, __pyx_k_write_zeros, sizeof(__pyx_k_write_zeros), 0, 0, 1, 1}, {&__pyx_kp_u_wrote_parameter_settings_to_file, __pyx_k_wrote_parameter_settings_to_file, sizeof(__pyx_k_wrote_parameter_settings_to_file), 0, 1, 0, 0}, {&__pyx_kp_u_wrote_problem_to_file, __pyx_k_wrote_problem_to_file, sizeof(__pyx_k_wrote_problem_to_file), 0, 1, 0, 0}, {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1}, {&__pyx_n_u_xor, __pyx_k_xor, sizeof(__pyx_k_xor), 0, 1, 0, 1}, {&__pyx_n_u_zero, __pyx_k_zero, sizeof(__pyx_k_zero), 0, 1, 0, 1}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 51, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 53, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 64, __pyx_L1_error) __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(0, 89, __pyx_L1_error) __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 91, __pyx_L1_error) __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 165, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 265, __pyx_L1_error) __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 300, __pyx_L1_error) __pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_n_s_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 560, __pyx_L1_error) __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 621, __pyx_L1_error) __pyx_builtin_Warning = __Pyx_GetBuiltinName(__pyx_n_s_Warning); if (!__pyx_builtin_Warning) __PYX_ERR(1, 20, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 80, __pyx_L1_error) __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(2, 37, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 225, __pyx_L1_error) __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(3, 227, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(3, 248, __pyx_L1_error) __pyx_builtin_LookupError = __Pyx_GetBuiltinName(__pyx_n_s_LookupError); if (!__pyx_builtin_LookupError) __PYX_ERR(3, 250, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(3, 3318, __pyx_L1_error) __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(3, 3779, __pyx_L1_error) __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(16, 884, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "src/pyscipopt/expr.pxi":337 * if op == 1: # <= * if not self._rhs is None: * raise TypeError('ExprCons already has upper bound') # <<<<<<<<<<<<<< * assert self._rhs is None * assert not self._lhs is None */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_ExprCons_already_has_upper_bound); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "src/pyscipopt/expr.pxi":342 * * if not _is_number(other): * raise TypeError('Ranged ExprCons is not well defined!') # <<<<<<<<<<<<<< * * return ExprCons(self.expr, lhs=self._lhs, rhs=float(other)) */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Ranged_ExprCons_is_not_well_defi); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "src/pyscipopt/expr.pxi":347 * elif op == 5: # >= * if not self._lhs is None: * raise TypeError('ExprCons already has lower bound') # <<<<<<<<<<<<<< * assert self._lhs is None * assert not self._rhs is None */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ExprCons_already_has_lower_bound); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "src/pyscipopt/expr.pxi":546 * expo = buildGenExprObj(other) * if expo.getOp() != Operator.const: * raise NotImplementedError("exponents must be numbers") # <<<<<<<<<<<<<< * if self.getOp() == Operator.const: * return Constant(self.number**expo.number) */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_exponents_must_be_numbers); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "src/pyscipopt/expr.pxi":560 * # we can't divide by 0 * if divisor.getOp() == Operator.const and divisor.number == 0.0: * raise ZeroDivisionError("cannot divide by 0") # <<<<<<<<<<<<<< * return self * divisor**(-1) * */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_cannot_divide_by_0); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "src/pyscipopt/lp.pxi":20 * PY_SCIP_CALL(SCIPlpiCreate(&(self.lpi), NULL, n, SCIP_OBJSENSE_MAXIMIZE)) * else: * raise Warning("unrecognized objective sense") # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_unrecognized_objective_sense); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_self_lpi_cannot_be_converted_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "(tree fragment)":4 * raise TypeError("self.lpi cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.lpi cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_self_lpi_cannot_be_converted_to); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "src/pyscipopt/benders.pxi":37 * def benderscreatesub(self, probnumber): * '''creates the subproblems and registers it with the Benders decomposition struct ''' * print("python error in benderscreatesub: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_benderscreatesub); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "src/pyscipopt/benders.pxi":62 * def bendersgetvar(self, variable, probnumber): * '''Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems. ''' * print("python error in bendersgetvar: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_bendersgetvar_th); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "src/pyscipopt/benders.pxi":142 * enfotype = type * result_dict = PyBenders.benderspresubsolve(solution, enfotype, checkint) * skipsolve[0] = result_dict.get("skipsolve", False) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_u_skipsolve, Py_False); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "src/pyscipopt/benders.pxi":155 * solution = Solution.create(sol) * result_dict = PyBenders.benderssolvesubconvex(solution, probnumber, onlyconvex) * objective[0] = result_dict.get("objective", 1e+20) # <<<<<<<<<<<<<< * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * return SCIP_OKAY */ __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_u_objective, __pyx_float_1e_20); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "src/pyscipopt/benders.pxi":187 * mergecandidates.append(mergecands[i]) * result_dict = PyBenders.benderspostsolve(solution, enfotype, mergecandidates, npriomergecands, checkint, infeasible) * merged[0] = result_dict.get("merged", False) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_u_merged, Py_False); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "src/pyscipopt/benders.pxi":204 * PyVar = getPyVar(var) * result_dict = PyBenders.bendersgetvar(PyVar, probnumber) * mappedvariable = <Variable>(result_dict.get("mappedvar", None)) # <<<<<<<<<<<<<< * if mappedvariable is None: * mappedvar[0] = NULL */ __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_u_mappedvar, Py_None); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "src/pyscipopt/benderscut.pxi":24 * * def benderscutexec(self, solution, probnumber, enfotype): * print("python error in benderscutexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_benderscutexec_t); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(5, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "src/pyscipopt/conshdlr.pxi":58 * def consenfolp(self, constraints, nusefulconss, solinfeasible): * '''calls enforcing method of constraint handler for LP solution for all constraints added''' * print("python error in consenfolp: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_consenfolp_this); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(7, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "src/pyscipopt/conshdlr.pxi":63 * def consenforelax(self, solution, constraints, nusefulconss, solinfeasible): * '''calls enforcing method of constraint handler for a relaxation solution for all constraints added''' * print("python error in consenforelax: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_consenforelax_th); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(7, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "src/pyscipopt/conshdlr.pxi":68 * def consenfops(self, constraints, nusefulconss, solinfeasible, objinfeasible): * '''calls enforcing method of constraint handler for pseudo solution for all constraints added''' * print("python error in consenfops: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_consenfops_this); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(7, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "src/pyscipopt/conshdlr.pxi":73 * def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely): * '''calls feasibility check method of constraint handler ''' * print("python error in conscheck: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_conscheck_this_m); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(7, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "src/pyscipopt/conshdlr.pxi":92 * def conslock(self, constraint, locktype, nlockspos, nlocksneg): * '''variable rounding lock method of constraint handler''' * print("python error in conslock: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_conslock_this_me); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(7, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "src/pyscipopt/conshdlr.pxi":446 * PyCons = getPyCons(cons) * result_dict = PyConshdlr.consgetnvars(PyCons) * nvars[0] = result_dict.get("nvars", 0) # <<<<<<<<<<<<<< * success[0] = result_dict.get("success", False) * return SCIP_OKAY */ __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_u_nvars, __pyx_int_0); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(7, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "src/pyscipopt/conshdlr.pxi":447 * result_dict = PyConshdlr.consgetnvars(PyCons) * nvars[0] = result_dict.get("nvars", 0) * success[0] = result_dict.get("success", False) # <<<<<<<<<<<<<< * return SCIP_OKAY * */ __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_u_success, Py_False); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(7, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "src/pyscipopt/event.pxi":37 * def eventexec(self, event): * '''calls execution method of event handler ''' * print("python error in eventexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_eventexec_this_m); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(8, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "src/pyscipopt/heuristic.pxi":29 * def heurexec(self, heurtiming, nodeinfeasible): * '''should the heuristic the executed at the given depth, frequency, timing,...''' * print("python error in heurexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_heurexec_this_me); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(9, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "src/pyscipopt/presol.pxi":28 * def presolexec(self, nrounds, presoltiming): * '''executes presolver''' * print("python error in presolexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_presolexec_this); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(10, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "src/pyscipopt/presol.pxi":83 * result_dict = PyPresol.presolexec(nrounds, presoltiming) * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) # <<<<<<<<<<<<<< * naggrvars[0] += result_dict.get("nnewaggrvars", 0) * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) */ __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_u_nnewfixedvars, __pyx_int_0); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(10, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "src/pyscipopt/presol.pxi":84 * result[0] = result_dict.get("result", <SCIP_RESULT>result[0]) * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) * naggrvars[0] += result_dict.get("nnewaggrvars", 0) # <<<<<<<<<<<<<< * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) * nchgbds[0] += result_dict.get("nnewchgbds", 0) */ __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_u_nnewaggrvars, __pyx_int_0); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(10, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); /* "src/pyscipopt/presol.pxi":85 * nfixedvars[0] += result_dict.get("nnewfixedvars", 0) * naggrvars[0] += result_dict.get("nnewaggrvars", 0) * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) # <<<<<<<<<<<<<< * nchgbds[0] += result_dict.get("nnewchgbds", 0) * naddholes[0] += result_dict.get("nnewaddholes", 0) */ __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_u_nnewchgvartypes, __pyx_int_0); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(10, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); /* "src/pyscipopt/presol.pxi":86 * naggrvars[0] += result_dict.get("nnewaggrvars", 0) * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) * nchgbds[0] += result_dict.get("nnewchgbds", 0) # <<<<<<<<<<<<<< * naddholes[0] += result_dict.get("nnewaddholes", 0) * ndelconss[0] += result_dict.get("nnewdelconss", 0) */ __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_u_nnewchgbds, __pyx_int_0); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(10, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); /* "src/pyscipopt/presol.pxi":87 * nchgvartypes[0] += result_dict.get("nnewchgvartypes", 0) * nchgbds[0] += result_dict.get("nnewchgbds", 0) * naddholes[0] += result_dict.get("nnewaddholes", 0) # <<<<<<<<<<<<<< * ndelconss[0] += result_dict.get("nnewdelconss", 0) * naddconss[0] += result_dict.get("nnewaddconss", 0) */ __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_u_nnewaddholes, __pyx_int_0); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(10, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); /* "src/pyscipopt/presol.pxi":88 * nchgbds[0] += result_dict.get("nnewchgbds", 0) * naddholes[0] += result_dict.get("nnewaddholes", 0) * ndelconss[0] += result_dict.get("nnewdelconss", 0) # <<<<<<<<<<<<<< * naddconss[0] += result_dict.get("nnewaddconss", 0) * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) */ __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_u_nnewdelconss, __pyx_int_0); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(10, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "src/pyscipopt/presol.pxi":89 * naddholes[0] += result_dict.get("nnewaddholes", 0) * ndelconss[0] += result_dict.get("nnewdelconss", 0) * naddconss[0] += result_dict.get("nnewaddconss", 0) # <<<<<<<<<<<<<< * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) */ __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_u_nnewaddconss, __pyx_int_0); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(10, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); /* "src/pyscipopt/presol.pxi":90 * ndelconss[0] += result_dict.get("nnewdelconss", 0) * naddconss[0] += result_dict.get("nnewaddconss", 0) * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) # <<<<<<<<<<<<<< * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) * nchgsides[0] += result_dict.get("nnewchgsides", 0) */ __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_u_nnewupgdconss, __pyx_int_0); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(10, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "src/pyscipopt/presol.pxi":91 * naddconss[0] += result_dict.get("nnewaddconss", 0) * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) # <<<<<<<<<<<<<< * nchgsides[0] += result_dict.get("nnewchgsides", 0) * return SCIP_OKAY */ __pyx_tuple__38 = PyTuple_Pack(2, __pyx_n_u_nnewchgcoefs, __pyx_int_0); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(10, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "src/pyscipopt/presol.pxi":92 * nupgdconss[0] += result_dict.get("nnewupgdconss", 0) * nchgcoefs[0] += result_dict.get("nnewchgcoefs", 0) * nchgsides[0] += result_dict.get("nnewchgsides", 0) # <<<<<<<<<<<<<< * return SCIP_OKAY */ __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_u_nnewchgsides, __pyx_int_0); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(10, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); /* "src/pyscipopt/pricer.pxi":28 * def pricerredcost(self): * '''calls reduced cost pricing method of variable pricer''' * print("python error in pricerredcost: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_pricerredcost_th); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(11, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "src/pyscipopt/propagator.pxi":40 * def propexec(self, proptiming): * '''calls execution method of propagator''' * print("python error in propexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_propexec_this_me); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(12, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "src/pyscipopt/propagator.pxi":45 * def propresprop(self, confvar, inferinfo, bdtype, relaxedbd): * '''resolves the given conflicting bound, that was reduced by the given propagator''' * print("python error in propresprop: this method needs to be implemented") # <<<<<<<<<<<<<< * return {} * */ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_propresprop_this); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(12, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); /* "src/pyscipopt/relax.pxi":29 * def relaxexec(self): * '''callls execution method of relaxation handler''' * print("python error in relaxexec: this method needs to be implemented") # <<<<<<<<<<<<<< * return{} * */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_python_error_in_relaxexec_this_m); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "src/pyscipopt/nodesel.pxi":88 * PyNodesel = <Nodesel>nodeseldata * result_dict = PyNodesel.nodeselect() * selected_node = <Node>(result_dict.get("selnode", None)) # <<<<<<<<<<<<<< * selnode[0] = selected_node.scip_node * return SCIP_OKAY */ __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_u_selnode, Py_None); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(15, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "pyscipopt/scip.pyx":223 * pass * elif rc == SCIP_ERROR: * raise Exception('SCIP: unspecified error!') # <<<<<<<<<<<<<< * elif rc == SCIP_NOMEMORY: * raise MemoryError('SCIP: insufficient memory error!') */ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_SCIP_unspecified_error); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(3, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "pyscipopt/scip.pyx":225 * raise Exception('SCIP: unspecified error!') * elif rc == SCIP_NOMEMORY: * raise MemoryError('SCIP: insufficient memory error!') # <<<<<<<<<<<<<< * elif rc == SCIP_READERROR: * raise IOError('SCIP: read error!') */ __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_SCIP_insufficient_memory_error); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(3, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "pyscipopt/scip.pyx":227 * raise MemoryError('SCIP: insufficient memory error!') * elif rc == SCIP_READERROR: * raise IOError('SCIP: read error!') # <<<<<<<<<<<<<< * elif rc == SCIP_WRITEERROR: * raise IOError('SCIP: write error!') */ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_SCIP_read_error); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(3, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); /* "pyscipopt/scip.pyx":229 * raise IOError('SCIP: read error!') * elif rc == SCIP_WRITEERROR: * raise IOError('SCIP: write error!') # <<<<<<<<<<<<<< * elif rc == SCIP_NOFILE: * raise IOError('SCIP: file not found error!') */ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_SCIP_write_error); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(3, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); /* "pyscipopt/scip.pyx":231 * raise IOError('SCIP: write error!') * elif rc == SCIP_NOFILE: * raise IOError('SCIP: file not found error!') # <<<<<<<<<<<<<< * elif rc == SCIP_FILECREATEERROR: * raise IOError('SCIP: cannot create file!') */ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_SCIP_file_not_found_error); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(3, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); /* "pyscipopt/scip.pyx":233 * raise IOError('SCIP: file not found error!') * elif rc == SCIP_FILECREATEERROR: * raise IOError('SCIP: cannot create file!') # <<<<<<<<<<<<<< * elif rc == SCIP_LPERROR: * raise Exception('SCIP: error in LP solver!') */ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_SCIP_cannot_create_file); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(3, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); /* "pyscipopt/scip.pyx":235 * raise IOError('SCIP: cannot create file!') * elif rc == SCIP_LPERROR: * raise Exception('SCIP: error in LP solver!') # <<<<<<<<<<<<<< * elif rc == SCIP_NOPROBLEM: * raise Exception('SCIP: no problem exists!') */ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_SCIP_error_in_LP_solver); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(3, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); /* "pyscipopt/scip.pyx":237 * raise Exception('SCIP: error in LP solver!') * elif rc == SCIP_NOPROBLEM: * raise Exception('SCIP: no problem exists!') # <<<<<<<<<<<<<< * elif rc == SCIP_INVALIDCALL: * raise Exception('SCIP: method cannot be called at this time' */ __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_SCIP_no_problem_exists); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(3, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); /* "pyscipopt/scip.pyx":239 * raise Exception('SCIP: no problem exists!') * elif rc == SCIP_INVALIDCALL: * raise Exception('SCIP: method cannot be called at this time' # <<<<<<<<<<<<<< * + ' in solution process!') * elif rc == SCIP_INVALIDDATA: */ __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_SCIP_method_cannot_be_called_at); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(3, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); /* "pyscipopt/scip.pyx":242 * + ' in solution process!') * elif rc == SCIP_INVALIDDATA: * raise Exception('SCIP: error in input data!') # <<<<<<<<<<<<<< * elif rc == SCIP_INVALIDRESULT: * raise Exception('SCIP: method returned an invalid result code!') */ __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_SCIP_error_in_input_data); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(3, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); /* "pyscipopt/scip.pyx":244 * raise Exception('SCIP: error in input data!') * elif rc == SCIP_INVALIDRESULT: * raise Exception('SCIP: method returned an invalid result code!') # <<<<<<<<<<<<<< * elif rc == SCIP_PLUGINNOTFOUND: * raise Exception('SCIP: a required plugin was not found !') */ __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_SCIP_method_returned_an_invalid); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(3, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); /* "pyscipopt/scip.pyx":246 * raise Exception('SCIP: method returned an invalid result code!') * elif rc == SCIP_PLUGINNOTFOUND: * raise Exception('SCIP: a required plugin was not found !') # <<<<<<<<<<<<<< * elif rc == SCIP_PARAMETERUNKNOWN: * raise KeyError('SCIP: the parameter with the given name was not found!') */ __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_SCIP_a_required_plugin_was_not_f); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(3, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); /* "pyscipopt/scip.pyx":248 * raise Exception('SCIP: a required plugin was not found !') * elif rc == SCIP_PARAMETERUNKNOWN: * raise KeyError('SCIP: the parameter with the given name was not found!') # <<<<<<<<<<<<<< * elif rc == SCIP_PARAMETERWRONGTYPE: * raise LookupError('SCIP: the parameter is not of the expected type!') */ __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_SCIP_the_parameter_with_the_give); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(3, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); /* "pyscipopt/scip.pyx":250 * raise KeyError('SCIP: the parameter with the given name was not found!') * elif rc == SCIP_PARAMETERWRONGTYPE: * raise LookupError('SCIP: the parameter is not of the expected type!') # <<<<<<<<<<<<<< * elif rc == SCIP_PARAMETERWRONGVAL: * raise ValueError('SCIP: the value is invalid for the given parameter!') */ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_SCIP_the_parameter_is_not_of_the); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(3, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); /* "pyscipopt/scip.pyx":252 * raise LookupError('SCIP: the parameter is not of the expected type!') * elif rc == SCIP_PARAMETERWRONGVAL: * raise ValueError('SCIP: the value is invalid for the given parameter!') # <<<<<<<<<<<<<< * elif rc == SCIP_KEYALREADYEXISTING: * raise KeyError('SCIP: the given key is already existing in table!') */ __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_SCIP_the_value_is_invalid_for_th); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(3, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); /* "pyscipopt/scip.pyx":254 * raise ValueError('SCIP: the value is invalid for the given parameter!') * elif rc == SCIP_KEYALREADYEXISTING: * raise KeyError('SCIP: the given key is already existing in table!') # <<<<<<<<<<<<<< * elif rc == SCIP_MAXDEPTHLEVEL: * raise Exception('SCIP: maximal branching depth level exceeded!') */ __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_SCIP_the_given_key_is_already_ex); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(3, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); /* "pyscipopt/scip.pyx":256 * raise KeyError('SCIP: the given key is already existing in table!') * elif rc == SCIP_MAXDEPTHLEVEL: * raise Exception('SCIP: maximal branching depth level exceeded!') # <<<<<<<<<<<<<< * else: * raise Exception('SCIP: unknown return code!') */ __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_SCIP_maximal_branching_depth_lev); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(3, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); /* "pyscipopt/scip.pyx":258 * raise Exception('SCIP: maximal branching depth level exceeded!') * else: * raise Exception('SCIP: unknown return code!') # <<<<<<<<<<<<<< * * cdef class Event: */ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_SCIP_unknown_return_code); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(3, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.event cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.event cannot be converted to a Python object for pickling") */ __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_self_event_cannot_be_converted_t); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); /* "(tree fragment)":4 * raise TypeError("self.event cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.event cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_self_event_cannot_be_converted_t); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); /* "pyscipopt/scip.pyx":324 * return "zero" * else: * raise Exception('SCIP returned unknown base status!') # <<<<<<<<<<<<<< * * def isIntegral(self): */ __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_SCIP_returned_unknown_base_statu); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(3, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") */ __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_self_scip_col_cannot_be_converte); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); /* "(tree fragment)":4 * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_col cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_self_scip_col_cannot_be_converte); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); /* "pyscipopt/scip.pyx":386 * elif stat == SCIP_BASESTAT_ZERO: * # this shouldn't happen! * raise Exception('SCIP returned base status zero for a row!') # <<<<<<<<<<<<<< * else: * raise Exception('SCIP returned unknown base status!') */ __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_SCIP_returned_base_status_zero_f); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(3, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") */ __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_self_scip_row_cannot_be_converte); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); /* "(tree fragment)":4 * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_row cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_self_scip_row_cannot_be_converte); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.sol cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.sol cannot be converted to a Python object for pickling") */ __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_self_sol_cannot_be_converted_to); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); /* "(tree fragment)":4 * raise TypeError("self.sol cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.sol cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_self_sol_cannot_be_converted_to); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") */ __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_self_scip_node_cannot_be_convert); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); /* "(tree fragment)":4 * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_node cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_self_scip_node_cannot_be_convert); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") */ __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_self_scip_var_cannot_be_converte); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); /* "(tree fragment)":4 * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_var cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_self_scip_var_cannot_be_converte); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); /* "pyscipopt/scip.pyx":585 * cdef create(SCIP_CONS* scipcons): * if scipcons == NULL: * raise Warning("cannot create Constraint with SCIP_CONS* == NULL") # <<<<<<<<<<<<<< * cons = Constraint() * cons.scip_cons = scipcons */ __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_cannot_create_Constraint_with_SC); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(3, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") */ __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_self_scip_cons_cannot_be_convert); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); /* "(tree fragment)":4 * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self.scip_cons cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_self_scip_cons_cannot_be_convert); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); /* "pyscipopt/scip.pyx":901 * * if coeffs.degree() > 1: * raise ValueError("Nonlinear objective functions are not supported!") # <<<<<<<<<<<<<< * if coeffs[CONST] != 0.0: * self.addObjoffset(coeffs[CONST]) */ __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_Nonlinear_objective_functions_ar); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(3, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); /* "pyscipopt/scip.pyx":996 * * """ * self.setIntParam("propagating/maxroundsroot", 0) # <<<<<<<<<<<<<< * if not onlyroot: * self.setIntParam("propagating/maxrounds", 0) */ __pyx_tuple__81 = PyTuple_Pack(2, __pyx_kp_u_propagating_maxroundsroot, __pyx_int_0); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(3, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); /* "pyscipopt/scip.pyx":998 * self.setIntParam("propagating/maxroundsroot", 0) * if not onlyroot: * self.setIntParam("propagating/maxrounds", 0) # <<<<<<<<<<<<<< * * def writeProblem(self, filename='model.cip', trans=False): */ __pyx_tuple__82 = PyTuple_Pack(2, __pyx_kp_u_propagating_maxrounds, __pyx_int_0); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(3, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); /* "pyscipopt/scip.pyx":1012 * ext = str_conversion('.cip') * fn = fn + ext * ext = ext[1:] # <<<<<<<<<<<<<< * if trans: * PY_SCIP_CALL(SCIPwriteTransProblem(self._scip, fn, ext, False)) */ __pyx_slice__83 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__83)) __PYX_ERR(3, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__83); __Pyx_GIVEREF(__pyx_slice__83); /* "pyscipopt/scip.pyx":1053 * PY_SCIP_CALL(SCIPcreateVarBasic(self._scip, &scip_var, cname, lb, ub, obj, SCIP_VARTYPE_INTEGER)) * else: * raise Warning("unrecognized variable type") # <<<<<<<<<<<<<< * * if pricedVar: */ __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_unrecognized_variable_type); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(3, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); /* "pyscipopt/scip.pyx":2051 * cdef SCIP_VAR* _binVar * if cons._lhs is not None and cons._rhs is not None: * raise ValueError("expected inequality that has either only a left or right hand side") # <<<<<<<<<<<<<< * * if cons.expr.degree() > 1: */ __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_expected_inequality_that_has_eit); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(3, 2051, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); /* "pyscipopt/scip.pyx":2244 * * if not self.getStage() >= SCIP_STAGE_SOLVING: * raise Warning("method cannot be called before problem is solved") # <<<<<<<<<<<<<< * * if isinstance(sol, Solution): */ __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_method_cannot_be_called_before_p); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(3, 2244, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__87); __Pyx_GIVEREF(__pyx_tuple__87); /* "pyscipopt/scip.pyx":2549 * * # activating the Benders' decomposition constraint handlers * self.setBoolParam("constraints/benderslp/active", True) # <<<<<<<<<<<<<< * self.setBoolParam("constraints/benders/active", True) * #self.setIntParam("limits/maxorigsol", 0) */ __pyx_tuple__88 = PyTuple_Pack(2, __pyx_kp_u_constraints_benderslp_active, Py_True); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(3, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); /* "pyscipopt/scip.pyx":2550 * # activating the Benders' decomposition constraint handlers * self.setBoolParam("constraints/benderslp/active", True) * self.setBoolParam("constraints/benders/active", True) # <<<<<<<<<<<<<< * #self.setIntParam("limits/maxorigsol", 0) * */ __pyx_tuple__89 = PyTuple_Pack(2, __pyx_kp_u_constraints_benders_active, Py_True); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(3, 2550, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); /* "pyscipopt/scip.pyx":3318 * # use this doubled opening pattern to ensure that IOErrors are * # triggered early and in Python not in C,Cython or SCIP. * with open(filename, "w") as f: # <<<<<<<<<<<<<< * cfile = fdopen(f.fileno(), "w") * PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros)) */ __pyx_tuple__95 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(3, 3318, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); /* "pyscipopt/scip.pyx":3365 * PY_SCIP_CALL(SCIPreadSolFile(self._scip, fn, solution.sol, False, &partial, &error)) * if error: * raise Exception("SCIP: reading solution from file failed!") # <<<<<<<<<<<<<< * * return solution */ __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_SCIP_reading_solution_from_file); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(3, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); /* "pyscipopt/scip.pyx":3565 * _eventhdlr = SCIPfindEventhdlr(self._scip, n) * else: * raise Warning("event handler not found") # <<<<<<<<<<<<<< * PY_SCIP_CALL(SCIPcatchEvent(self._scip, eventtype, _eventhdlr, NULL, NULL)) * */ __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_event_handler_not_found); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(3, 3565, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); /* "pyscipopt/scip.pyx":3736 * * if param == NULL: * raise KeyError("Not a valid parameter name") # <<<<<<<<<<<<<< * * paramtype = SCIPparamGetType(param) */ __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_Not_a_valid_parameter_name); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(3, 3736, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); /* "pyscipopt/scip.pyx":3854 * nsols = SCIPgetNCountedSols(self._scip, &valid) * if not valid: * print('total number of solutions found is not valid!') # <<<<<<<<<<<<<< * return nsols * */ __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_u_total_number_of_solutions_found); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(3, 3854, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); /* "pyscipopt/scip.pyx":3887 * raise ValueError("Nonlinear objective functions are not supported!") * if coeffs[CONST] != 0.0: * raise ValueError("Constant offsets in objective are not supported!") # <<<<<<<<<<<<<< * * cdef SCIP_VAR** _vars */ __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_u_Constant_offsets_in_objective_ar); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(3, 3887, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); /* "pyscipopt/scip.pyx":5654 * lowerbounds[1+nleaves+nchildren+i] = siblings[i].lowerbound * * percentiles = (10, 25, 50, 75, 90) # <<<<<<<<<<<<<< * qs = np.percentile(lowerbounds, percentiles, overwrite_input=True, interpolation='linear') * */ __pyx_tuple__101 = PyTuple_Pack(5, __pyx_int_10, __pyx_int_25, __pyx_int_50, __pyx_int_75, __pyx_int_90); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(3, 5654, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); /* "pyscipopt/scip.pyx":5789 * branchrule = SCIPfindBranchrule(self._scip, name.encode("UTF-8")) * if branchrule == NULL: * print("Error, branching rule not found!") # <<<<<<<<<<<<<< * return PY_SCIP_RESULT.DIDNOTFIND * else: */ __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_u_Error_branching_rule_not_found); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(3, 5789, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__102); __Pyx_GIVEREF(__pyx_tuple__102); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") */ __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_self__scip_self__valid_cannot_be); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(4, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__103); __Pyx_GIVEREF(__pyx_tuple__103); /* "(tree fragment)":4 * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") * def __setstate_cython__(self, __pyx_state): * raise TypeError("self._scip,self._valid cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< */ __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_self__scip_self__valid_cannot_be); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":884 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(16, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__105); __Pyx_GIVEREF(__pyx_tuple__105); /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":890 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(16, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__106); __Pyx_GIVEREF(__pyx_tuple__106); /* "src/pyscipopt/expr.pxi":47 * * * def _is_number(e): # <<<<<<<<<<<<<< * try: * f = float(e) */ __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_e, __pyx_n_s_f); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_is_number, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 47, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":57 * * * def _expr_richcmp(self, other, op): # <<<<<<<<<<<<<< * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): */ __pyx_tuple__109 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_op); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__109); __Pyx_GIVEREF(__pyx_tuple__109); __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_expr_richcmp, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 57, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":86 * '''This is a monomial term''' * * __slots__ = ('vartuple', 'ptrtuple', 'hashval') # <<<<<<<<<<<<<< * * def __init__(self, *vartuple): */ __pyx_tuple__111 = PyTuple_Pack(3, __pyx_n_u_vartuple, __pyx_n_u_ptrtuple, __pyx_n_u_hashval); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__111); __Pyx_GIVEREF(__pyx_tuple__111); /* "src/pyscipopt/expr.pxi":88 * __slots__ = ('vartuple', 'ptrtuple', 'hashval') * * def __init__(self, *vartuple): # <<<<<<<<<<<<<< * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) */ __pyx_tuple__112 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_vartuple, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__112); __Pyx_GIVEREF(__pyx_tuple__112); __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_init, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 88, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":93 * self.hashval = sum(self.ptrtuple) * * def __getitem__(self, idx): # <<<<<<<<<<<<<< * return self.vartuple[idx] * */ __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_getitem, 93, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 93, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":96 * return self.vartuple[idx] * * def __hash__(self): # <<<<<<<<<<<<<< * return self.hashval * */ __pyx_tuple__116 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__116); __Pyx_GIVEREF(__pyx_tuple__116); __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_hash, 96, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 96, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":99 * return self.hashval * * def __eq__(self, other): # <<<<<<<<<<<<<< * return self.ptrtuple == other.ptrtuple * */ __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__118); __Pyx_GIVEREF(__pyx_tuple__118); __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_eq, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 99, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":102 * return self.ptrtuple == other.ptrtuple * * def __len__(self): # <<<<<<<<<<<<<< * return len(self.vartuple) * */ __pyx_tuple__120 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__120); __Pyx_GIVEREF(__pyx_tuple__120); __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_len, 102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 102, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":105 * return len(self.vartuple) * * def __add__(self, other): # <<<<<<<<<<<<<< * both = self.vartuple + other.vartuple * return Term(*both) */ __pyx_tuple__122 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_both); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__122); __Pyx_GIVEREF(__pyx_tuple__122); __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_add, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 105, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":109 * return Term(*both) * * def __repr__(self): # <<<<<<<<<<<<<< * return 'Term(%s)' % ', '.join([str(v) for v in self.vartuple]) * */ __pyx_tuple__124 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_v); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__124); __Pyx_GIVEREF(__pyx_tuple__124); __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_repr, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 109, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":115 * * # helper function * def buildGenExprObj(expr): # <<<<<<<<<<<<<< * """helper function to generate an object of type GenExpr""" * if _is_number(expr): */ __pyx_tuple__126 = PyTuple_Pack(7, __pyx_n_s_expr, __pyx_n_s_sumexpr, __pyx_n_s_vars, __pyx_n_s_coef, __pyx_n_s_varexpr, __pyx_n_s_prodexpr, __pyx_n_s_v); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__126); __Pyx_GIVEREF(__pyx_tuple__126); __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_buildGenExprObj, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 115, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":373 * raise TypeError(msg) * * def quicksum(termlist): # <<<<<<<<<<<<<< * '''add linear expressions and constants much faster than Python's sum * by avoiding intermediate data structures and adding terms inplace */ __pyx_tuple__128 = PyTuple_Pack(3, __pyx_n_s_termlist, __pyx_n_s_result, __pyx_n_s_term); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__128); __Pyx_GIVEREF(__pyx_tuple__128); __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_quicksum, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 373, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":382 * return result * * def quickprod(termlist): # <<<<<<<<<<<<<< * '''multiply linear expressions and constants by avoiding intermediate * data structures and multiplying terms inplace */ __pyx_tuple__130 = PyTuple_Pack(3, __pyx_n_s_termlist, __pyx_n_s_result, __pyx_n_s_term); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__130); __Pyx_GIVEREF(__pyx_tuple__130); __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_quickprod, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 382, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":415 * prod:SCIP_EXPR_PRODUCT * } * def getOpIndex(self, op): # <<<<<<<<<<<<<< * '''returns operator index''' * return Op.operatorIndexDic[op]; */ __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_op); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__137); __Pyx_GIVEREF(__pyx_tuple__137); __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_getOpIndex, 415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 415, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":676 * return str(self.number) * * def exp(expr): # <<<<<<<<<<<<<< * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) */ __pyx_tuple__139 = PyTuple_Pack(1, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__139); __Pyx_GIVEREF(__pyx_tuple__139); __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_exp, 676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 676, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":679 * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) * def log(expr): # <<<<<<<<<<<<<< * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) */ __pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__141); __Pyx_GIVEREF(__pyx_tuple__141); __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_log, 679, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 679, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":682 * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) * def sqrt(expr): # <<<<<<<<<<<<<< * """returns expression with sqrt-function""" * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) */ __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__143); __Pyx_GIVEREF(__pyx_tuple__143); __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_sqrt, 682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 682, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":686 * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) * * def expr_to_nodes(expr): # <<<<<<<<<<<<<< * '''transforms tree to an array of nodes. each node is an operator and the position of the * children of that operator (i.e. the other nodes) in the array''' */ __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_expr, __pyx_n_s_nodes); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__145); __Pyx_GIVEREF(__pyx_tuple__145); __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_expr_to_nodes, 686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 686, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":694 * return nodes * * def value_to_array(val, nodes): # <<<<<<<<<<<<<< * """adds a given value to an array""" * nodes.append(tuple(['const', [val]])) */ __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_val, __pyx_n_s_nodes); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__147); __Pyx_GIVEREF(__pyx_tuple__147); __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_value_to_array, 694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 694, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":704 * # also, for sums, we are not considering coefficients, because basically all coefficients are 1 * # haven't even consider substractions, but I guess we would interpret them as a - b = a + (-1) * b * def expr_to_array(expr, nodes): # <<<<<<<<<<<<<< * """adds expression to array""" * op = expr._op */ __pyx_tuple__149 = PyTuple_Pack(7, __pyx_n_s_expr, __pyx_n_s_nodes, __pyx_n_s_op, __pyx_n_s_indices, __pyx_n_s_nchildren, __pyx_n_s_child, __pyx_n_s_pos); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__149); __Pyx_GIVEREF(__pyx_tuple__149); __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_expr_pxi, __pyx_n_s_expr_to_array, 704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 704, __pyx_L1_error) /* "pyscipopt/scip.pyx":41 * # todo: check whether this is currently done like this * * if sys.version_info >= (3, 0): # <<<<<<<<<<<<<< * str_conversion = lambda x:bytes(x,'utf-8') * else: */ __pyx_tuple__151 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_0); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__151); __Pyx_GIVEREF(__pyx_tuple__151); /* "pyscipopt/scip.pyx":219 * * * def PY_SCIP_CALL(SCIP_RETCODE rc): # <<<<<<<<<<<<<< * if rc == SCIP_OKAY: * pass */ __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_rc, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(3, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__152); __Pyx_GIVEREF(__pyx_tuple__152); __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_scip_pyx, __pyx_n_s_PY_SCIP_CALL, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(3, 219, __pyx_L1_error) /* "pyscipopt/scip.pyx":5841 * * # debugging memory management * def is_memory_freed(): # <<<<<<<<<<<<<< * return BMSgetMemoryUsed() == 0 * */ __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_scip_pyx, __pyx_n_s_is_memory_freed, 5841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(3, 5841, __pyx_L1_error) /* "pyscipopt/scip.pyx":5844 * return BMSgetMemoryUsed() == 0 * * def print_memory_in_use(): # <<<<<<<<<<<<<< * BMScheckEmptyMemory() * */ __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyscipopt_scip_pyx, __pyx_n_s_print_memory_in_use, 5844, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(3, 5844, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_Expr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_tuple__156 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__156); __Pyx_GIVEREF(__pyx_tuple__156); __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Expr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__158 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__158); __Pyx_GIVEREF(__pyx_tuple__158); __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ExprCons, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__160 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__160); __Pyx_GIVEREF(__pyx_tuple__160); __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_GenExpr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__162 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__162); __Pyx_GIVEREF(__pyx_tuple__162); __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SumExpr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__164 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__164); __Pyx_GIVEREF(__pyx_tuple__164); __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ProdExpr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__166 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__166); __Pyx_GIVEREF(__pyx_tuple__166); __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VarExpr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__168 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__168); __Pyx_GIVEREF(__pyx_tuple__168); __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PowExpr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__170 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__170); __Pyx_GIVEREF(__pyx_tuple__170); __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_UnaryExpr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__172 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__172); __Pyx_GIVEREF(__pyx_tuple__172); __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Constant, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__174 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__174); __Pyx_GIVEREF(__pyx_tuple__174); __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Benders, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__176 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__176); __Pyx_GIVEREF(__pyx_tuple__176); __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Benderscut, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__178 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__178); __Pyx_GIVEREF(__pyx_tuple__178); __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Branchrule, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__180 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__180); __Pyx_GIVEREF(__pyx_tuple__180); __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Conshdlr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__182 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__182); __Pyx_GIVEREF(__pyx_tuple__182); __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Eventhdlr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__184 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__184); __Pyx_GIVEREF(__pyx_tuple__184); __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Heur, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__186 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__186); __Pyx_GIVEREF(__pyx_tuple__186); __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Presol, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__188 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__188); __Pyx_GIVEREF(__pyx_tuple__188); __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Pricer, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__190 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__190); __Pyx_GIVEREF(__pyx_tuple__190); __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Prop, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__192 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__192); __Pyx_GIVEREF(__pyx_tuple__192); __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Sepa, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__194 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__194); __Pyx_GIVEREF(__pyx_tuple__194); __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Relax, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__196 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__196); __Pyx_GIVEREF(__pyx_tuple__196); __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Nodesel, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__198 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__198); __Pyx_GIVEREF(__pyx_tuple__198); __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_RESULT, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__200 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__200); __Pyx_GIVEREF(__pyx_tuple__200); __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMSETT, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__202 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__202); __Pyx_GIVEREF(__pyx_tuple__202); __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMEMPH, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__204 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__204); __Pyx_GIVEREF(__pyx_tuple__204); __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_STATUS, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__206 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__206); __Pyx_GIVEREF(__pyx_tuple__206); __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_STAGE, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__208 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__208); __Pyx_GIVEREF(__pyx_tuple__208); __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_NODETYPE, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__210 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__210); __Pyx_GIVEREF(__pyx_tuple__210); __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_PROPTIMIN, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__212 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__212); __Pyx_GIVEREF(__pyx_tuple__212); __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_PRESOLTIM, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__214 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__214); __Pyx_GIVEREF(__pyx_tuple__214); __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_HEURTIMIN, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__216 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__216); __Pyx_GIVEREF(__pyx_tuple__216); __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_EVENTTYPE, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__218 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__218); __Pyx_GIVEREF(__pyx_tuple__218); __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_LPSOLSTAT, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__220 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__220); __Pyx_GIVEREF(__pyx_tuple__220); __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_BRANCHDIR, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(4, 1, __pyx_L1_error) __pyx_tuple__222 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__222); __Pyx_GIVEREF(__pyx_tuple__222); __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PY_SCIP_BENDERSEN, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(3, 1, __pyx_L1_error); __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_float_6_0 = PyFloat_FromDouble(6.0); if (unlikely(!__pyx_float_6_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_float_10_0 = PyFloat_FromDouble(10.0); if (unlikely(!__pyx_float_10_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_float_100_0 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_float_100_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_float_1e_20 = PyFloat_FromDouble(1e+20); if (unlikely(!__pyx_float_1e_20)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_float_neg_1_0 = PyFloat_FromDouble(-1.0); if (unlikely(!__pyx_float_neg_1_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_75 = PyInt_FromLong(75); if (unlikely(!__pyx_int_75)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_34551270 = PyInt_FromLong(34551270L); if (unlikely(!__pyx_int_34551270)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_116691903 = PyInt_FromLong(116691903L); if (unlikely(!__pyx_int_116691903)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_142711914 = PyInt_FromLong(142711914L); if (unlikely(!__pyx_int_142711914)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_150239579 = PyInt_FromLong(150239579L); if (unlikely(!__pyx_int_150239579)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_162847362 = PyInt_FromLong(162847362L); if (unlikely(!__pyx_int_162847362)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_168618862 = PyInt_FromLong(168618862L); if (unlikely(!__pyx_int_168618862)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_188463554 = PyInt_FromLong(188463554L); if (unlikely(!__pyx_int_188463554)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_195726446 = PyInt_FromLong(195726446L); if (unlikely(!__pyx_int_195726446)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_248330301 = PyInt_FromLong(248330301L); if (unlikely(!__pyx_int_248330301)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_267070241 = PyInt_FromLong(267070241L); if (unlikely(!__pyx_int_267070241)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_267356384 = PyInt_FromLong(267356384L); if (unlikely(!__pyx_int_267356384)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(3, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Expr) < 0) __PYX_ERR(0, 143, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Expr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Expr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Expr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Expr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pyscipopt_4scip_Expr, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 143, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_9pyscipopt_4scip_4Expr___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_9pyscipopt_4scip_4Expr___init__.doc = __pyx_doc_9pyscipopt_4scip_4Expr___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9pyscipopt_4scip_4Expr___init__; } } #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pyscipopt_4scip_Expr, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 143, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_9pyscipopt_4scip_4Expr_16__div__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_9pyscipopt_4scip_4Expr_16__div__.doc = __pyx_doc_9pyscipopt_4scip_4Expr_16__div__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9pyscipopt_4scip_4Expr_16__div__; } } #endif #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Expr, (PyObject *)&__pyx_type_9pyscipopt_4scip_Expr) < 0) __PYX_ERR(0, 143, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Expr) < 0) __PYX_ERR(0, 143, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Expr = &__pyx_type_9pyscipopt_4scip_Expr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_ExprCons) < 0) __PYX_ERR(0, 303, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_ExprCons.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_ExprCons.tp_dictoffset && __pyx_type_9pyscipopt_4scip_ExprCons.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_ExprCons.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ExprCons_2, (PyObject *)&__pyx_type_9pyscipopt_4scip_ExprCons) < 0) __PYX_ERR(0, 303, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_ExprCons) < 0) __PYX_ERR(0, 303, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_ExprCons = &__pyx_type_9pyscipopt_4scip_ExprCons; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_GenExpr) < 0) __PYX_ERR(0, 429, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_GenExpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_GenExpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_GenExpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_GenExpr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pyscipopt_4scip_GenExpr, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 429, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_9pyscipopt_4scip_7GenExpr___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_9pyscipopt_4scip_7GenExpr___init__.doc = __pyx_doc_9pyscipopt_4scip_7GenExpr___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9pyscipopt_4scip_7GenExpr___init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenExpr, (PyObject *)&__pyx_type_9pyscipopt_4scip_GenExpr) < 0) __PYX_ERR(0, 429, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_GenExpr) < 0) __PYX_ERR(0, 429, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_GenExpr = &__pyx_type_9pyscipopt_4scip_GenExpr; __pyx_type_9pyscipopt_4scip_SumExpr.tp_base = __pyx_ptype_9pyscipopt_4scip_GenExpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_SumExpr) < 0) __PYX_ERR(0, 609, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_SumExpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_SumExpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_SumExpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_SumExpr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SumExpr, (PyObject *)&__pyx_type_9pyscipopt_4scip_SumExpr) < 0) __PYX_ERR(0, 609, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_SumExpr) < 0) __PYX_ERR(0, 609, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_SumExpr = &__pyx_type_9pyscipopt_4scip_SumExpr; __pyx_type_9pyscipopt_4scip_ProdExpr.tp_base = __pyx_ptype_9pyscipopt_4scip_GenExpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_ProdExpr) < 0) __PYX_ERR(0, 624, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_ProdExpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_ProdExpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_ProdExpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_ProdExpr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProdExpr, (PyObject *)&__pyx_type_9pyscipopt_4scip_ProdExpr) < 0) __PYX_ERR(0, 624, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_ProdExpr) < 0) __PYX_ERR(0, 624, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_ProdExpr = &__pyx_type_9pyscipopt_4scip_ProdExpr; __pyx_type_9pyscipopt_4scip_VarExpr.tp_base = __pyx_ptype_9pyscipopt_4scip_GenExpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_VarExpr) < 0) __PYX_ERR(0, 635, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_VarExpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_VarExpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_VarExpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_VarExpr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VarExpr, (PyObject *)&__pyx_type_9pyscipopt_4scip_VarExpr) < 0) __PYX_ERR(0, 635, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_VarExpr) < 0) __PYX_ERR(0, 635, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_VarExpr = &__pyx_type_9pyscipopt_4scip_VarExpr; __pyx_type_9pyscipopt_4scip_PowExpr.tp_base = __pyx_ptype_9pyscipopt_4scip_GenExpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PowExpr) < 0) __PYX_ERR(0, 645, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PowExpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PowExpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PowExpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PowExpr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PowExpr, (PyObject *)&__pyx_type_9pyscipopt_4scip_PowExpr) < 0) __PYX_ERR(0, 645, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PowExpr) < 0) __PYX_ERR(0, 645, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PowExpr = &__pyx_type_9pyscipopt_4scip_PowExpr; __pyx_type_9pyscipopt_4scip_UnaryExpr.tp_base = __pyx_ptype_9pyscipopt_4scip_GenExpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_UnaryExpr) < 0) __PYX_ERR(0, 656, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_UnaryExpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_UnaryExpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_UnaryExpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_UnaryExpr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnaryExpr, (PyObject *)&__pyx_type_9pyscipopt_4scip_UnaryExpr) < 0) __PYX_ERR(0, 656, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_UnaryExpr) < 0) __PYX_ERR(0, 656, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_UnaryExpr = &__pyx_type_9pyscipopt_4scip_UnaryExpr; __pyx_type_9pyscipopt_4scip_Constant.tp_base = __pyx_ptype_9pyscipopt_4scip_GenExpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Constant) < 0) __PYX_ERR(0, 666, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Constant.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Constant.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Constant.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Constant.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Constant, (PyObject *)&__pyx_type_9pyscipopt_4scip_Constant) < 0) __PYX_ERR(0, 666, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Constant) < 0) __PYX_ERR(0, 666, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Constant = &__pyx_type_9pyscipopt_4scip_Constant; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_LP) < 0) __PYX_ERR(1, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_LP.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_LP.tp_dictoffset && __pyx_type_9pyscipopt_4scip_LP.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_LP.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pyscipopt_4scip_LP, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_9pyscipopt_4scip_2LP___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_9pyscipopt_4scip_2LP___init__.doc = __pyx_doc_9pyscipopt_4scip_2LP___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9pyscipopt_4scip_2LP___init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LP, (PyObject *)&__pyx_type_9pyscipopt_4scip_LP) < 0) __PYX_ERR(1, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_LP) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_LP = &__pyx_type_9pyscipopt_4scip_LP; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Benders) < 0) __PYX_ERR(2, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Benders.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Benders.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Benders.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Benders.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Benders, (PyObject *)&__pyx_type_9pyscipopt_4scip_Benders) < 0) __PYX_ERR(2, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Benders) < 0) __PYX_ERR(2, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Benders = &__pyx_type_9pyscipopt_4scip_Benders; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Benderscut) < 0) __PYX_ERR(5, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Benderscut.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Benderscut.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Benderscut.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Benderscut.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Benderscut, (PyObject *)&__pyx_type_9pyscipopt_4scip_Benderscut) < 0) __PYX_ERR(5, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Benderscut) < 0) __PYX_ERR(5, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Benderscut = &__pyx_type_9pyscipopt_4scip_Benderscut; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Branchrule) < 0) __PYX_ERR(6, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Branchrule.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Branchrule.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Branchrule.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Branchrule.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Branchrule, (PyObject *)&__pyx_type_9pyscipopt_4scip_Branchrule) < 0) __PYX_ERR(6, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Branchrule) < 0) __PYX_ERR(6, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Branchrule = &__pyx_type_9pyscipopt_4scip_Branchrule; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Conshdlr) < 0) __PYX_ERR(7, 4, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Conshdlr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Conshdlr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Conshdlr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Conshdlr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Conshdlr, (PyObject *)&__pyx_type_9pyscipopt_4scip_Conshdlr) < 0) __PYX_ERR(7, 4, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Conshdlr) < 0) __PYX_ERR(7, 4, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Conshdlr = &__pyx_type_9pyscipopt_4scip_Conshdlr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Eventhdlr) < 0) __PYX_ERR(8, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Eventhdlr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Eventhdlr.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Eventhdlr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Eventhdlr.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Eventhdlr, (PyObject *)&__pyx_type_9pyscipopt_4scip_Eventhdlr) < 0) __PYX_ERR(8, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Eventhdlr) < 0) __PYX_ERR(8, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Eventhdlr = &__pyx_type_9pyscipopt_4scip_Eventhdlr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Heur) < 0) __PYX_ERR(9, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Heur.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Heur.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Heur.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Heur.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Heur, (PyObject *)&__pyx_type_9pyscipopt_4scip_Heur) < 0) __PYX_ERR(9, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Heur) < 0) __PYX_ERR(9, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Heur = &__pyx_type_9pyscipopt_4scip_Heur; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Presol) < 0) __PYX_ERR(10, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Presol.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Presol.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Presol.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Presol.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Presol, (PyObject *)&__pyx_type_9pyscipopt_4scip_Presol) < 0) __PYX_ERR(10, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Presol) < 0) __PYX_ERR(10, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Presol = &__pyx_type_9pyscipopt_4scip_Presol; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Pricer) < 0) __PYX_ERR(11, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Pricer.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Pricer.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Pricer.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Pricer.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Pricer, (PyObject *)&__pyx_type_9pyscipopt_4scip_Pricer) < 0) __PYX_ERR(11, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Pricer) < 0) __PYX_ERR(11, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Pricer = &__pyx_type_9pyscipopt_4scip_Pricer; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Prop) < 0) __PYX_ERR(12, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Prop.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Prop.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Prop.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Prop.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Prop, (PyObject *)&__pyx_type_9pyscipopt_4scip_Prop) < 0) __PYX_ERR(12, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Prop) < 0) __PYX_ERR(12, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Prop = &__pyx_type_9pyscipopt_4scip_Prop; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Sepa) < 0) __PYX_ERR(13, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Sepa.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Sepa.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Sepa.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Sepa.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Sepa, (PyObject *)&__pyx_type_9pyscipopt_4scip_Sepa) < 0) __PYX_ERR(13, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Sepa) < 0) __PYX_ERR(13, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Sepa = &__pyx_type_9pyscipopt_4scip_Sepa; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Relax) < 0) __PYX_ERR(14, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Relax.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Relax.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Relax.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Relax.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Relax, (PyObject *)&__pyx_type_9pyscipopt_4scip_Relax) < 0) __PYX_ERR(14, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Relax) < 0) __PYX_ERR(14, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Relax = &__pyx_type_9pyscipopt_4scip_Relax; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Nodesel) < 0) __PYX_ERR(15, 3, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Nodesel.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Nodesel.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Nodesel.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Nodesel.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Nodesel, (PyObject *)&__pyx_type_9pyscipopt_4scip_Nodesel) < 0) __PYX_ERR(15, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Nodesel) < 0) __PYX_ERR(15, 3, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Nodesel = &__pyx_type_9pyscipopt_4scip_Nodesel; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT) < 0) __PYX_ERR(3, 50, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_RESULT, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT) < 0) __PYX_ERR(3, 50, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT) < 0) __PYX_ERR(3, 50, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT = &__pyx_type_9pyscipopt_4scip_PY_SCIP_RESULT; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING) < 0) __PYX_ERR(3, 69, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_PARAMSETTING, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING) < 0) __PYX_ERR(3, 69, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING) < 0) __PYX_ERR(3, 69, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING = &__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMSETTING; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS) < 0) __PYX_ERR(3, 75, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_PARAMEMPHASIS, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS) < 0) __PYX_ERR(3, 75, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS) < 0) __PYX_ERR(3, 75, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS = &__pyx_type_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS) < 0) __PYX_ERR(3, 87, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_STATUS, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS) < 0) __PYX_ERR(3, 87, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS) < 0) __PYX_ERR(3, 87, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS = &__pyx_type_9pyscipopt_4scip_PY_SCIP_STATUS; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE) < 0) __PYX_ERR(3, 104, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_STAGE, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE) < 0) __PYX_ERR(3, 104, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE) < 0) __PYX_ERR(3, 104, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE = &__pyx_type_9pyscipopt_4scip_PY_SCIP_STAGE; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE) < 0) __PYX_ERR(3, 120, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_NODETYPE, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE) < 0) __PYX_ERR(3, 120, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE) < 0) __PYX_ERR(3, 120, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE = &__pyx_type_9pyscipopt_4scip_PY_SCIP_NODETYPE; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING) < 0) __PYX_ERR(3, 134, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_PROPTIMING, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING) < 0) __PYX_ERR(3, 134, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING) < 0) __PYX_ERR(3, 134, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING = &__pyx_type_9pyscipopt_4scip_PY_SCIP_PROPTIMING; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING) < 0) __PYX_ERR(3, 140, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_PRESOLTIMING, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING) < 0) __PYX_ERR(3, 140, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING) < 0) __PYX_ERR(3, 140, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING = &__pyx_type_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING) < 0) __PYX_ERR(3, 146, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_HEURTIMING, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING) < 0) __PYX_ERR(3, 146, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING) < 0) __PYX_ERR(3, 146, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING = &__pyx_type_9pyscipopt_4scip_PY_SCIP_HEURTIMING; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE) < 0) __PYX_ERR(3, 159, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_EVENTTYPE, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE) < 0) __PYX_ERR(3, 159, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE) < 0) __PYX_ERR(3, 159, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE = &__pyx_type_9pyscipopt_4scip_PY_SCIP_EVENTTYPE; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT) < 0) __PYX_ERR(3, 196, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_LPSOLSTAT, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT) < 0) __PYX_ERR(3, 196, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT) < 0) __PYX_ERR(3, 196, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT = &__pyx_type_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR) < 0) __PYX_ERR(3, 206, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_BRANCHDIR, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR) < 0) __PYX_ERR(3, 206, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR) < 0) __PYX_ERR(3, 206, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR = &__pyx_type_9pyscipopt_4scip_PY_SCIP_BRANCHDIR; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE) < 0) __PYX_ERR(3, 212, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE.tp_dictoffset && __pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PY_SCIP_BENDERSENFOTYPE, (PyObject *)&__pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE) < 0) __PYX_ERR(3, 212, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE) < 0) __PYX_ERR(3, 212, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE = &__pyx_type_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE; __pyx_vtabptr_9pyscipopt_4scip_Event = &__pyx_vtable_9pyscipopt_4scip_Event; __pyx_vtable_9pyscipopt_4scip_Event.create = (PyObject *(*)(SCIP_EVENT *))__pyx_f_9pyscipopt_4scip_5Event_create; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Event) < 0) __PYX_ERR(3, 260, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Event.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Event.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Event.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Event.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Event) < 0) __PYX_ERR(3, 260, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9pyscipopt_4scip_Event) < 0) __PYX_ERR(3, 260, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Event) < 0) __PYX_ERR(3, 260, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Event = &__pyx_type_9pyscipopt_4scip_Event; __pyx_vtabptr_9pyscipopt_4scip_Column = &__pyx_vtable_9pyscipopt_4scip_Column; __pyx_vtable_9pyscipopt_4scip_Column.create = (PyObject *(*)(SCIP_COL *))__pyx_f_9pyscipopt_4scip_6Column_create; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Column) < 0) __PYX_ERR(3, 296, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Column.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Column.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Column.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Column.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Column.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Column) < 0) __PYX_ERR(3, 296, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Column, (PyObject *)&__pyx_type_9pyscipopt_4scip_Column) < 0) __PYX_ERR(3, 296, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Column) < 0) __PYX_ERR(3, 296, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Column = &__pyx_type_9pyscipopt_4scip_Column; __pyx_vtabptr_9pyscipopt_4scip_Row = &__pyx_vtable_9pyscipopt_4scip_Row; __pyx_vtable_9pyscipopt_4scip_Row.create = (PyObject *(*)(SCIP_ROW *))__pyx_f_9pyscipopt_4scip_3Row_create; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Row) < 0) __PYX_ERR(3, 347, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Row.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Row.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Row.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Row.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Row.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Row) < 0) __PYX_ERR(3, 347, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Row, (PyObject *)&__pyx_type_9pyscipopt_4scip_Row) < 0) __PYX_ERR(3, 347, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Row) < 0) __PYX_ERR(3, 347, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Row = &__pyx_type_9pyscipopt_4scip_Row; __pyx_vtabptr_9pyscipopt_4scip_Solution = &__pyx_vtable_9pyscipopt_4scip_Solution; __pyx_vtable_9pyscipopt_4scip_Solution.create = (PyObject *(*)(SCIP_SOL *))__pyx_f_9pyscipopt_4scip_8Solution_create; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Solution) < 0) __PYX_ERR(3, 416, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Solution.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Solution.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Solution.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Solution.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Solution.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Solution) < 0) __PYX_ERR(3, 416, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Solution, (PyObject *)&__pyx_type_9pyscipopt_4scip_Solution) < 0) __PYX_ERR(3, 416, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Solution) < 0) __PYX_ERR(3, 416, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Solution = &__pyx_type_9pyscipopt_4scip_Solution; __pyx_vtabptr_9pyscipopt_4scip_Node = &__pyx_vtable_9pyscipopt_4scip_Node; __pyx_vtable_9pyscipopt_4scip_Node.create = (PyObject *(*)(SCIP_NODE *))__pyx_f_9pyscipopt_4scip_4Node_create; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Node) < 0) __PYX_ERR(3, 428, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Node.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Node.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Node.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Node.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Node.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Node) < 0) __PYX_ERR(3, 428, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Node, (PyObject *)&__pyx_type_9pyscipopt_4scip_Node) < 0) __PYX_ERR(3, 428, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Node) < 0) __PYX_ERR(3, 428, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Node = &__pyx_type_9pyscipopt_4scip_Node; __pyx_vtabptr_9pyscipopt_4scip_Variable = &__pyx_vtable_9pyscipopt_4scip_Variable; __pyx_vtable_9pyscipopt_4scip_Variable.create = (PyObject *(*)(SCIP_VAR *))__pyx_f_9pyscipopt_4scip_8Variable_create; __pyx_type_9pyscipopt_4scip_Variable.tp_base = __pyx_ptype_9pyscipopt_4scip_Expr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Variable) < 0) __PYX_ERR(3, 492, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Variable.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Variable.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Variable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Variable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Variable.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Variable) < 0) __PYX_ERR(3, 492, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Variable, (PyObject *)&__pyx_type_9pyscipopt_4scip_Variable) < 0) __PYX_ERR(3, 492, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Variable) < 0) __PYX_ERR(3, 492, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Variable = &__pyx_type_9pyscipopt_4scip_Variable; __pyx_vtabptr_9pyscipopt_4scip_Constraint = &__pyx_vtable_9pyscipopt_4scip_Constraint; __pyx_vtable_9pyscipopt_4scip_Constraint.create = (PyObject *(*)(SCIP_CONS *))__pyx_f_9pyscipopt_4scip_10Constraint_create; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Constraint) < 0) __PYX_ERR(3, 577, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Constraint.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Constraint.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Constraint.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Constraint.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_9pyscipopt_4scip_Constraint.tp_dict, __pyx_vtabptr_9pyscipopt_4scip_Constraint) < 0) __PYX_ERR(3, 577, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Constraint, (PyObject *)&__pyx_type_9pyscipopt_4scip_Constraint) < 0) __PYX_ERR(3, 577, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Constraint) < 0) __PYX_ERR(3, 577, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Constraint = &__pyx_type_9pyscipopt_4scip_Constraint; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip_Model) < 0) __PYX_ERR(3, 665, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip_Model.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip_Model.tp_dictoffset && __pyx_type_9pyscipopt_4scip_Model.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip_Model.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pyscipopt_4scip_Model, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(3, 665, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_9pyscipopt_4scip_5Model___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_9pyscipopt_4scip_5Model___init__.doc = __pyx_doc_9pyscipopt_4scip_5Model___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9pyscipopt_4scip_5Model___init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Model, (PyObject *)&__pyx_type_9pyscipopt_4scip_Model) < 0) __PYX_ERR(3, 665, __pyx_L1_error) if (__pyx_type_9pyscipopt_4scip_Model.tp_weaklistoffset == 0) __pyx_type_9pyscipopt_4scip_Model.tp_weaklistoffset = offsetof(struct __pyx_obj_9pyscipopt_4scip_Model, __weakref__); if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pyscipopt_4scip_Model) < 0) __PYX_ERR(3, 665, __pyx_L1_error) __pyx_ptype_9pyscipopt_4scip_Model = &__pyx_type_9pyscipopt_4scip_Model; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__) < 0) __PYX_ERR(0, 88, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct____init__ = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct____init__; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 90, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_1_genexpr = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_1_genexpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree) < 0) __PYX_ERR(0, 295, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_2_degree = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_2_degree; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 300, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_3_genexpr = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_3_genexpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols) < 0) __PYX_ERR(1, 89, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_4_addCols = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_4_addCols; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(1, 100, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_5_genexpr = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_5_genexpr; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows) < 0) __PYX_ERR(1, 183, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_6_addRows = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_6_addRows; if (PyType_Ready(&__pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(1, 192, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr.tp_dictoffset && __pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_9pyscipopt_4scip___pyx_scope_struct_7_genexpr = &__pyx_type_9pyscipopt_4scip___pyx_scope_struct_7_genexpr; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(17, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(18, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(16, 199, __pyx_L1_error) __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(16, 222, __pyx_L1_error) __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(16, 226, __pyx_L1_error) __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(16, 238, __pyx_L1_error) __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(16, 764, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initscip(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initscip(void) #else __Pyx_PyMODINIT_FUNC PyInit_scip(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_scip(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { result = PyDict_SetItemString(moddict, to_name, value); } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_scip(PyObject *__pyx_pyinit_module) #endif #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'scip' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_scip(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(3, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(3, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("scip", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(3, 1, __pyx_L1_error) #endif __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(3, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(3, 1, __pyx_L1_error) Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(3, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(3, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pyscipopt__scip) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(3, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(3, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pyscipopt.scip")) { if (unlikely(PyDict_SetItemString(modules, "pyscipopt.scip", __pyx_m) < 0)) __PYX_ERR(3, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(3, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(3, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(3, 1, __pyx_L1_error) if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(3, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(3, 1, __pyx_L1_error) #endif /* "pyscipopt/scip.pyx":3 * ##@file scip.pyx * #@brief holding functions in python that reference the SCIP public functions included in scip.pxd * import weakref # <<<<<<<<<<<<<< * from os.path import abspath * from os.path import splitext */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_weakref, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_1) < 0) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":4 * #@brief holding functions in python that reference the SCIP public functions included in scip.pxd * import weakref * from os.path import abspath # <<<<<<<<<<<<<< * from os.path import splitext * import sys */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_abspath); __Pyx_GIVEREF(__pyx_n_s_abspath); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_abspath); __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_abspath); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_abspath, __pyx_t_1) < 0) __PYX_ERR(3, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyscipopt/scip.pyx":5 * import weakref * from os.path import abspath * from os.path import splitext # <<<<<<<<<<<<<< * import sys * import warnings */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_splitext); __Pyx_GIVEREF(__pyx_n_s_splitext); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_splitext); __pyx_t_1 = __Pyx_Import(__pyx_n_s_os_path, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_splitext); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitext, __pyx_t_2) < 0) __PYX_ERR(3, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":6 * from os.path import abspath * from os.path import splitext * import sys # <<<<<<<<<<<<<< * import warnings * import numpy as np */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(3, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":7 * from os.path import splitext * import sys * import warnings # <<<<<<<<<<<<<< * import numpy as np * import math */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(3, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":8 * import sys * import warnings * import numpy as np # <<<<<<<<<<<<<< * import math * cimport numpy as np */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(3, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyscipopt/scip.pyx":9 * import warnings * import numpy as np * import math # <<<<<<<<<<<<<< * cimport numpy as np * from cpython cimport Py_INCREF, Py_DECREF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":47 * * * def _is_number(e): # <<<<<<<<<<<<<< * try: * f = float(e) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_1_is_number, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_number, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":57 * * * def _expr_richcmp(self, other, op): # <<<<<<<<<<<<<< * if op == 1: # <= * if isinstance(other, Expr) or isinstance(other, GenExpr): */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_3_expr_richcmp, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_expr_richcmp, __pyx_t_1) < 0) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":83 * * * class Term: # <<<<<<<<<<<<<< * '''This is a monomial term''' * */ __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Term, __pyx_n_s_Term, (PyObject *) NULL, __pyx_n_s_pyscipopt_scip, __pyx_kp_s_This_is_a_monomial_term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "src/pyscipopt/expr.pxi":86 * '''This is a monomial term''' * * __slots__ = ('vartuple', 'ptrtuple', 'hashval') # <<<<<<<<<<<<<< * * def __init__(self, *vartuple): */ if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_slots, __pyx_tuple__111) < 0) __PYX_ERR(0, 86, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":88 * __slots__ = ('vartuple', 'ptrtuple', 'hashval') * * def __init__(self, *vartuple): # <<<<<<<<<<<<<< * self.vartuple = tuple(sorted(vartuple, key=lambda v: v.ptr())) * self.ptrtuple = tuple(v.ptr() for v in self.vartuple) */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_1__init__, 0, __pyx_n_s_Term___init, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":93 * self.hashval = sum(self.ptrtuple) * * def __getitem__(self, idx): # <<<<<<<<<<<<<< * return self.vartuple[idx] * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_3__getitem__, 0, __pyx_n_s_Term___getitem, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":96 * return self.vartuple[idx] * * def __hash__(self): # <<<<<<<<<<<<<< * return self.hashval * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_5__hash__, 0, __pyx_n_s_Term___hash, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_hash, __pyx_t_2) < 0) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":99 * return self.hashval * * def __eq__(self, other): # <<<<<<<<<<<<<< * return self.ptrtuple == other.ptrtuple * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_7__eq__, 0, __pyx_n_s_Term___eq, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_eq, __pyx_t_2) < 0) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":102 * return self.ptrtuple == other.ptrtuple * * def __len__(self): # <<<<<<<<<<<<<< * return len(self.vartuple) * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_9__len__, 0, __pyx_n_s_Term___len, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_len, __pyx_t_2) < 0) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":105 * return len(self.vartuple) * * def __add__(self, other): # <<<<<<<<<<<<<< * both = self.vartuple + other.vartuple * return Term(*both) */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_11__add__, 0, __pyx_n_s_Term___add, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":109 * return Term(*both) * * def __repr__(self): # <<<<<<<<<<<<<< * return 'Term(%s)' % ', '.join([str(v) for v in self.vartuple]) * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_4Term_13__repr__, 0, __pyx_n_s_Term___repr, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":83 * * * class Term: # <<<<<<<<<<<<<< * '''This is a monomial term''' * */ __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Term, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Term, __pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":112 * return 'Term(%s)' % ', '.join([str(v) for v in self.vartuple]) * * CONST = Term() # <<<<<<<<<<<<<< * * # helper function */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONST, __pyx_t_2) < 0) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":115 * * # helper function * def buildGenExprObj(expr): # <<<<<<<<<<<<<< * """helper function to generate an object of type GenExpr""" * if _is_number(expr): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_5buildGenExprObj, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildGenExprObj, __pyx_t_2) < 0) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":373 * raise TypeError(msg) * * def quicksum(termlist): # <<<<<<<<<<<<<< * '''add linear expressions and constants much faster than Python's sum * by avoiding intermediate data structures and adding terms inplace */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_7quicksum, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_quicksum, __pyx_t_2) < 0) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":382 * return result * * def quickprod(termlist): # <<<<<<<<<<<<<< * '''multiply linear expressions and constants by avoiding intermediate * data structures and multiplying terms inplace */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_9quickprod, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_quickprod, __pyx_t_2) < 0) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":392 * * * class Op: # <<<<<<<<<<<<<< * const = 'const' * varidx = 'var' */ __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Op, __pyx_n_s_Op, (PyObject *) NULL, __pyx_n_s_pyscipopt_scip, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "src/pyscipopt/expr.pxi":393 * * class Op: * const = 'const' # <<<<<<<<<<<<<< * varidx = 'var' * exp, log, sqrt = 'exp','log', 'sqrt' */ if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_const, __pyx_n_u_const) < 0) __PYX_ERR(0, 393, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":394 * class Op: * const = 'const' * varidx = 'var' # <<<<<<<<<<<<<< * exp, log, sqrt = 'exp','log', 'sqrt' * plus, minus, mul, div, power = '+', '-', '*', '/', '**' */ if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_varidx, __pyx_n_u_var) < 0) __PYX_ERR(0, 394, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":395 * const = 'const' * varidx = 'var' * exp, log, sqrt = 'exp','log', 'sqrt' # <<<<<<<<<<<<<< * plus, minus, mul, div, power = '+', '-', '*', '/', '**' * add = 'sum' */ __pyx_t_1 = __pyx_n_u_exp; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_n_u_log; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_n_u_sqrt; __Pyx_INCREF(__pyx_t_4); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_exp, __pyx_t_1) < 0) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_log, __pyx_t_3) < 0) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sqrt, __pyx_t_4) < 0) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/pyscipopt/expr.pxi":396 * varidx = 'var' * exp, log, sqrt = 'exp','log', 'sqrt' * plus, minus, mul, div, power = '+', '-', '*', '/', '**' # <<<<<<<<<<<<<< * add = 'sum' * prod = 'prod' */ __pyx_t_4 = __pyx_kp_u__132; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __pyx_kp_u__133; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_kp_u__134; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_kp_u__135; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = __pyx_kp_u__136; __Pyx_INCREF(__pyx_t_6); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_plus, __pyx_t_4) < 0) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_minus, __pyx_t_3) < 0) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_mul_2, __pyx_t_1) < 0) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_div_2, __pyx_t_5) < 0) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_power, __pyx_t_6) < 0) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":397 * exp, log, sqrt = 'exp','log', 'sqrt' * plus, minus, mul, div, power = '+', '-', '*', '/', '**' * add = 'sum' # <<<<<<<<<<<<<< * prod = 'prod' * fabs = 'abs' */ if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_add_2, __pyx_n_u_sum) < 0) __PYX_ERR(0, 397, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":398 * plus, minus, mul, div, power = '+', '-', '*', '/', '**' * add = 'sum' * prod = 'prod' # <<<<<<<<<<<<<< * fabs = 'abs' * operatorIndexDic={ */ if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_prod, __pyx_n_u_prod) < 0) __PYX_ERR(0, 398, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":399 * add = 'sum' * prod = 'prod' * fabs = 'abs' # <<<<<<<<<<<<<< * operatorIndexDic={ * varidx:SCIP_EXPR_VARIDX, */ if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_fabs, __pyx_n_u_abs) < 0) __PYX_ERR(0, 399, __pyx_L1_error) /* "src/pyscipopt/expr.pxi":401 * fabs = 'abs' * operatorIndexDic={ * varidx:SCIP_EXPR_VARIDX, # <<<<<<<<<<<<<< * const:SCIP_EXPR_CONST, * plus:SCIP_EXPR_PLUS, */ __pyx_t_6 = __Pyx_PyDict_NewPresized(13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_varidx); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_varidx); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_VARIDX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":402 * operatorIndexDic={ * varidx:SCIP_EXPR_VARIDX, * const:SCIP_EXPR_CONST, # <<<<<<<<<<<<<< * plus:SCIP_EXPR_PLUS, * minus:SCIP_EXPR_MINUS, */ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_const); if (unlikely(!__pyx_t_1)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_const); } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_CONST); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_t_1, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":403 * varidx:SCIP_EXPR_VARIDX, * const:SCIP_EXPR_CONST, * plus:SCIP_EXPR_PLUS, # <<<<<<<<<<<<<< * minus:SCIP_EXPR_MINUS, * mul:SCIP_EXPR_MUL, */ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_plus); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_plus); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_PLUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":404 * const:SCIP_EXPR_CONST, * plus:SCIP_EXPR_PLUS, * minus:SCIP_EXPR_MINUS, # <<<<<<<<<<<<<< * mul:SCIP_EXPR_MUL, * div:SCIP_EXPR_DIV, */ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_minus); if (unlikely(!__pyx_t_1)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_minus); } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_MINUS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_t_1, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":405 * plus:SCIP_EXPR_PLUS, * minus:SCIP_EXPR_MINUS, * mul:SCIP_EXPR_MUL, # <<<<<<<<<<<<<< * div:SCIP_EXPR_DIV, * sqrt:SCIP_EXPR_SQRT, */ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_mul_2); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_mul_2); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_MUL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":406 * minus:SCIP_EXPR_MINUS, * mul:SCIP_EXPR_MUL, * div:SCIP_EXPR_DIV, # <<<<<<<<<<<<<< * sqrt:SCIP_EXPR_SQRT, * power:SCIP_EXPR_REALPOWER, */ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_div_2); if (unlikely(!__pyx_t_1)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_div_2); } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_DIV); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_t_1, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":407 * mul:SCIP_EXPR_MUL, * div:SCIP_EXPR_DIV, * sqrt:SCIP_EXPR_SQRT, # <<<<<<<<<<<<<< * power:SCIP_EXPR_REALPOWER, * exp:SCIP_EXPR_EXP, */ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sqrt); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_SQRT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":408 * div:SCIP_EXPR_DIV, * sqrt:SCIP_EXPR_SQRT, * power:SCIP_EXPR_REALPOWER, # <<<<<<<<<<<<<< * exp:SCIP_EXPR_EXP, * log:SCIP_EXPR_LOG, */ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_power); if (unlikely(!__pyx_t_1)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_power); } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_REALPOWER); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_t_1, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":409 * sqrt:SCIP_EXPR_SQRT, * power:SCIP_EXPR_REALPOWER, * exp:SCIP_EXPR_EXP, # <<<<<<<<<<<<<< * log:SCIP_EXPR_LOG, * fabs:SCIP_EXPR_ABS, */ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_exp); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_exp); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_EXP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":410 * power:SCIP_EXPR_REALPOWER, * exp:SCIP_EXPR_EXP, * log:SCIP_EXPR_LOG, # <<<<<<<<<<<<<< * fabs:SCIP_EXPR_ABS, * add:SCIP_EXPR_SUM, */ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_LOG); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_t_1, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":411 * exp:SCIP_EXPR_EXP, * log:SCIP_EXPR_LOG, * fabs:SCIP_EXPR_ABS, # <<<<<<<<<<<<<< * add:SCIP_EXPR_SUM, * prod:SCIP_EXPR_PRODUCT */ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_fabs); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_fabs); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_ABS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/pyscipopt/expr.pxi":412 * log:SCIP_EXPR_LOG, * fabs:SCIP_EXPR_ABS, * add:SCIP_EXPR_SUM, # <<<<<<<<<<<<<< * prod:SCIP_EXPR_PRODUCT * } */ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_add_2); if (unlikely(!__pyx_t_1)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_add_2); } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_SUM); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_6, __pyx_t_1, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/pyscipopt/expr.pxi":413 * fabs:SCIP_EXPR_ABS, * add:SCIP_EXPR_SUM, * prod:SCIP_EXPR_PRODUCT # <<<<<<<<<<<<<< * } * def getOpIndex(self, op): */ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_prod); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPR_PRODUCT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, __pyx_t_5, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_operatorIndexDic, __pyx_t_6) < 0) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":415 * prod:SCIP_EXPR_PRODUCT * } * def getOpIndex(self, op): # <<<<<<<<<<<<<< * '''returns operator index''' * return Op.operatorIndexDic[op]; */ __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_2Op_1getOpIndex, 0, __pyx_n_s_Op_getOpIndex, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getOpIndex, __pyx_t_6) < 0) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":392 * * * class Op: # <<<<<<<<<<<<<< * const = 'const' * varidx = 'var' */ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Op, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Op, __pyx_t_6) < 0) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/pyscipopt/expr.pxi":419 * return Op.operatorIndexDic[op]; * * Operator = Op() # <<<<<<<<<<<<<< * * ##@details <pre> General expressions of variables with operator overloading. */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_Operator, __pyx_t_6) < 0) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":676 * return str(self.number) * * def exp(expr): # <<<<<<<<<<<<<< * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_11exp, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_exp, __pyx_t_6) < 0) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":679 * """returns expression with exp-function""" * return UnaryExpr(Operator.exp, buildGenExprObj(expr)) * def log(expr): # <<<<<<<<<<<<<< * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_13log, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_6) < 0) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":682 * """returns expression with log-function""" * return UnaryExpr(Operator.log, buildGenExprObj(expr)) * def sqrt(expr): # <<<<<<<<<<<<<< * """returns expression with sqrt-function""" * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_15sqrt, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sqrt, __pyx_t_6) < 0) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":686 * return UnaryExpr(Operator.sqrt, buildGenExprObj(expr)) * * def expr_to_nodes(expr): # <<<<<<<<<<<<<< * '''transforms tree to an array of nodes. each node is an operator and the position of the * children of that operator (i.e. the other nodes) in the array''' */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_17expr_to_nodes, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_expr_to_nodes, __pyx_t_6) < 0) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":694 * return nodes * * def value_to_array(val, nodes): # <<<<<<<<<<<<<< * """adds a given value to an array""" * nodes.append(tuple(['const', [val]])) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_19value_to_array, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_to_array, __pyx_t_6) < 0) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/pyscipopt/expr.pxi":704 * # also, for sums, we are not considering coefficients, because basically all coefficients are 1 * # haven't even consider substractions, but I guess we would interpret them as a - b = a + (-1) * b * def expr_to_array(expr, nodes): # <<<<<<<<<<<<<< * """adds expression to array""" * op = expr._op */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_21expr_to_array, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_expr_to_array, __pyx_t_6) < 0) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":34 * * # recommended SCIP version; major version is required * MAJOR = 6 # <<<<<<<<<<<<<< * MINOR = 0 * PATCH = 0 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAJOR, __pyx_int_6) < 0) __PYX_ERR(3, 34, __pyx_L1_error) /* "pyscipopt/scip.pyx":35 * # recommended SCIP version; major version is required * MAJOR = 6 * MINOR = 0 # <<<<<<<<<<<<<< * PATCH = 0 * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINOR, __pyx_int_0) < 0) __PYX_ERR(3, 35, __pyx_L1_error) /* "pyscipopt/scip.pyx":36 * MAJOR = 6 * MINOR = 0 * PATCH = 0 # <<<<<<<<<<<<<< * * # for external user functions use def; for functions used only inside the interface (starting with _) use cdef */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PATCH, __pyx_int_0) < 0) __PYX_ERR(3, 36, __pyx_L1_error) /* "pyscipopt/scip.pyx":41 * # todo: check whether this is currently done like this * * if sys.version_info >= (3, 0): # <<<<<<<<<<<<<< * str_conversion = lambda x:bytes(x,'utf-8') * else: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__151, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "pyscipopt/scip.pyx":42 * * if sys.version_info >= (3, 0): * str_conversion = lambda x:bytes(x,'utf-8') # <<<<<<<<<<<<<< * else: * str_conversion = lambda x:x */ __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_70lambda7, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_str_conversion, __pyx_t_6) < 0) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":41 * # todo: check whether this is currently done like this * * if sys.version_info >= (3, 0): # <<<<<<<<<<<<<< * str_conversion = lambda x:bytes(x,'utf-8') * else: */ goto __pyx_L2; } /* "pyscipopt/scip.pyx":44 * str_conversion = lambda x:bytes(x,'utf-8') * else: * str_conversion = lambda x:x # <<<<<<<<<<<<<< * * # Mapping the SCIP_RESULT enum to a python class */ /*else*/ { __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9pyscipopt_4scip_71lambda8, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pyscipopt_scip, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_str_conversion, __pyx_t_6) < 0) __PYX_ERR(3, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L2:; /* "pyscipopt/scip.pyx":51 * # original naming scheme using capital letters * cdef class PY_SCIP_RESULT: * DIDNOTRUN = SCIP_DIDNOTRUN # <<<<<<<<<<<<<< * DELAYED = SCIP_DELAYED * DIDNOTFIND = SCIP_DIDNOTFIND */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_DIDNOTRUN); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_DIDNOTRUN, __pyx_t_6) < 0) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":52 * cdef class PY_SCIP_RESULT: * DIDNOTRUN = SCIP_DIDNOTRUN * DELAYED = SCIP_DELAYED # <<<<<<<<<<<<<< * DIDNOTFIND = SCIP_DIDNOTFIND * FEASIBLE = SCIP_FEASIBLE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_DELAYED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_DELAYED, __pyx_t_6) < 0) __PYX_ERR(3, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":53 * DIDNOTRUN = SCIP_DIDNOTRUN * DELAYED = SCIP_DELAYED * DIDNOTFIND = SCIP_DIDNOTFIND # <<<<<<<<<<<<<< * FEASIBLE = SCIP_FEASIBLE * INFEASIBLE = SCIP_INFEASIBLE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_DIDNOTFIND); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_DIDNOTFIND, __pyx_t_6) < 0) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":54 * DELAYED = SCIP_DELAYED * DIDNOTFIND = SCIP_DIDNOTFIND * FEASIBLE = SCIP_FEASIBLE # <<<<<<<<<<<<<< * INFEASIBLE = SCIP_INFEASIBLE * UNBOUNDED = SCIP_UNBOUNDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_FEASIBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_FEASIBLE, __pyx_t_6) < 0) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":55 * DIDNOTFIND = SCIP_DIDNOTFIND * FEASIBLE = SCIP_FEASIBLE * INFEASIBLE = SCIP_INFEASIBLE # <<<<<<<<<<<<<< * UNBOUNDED = SCIP_UNBOUNDED * CUTOFF = SCIP_CUTOFF */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_INFEASIBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_INFEASIBLE, __pyx_t_6) < 0) __PYX_ERR(3, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":56 * FEASIBLE = SCIP_FEASIBLE * INFEASIBLE = SCIP_INFEASIBLE * UNBOUNDED = SCIP_UNBOUNDED # <<<<<<<<<<<<<< * CUTOFF = SCIP_CUTOFF * SEPARATED = SCIP_SEPARATED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_UNBOUNDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_UNBOUNDED, __pyx_t_6) < 0) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":57 * INFEASIBLE = SCIP_INFEASIBLE * UNBOUNDED = SCIP_UNBOUNDED * CUTOFF = SCIP_CUTOFF # <<<<<<<<<<<<<< * SEPARATED = SCIP_SEPARATED * NEWROUND = SCIP_NEWROUND */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_CUTOFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_CUTOFF, __pyx_t_6) < 0) __PYX_ERR(3, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":58 * UNBOUNDED = SCIP_UNBOUNDED * CUTOFF = SCIP_CUTOFF * SEPARATED = SCIP_SEPARATED # <<<<<<<<<<<<<< * NEWROUND = SCIP_NEWROUND * REDUCEDDOM = SCIP_REDUCEDDOM */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_SEPARATED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_SEPARATED, __pyx_t_6) < 0) __PYX_ERR(3, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":59 * CUTOFF = SCIP_CUTOFF * SEPARATED = SCIP_SEPARATED * NEWROUND = SCIP_NEWROUND # <<<<<<<<<<<<<< * REDUCEDDOM = SCIP_REDUCEDDOM * CONSADDED = SCIP_CONSADDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_NEWROUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_NEWROUND, __pyx_t_6) < 0) __PYX_ERR(3, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":60 * SEPARATED = SCIP_SEPARATED * NEWROUND = SCIP_NEWROUND * REDUCEDDOM = SCIP_REDUCEDDOM # <<<<<<<<<<<<<< * CONSADDED = SCIP_CONSADDED * CONSCHANGED = SCIP_CONSCHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_REDUCEDDOM); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_REDUCEDDOM, __pyx_t_6) < 0) __PYX_ERR(3, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":61 * NEWROUND = SCIP_NEWROUND * REDUCEDDOM = SCIP_REDUCEDDOM * CONSADDED = SCIP_CONSADDED # <<<<<<<<<<<<<< * CONSCHANGED = SCIP_CONSCHANGED * BRANCHED = SCIP_BRANCHED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_CONSADDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_CONSADDED, __pyx_t_6) < 0) __PYX_ERR(3, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":62 * REDUCEDDOM = SCIP_REDUCEDDOM * CONSADDED = SCIP_CONSADDED * CONSCHANGED = SCIP_CONSCHANGED # <<<<<<<<<<<<<< * BRANCHED = SCIP_BRANCHED * SOLVELP = SCIP_SOLVELP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_CONSCHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_CONSCHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":63 * CONSADDED = SCIP_CONSADDED * CONSCHANGED = SCIP_CONSCHANGED * BRANCHED = SCIP_BRANCHED # <<<<<<<<<<<<<< * SOLVELP = SCIP_SOLVELP * FOUNDSOL = SCIP_FOUNDSOL */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_BRANCHED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_BRANCHED, __pyx_t_6) < 0) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":64 * CONSCHANGED = SCIP_CONSCHANGED * BRANCHED = SCIP_BRANCHED * SOLVELP = SCIP_SOLVELP # <<<<<<<<<<<<<< * FOUNDSOL = SCIP_FOUNDSOL * SUSPENDED = SCIP_SUSPENDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_SOLVELP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_SOLVELP, __pyx_t_6) < 0) __PYX_ERR(3, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":65 * BRANCHED = SCIP_BRANCHED * SOLVELP = SCIP_SOLVELP * FOUNDSOL = SCIP_FOUNDSOL # <<<<<<<<<<<<<< * SUSPENDED = SCIP_SUSPENDED * SUCCESS = SCIP_SUCCESS */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_FOUNDSOL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_FOUNDSOL, __pyx_t_6) < 0) __PYX_ERR(3, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":66 * SOLVELP = SCIP_SOLVELP * FOUNDSOL = SCIP_FOUNDSOL * SUSPENDED = SCIP_SUSPENDED # <<<<<<<<<<<<<< * SUCCESS = SCIP_SUCCESS * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_SUSPENDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_SUSPENDED, __pyx_t_6) < 0) __PYX_ERR(3, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":67 * FOUNDSOL = SCIP_FOUNDSOL * SUSPENDED = SCIP_SUSPENDED * SUCCESS = SCIP_SUCCESS # <<<<<<<<<<<<<< * * cdef class PY_SCIP_PARAMSETTING: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_RESULT(SCIP_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT->tp_dict, __pyx_n_s_SUCCESS, __pyx_t_6) < 0) __PYX_ERR(3, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_RESULT); /* "pyscipopt/scip.pyx":70 * * cdef class PY_SCIP_PARAMSETTING: * DEFAULT = SCIP_PARAMSETTING_DEFAULT # <<<<<<<<<<<<<< * AGGRESSIVE = SCIP_PARAMSETTING_AGGRESSIVE * FAST = SCIP_PARAMSETTING_FAST */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMSETTING(SCIP_PARAMSETTING_DEFAULT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING->tp_dict, __pyx_n_s_DEFAULT, __pyx_t_6) < 0) __PYX_ERR(3, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING); /* "pyscipopt/scip.pyx":71 * cdef class PY_SCIP_PARAMSETTING: * DEFAULT = SCIP_PARAMSETTING_DEFAULT * AGGRESSIVE = SCIP_PARAMSETTING_AGGRESSIVE # <<<<<<<<<<<<<< * FAST = SCIP_PARAMSETTING_FAST * OFF = SCIP_PARAMSETTING_OFF */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMSETTING(SCIP_PARAMSETTING_AGGRESSIVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING->tp_dict, __pyx_n_s_AGGRESSIVE, __pyx_t_6) < 0) __PYX_ERR(3, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING); /* "pyscipopt/scip.pyx":72 * DEFAULT = SCIP_PARAMSETTING_DEFAULT * AGGRESSIVE = SCIP_PARAMSETTING_AGGRESSIVE * FAST = SCIP_PARAMSETTING_FAST # <<<<<<<<<<<<<< * OFF = SCIP_PARAMSETTING_OFF * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMSETTING(SCIP_PARAMSETTING_FAST); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING->tp_dict, __pyx_n_s_FAST, __pyx_t_6) < 0) __PYX_ERR(3, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING); /* "pyscipopt/scip.pyx":73 * AGGRESSIVE = SCIP_PARAMSETTING_AGGRESSIVE * FAST = SCIP_PARAMSETTING_FAST * OFF = SCIP_PARAMSETTING_OFF # <<<<<<<<<<<<<< * * cdef class PY_SCIP_PARAMEMPHASIS: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMSETTING(SCIP_PARAMSETTING_OFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING->tp_dict, __pyx_n_s_OFF, __pyx_t_6) < 0) __PYX_ERR(3, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMSETTING); /* "pyscipopt/scip.pyx":76 * * cdef class PY_SCIP_PARAMEMPHASIS: * DEFAULT = SCIP_PARAMEMPHASIS_DEFAULT # <<<<<<<<<<<<<< * CPSOLVER = SCIP_PARAMEMPHASIS_CPSOLVER * EASYCIP = SCIP_PARAMEMPHASIS_EASYCIP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_DEFAULT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_DEFAULT, __pyx_t_6) < 0) __PYX_ERR(3, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":77 * cdef class PY_SCIP_PARAMEMPHASIS: * DEFAULT = SCIP_PARAMEMPHASIS_DEFAULT * CPSOLVER = SCIP_PARAMEMPHASIS_CPSOLVER # <<<<<<<<<<<<<< * EASYCIP = SCIP_PARAMEMPHASIS_EASYCIP * FEASIBILITY = SCIP_PARAMEMPHASIS_FEASIBILITY */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_CPSOLVER); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_CPSOLVER, __pyx_t_6) < 0) __PYX_ERR(3, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":78 * DEFAULT = SCIP_PARAMEMPHASIS_DEFAULT * CPSOLVER = SCIP_PARAMEMPHASIS_CPSOLVER * EASYCIP = SCIP_PARAMEMPHASIS_EASYCIP # <<<<<<<<<<<<<< * FEASIBILITY = SCIP_PARAMEMPHASIS_FEASIBILITY * HARDLP = SCIP_PARAMEMPHASIS_HARDLP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_EASYCIP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_EASYCIP, __pyx_t_6) < 0) __PYX_ERR(3, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":79 * CPSOLVER = SCIP_PARAMEMPHASIS_CPSOLVER * EASYCIP = SCIP_PARAMEMPHASIS_EASYCIP * FEASIBILITY = SCIP_PARAMEMPHASIS_FEASIBILITY # <<<<<<<<<<<<<< * HARDLP = SCIP_PARAMEMPHASIS_HARDLP * OPTIMALITY = SCIP_PARAMEMPHASIS_OPTIMALITY */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_FEASIBILITY); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_FEASIBILITY, __pyx_t_6) < 0) __PYX_ERR(3, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":80 * EASYCIP = SCIP_PARAMEMPHASIS_EASYCIP * FEASIBILITY = SCIP_PARAMEMPHASIS_FEASIBILITY * HARDLP = SCIP_PARAMEMPHASIS_HARDLP # <<<<<<<<<<<<<< * OPTIMALITY = SCIP_PARAMEMPHASIS_OPTIMALITY * COUNTER = SCIP_PARAMEMPHASIS_COUNTER */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_HARDLP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_HARDLP, __pyx_t_6) < 0) __PYX_ERR(3, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":81 * FEASIBILITY = SCIP_PARAMEMPHASIS_FEASIBILITY * HARDLP = SCIP_PARAMEMPHASIS_HARDLP * OPTIMALITY = SCIP_PARAMEMPHASIS_OPTIMALITY # <<<<<<<<<<<<<< * COUNTER = SCIP_PARAMEMPHASIS_COUNTER * PHASEFEAS = SCIP_PARAMEMPHASIS_PHASEFEAS */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_OPTIMALITY); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_OPTIMALITY, __pyx_t_6) < 0) __PYX_ERR(3, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":82 * HARDLP = SCIP_PARAMEMPHASIS_HARDLP * OPTIMALITY = SCIP_PARAMEMPHASIS_OPTIMALITY * COUNTER = SCIP_PARAMEMPHASIS_COUNTER # <<<<<<<<<<<<<< * PHASEFEAS = SCIP_PARAMEMPHASIS_PHASEFEAS * PHASEIMPROVE = SCIP_PARAMEMPHASIS_PHASEIMPROVE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_COUNTER); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_COUNTER, __pyx_t_6) < 0) __PYX_ERR(3, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":83 * OPTIMALITY = SCIP_PARAMEMPHASIS_OPTIMALITY * COUNTER = SCIP_PARAMEMPHASIS_COUNTER * PHASEFEAS = SCIP_PARAMEMPHASIS_PHASEFEAS # <<<<<<<<<<<<<< * PHASEIMPROVE = SCIP_PARAMEMPHASIS_PHASEIMPROVE * PHASEPROOF = SCIP_PARAMEMPHASIS_PHASEPROOF */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_PHASEFEAS); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_PHASEFEAS, __pyx_t_6) < 0) __PYX_ERR(3, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":84 * COUNTER = SCIP_PARAMEMPHASIS_COUNTER * PHASEFEAS = SCIP_PARAMEMPHASIS_PHASEFEAS * PHASEIMPROVE = SCIP_PARAMEMPHASIS_PHASEIMPROVE # <<<<<<<<<<<<<< * PHASEPROOF = SCIP_PARAMEMPHASIS_PHASEPROOF * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_PHASEIMPROVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_PHASEIMPROVE, __pyx_t_6) < 0) __PYX_ERR(3, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":85 * PHASEFEAS = SCIP_PARAMEMPHASIS_PHASEFEAS * PHASEIMPROVE = SCIP_PARAMEMPHASIS_PHASEIMPROVE * PHASEPROOF = SCIP_PARAMEMPHASIS_PHASEPROOF # <<<<<<<<<<<<<< * * cdef class PY_SCIP_STATUS: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS_PHASEPROOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS->tp_dict, __pyx_n_s_PHASEPROOF, __pyx_t_6) < 0) __PYX_ERR(3, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PARAMEMPHASIS); /* "pyscipopt/scip.pyx":88 * * cdef class PY_SCIP_STATUS: * UNKNOWN = SCIP_STATUS_UNKNOWN # <<<<<<<<<<<<<< * USERINTERRUPT = SCIP_STATUS_USERINTERRUPT * NODELIMIT = SCIP_STATUS_NODELIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_UNKNOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_UNKNOWN, __pyx_t_6) < 0) __PYX_ERR(3, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":89 * cdef class PY_SCIP_STATUS: * UNKNOWN = SCIP_STATUS_UNKNOWN * USERINTERRUPT = SCIP_STATUS_USERINTERRUPT # <<<<<<<<<<<<<< * NODELIMIT = SCIP_STATUS_NODELIMIT * TOTALNODELIMIT = SCIP_STATUS_TOTALNODELIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_USERINTERRUPT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_USERINTERRUPT, __pyx_t_6) < 0) __PYX_ERR(3, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":90 * UNKNOWN = SCIP_STATUS_UNKNOWN * USERINTERRUPT = SCIP_STATUS_USERINTERRUPT * NODELIMIT = SCIP_STATUS_NODELIMIT # <<<<<<<<<<<<<< * TOTALNODELIMIT = SCIP_STATUS_TOTALNODELIMIT * STALLNODELIMIT = SCIP_STATUS_STALLNODELIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_NODELIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_NODELIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":91 * USERINTERRUPT = SCIP_STATUS_USERINTERRUPT * NODELIMIT = SCIP_STATUS_NODELIMIT * TOTALNODELIMIT = SCIP_STATUS_TOTALNODELIMIT # <<<<<<<<<<<<<< * STALLNODELIMIT = SCIP_STATUS_STALLNODELIMIT * TIMELIMIT = SCIP_STATUS_TIMELIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_TOTALNODELIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_TOTALNODELIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":92 * NODELIMIT = SCIP_STATUS_NODELIMIT * TOTALNODELIMIT = SCIP_STATUS_TOTALNODELIMIT * STALLNODELIMIT = SCIP_STATUS_STALLNODELIMIT # <<<<<<<<<<<<<< * TIMELIMIT = SCIP_STATUS_TIMELIMIT * MEMLIMIT = SCIP_STATUS_MEMLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_STALLNODELIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_STALLNODELIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":93 * TOTALNODELIMIT = SCIP_STATUS_TOTALNODELIMIT * STALLNODELIMIT = SCIP_STATUS_STALLNODELIMIT * TIMELIMIT = SCIP_STATUS_TIMELIMIT # <<<<<<<<<<<<<< * MEMLIMIT = SCIP_STATUS_MEMLIMIT * GAPLIMIT = SCIP_STATUS_GAPLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_TIMELIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_TIMELIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":94 * STALLNODELIMIT = SCIP_STATUS_STALLNODELIMIT * TIMELIMIT = SCIP_STATUS_TIMELIMIT * MEMLIMIT = SCIP_STATUS_MEMLIMIT # <<<<<<<<<<<<<< * GAPLIMIT = SCIP_STATUS_GAPLIMIT * SOLLIMIT = SCIP_STATUS_SOLLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_MEMLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_MEMLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":95 * TIMELIMIT = SCIP_STATUS_TIMELIMIT * MEMLIMIT = SCIP_STATUS_MEMLIMIT * GAPLIMIT = SCIP_STATUS_GAPLIMIT # <<<<<<<<<<<<<< * SOLLIMIT = SCIP_STATUS_SOLLIMIT * BESTSOLLIMIT = SCIP_STATUS_BESTSOLLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_GAPLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_GAPLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":96 * MEMLIMIT = SCIP_STATUS_MEMLIMIT * GAPLIMIT = SCIP_STATUS_GAPLIMIT * SOLLIMIT = SCIP_STATUS_SOLLIMIT # <<<<<<<<<<<<<< * BESTSOLLIMIT = SCIP_STATUS_BESTSOLLIMIT * RESTARTLIMIT = SCIP_STATUS_RESTARTLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_SOLLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_SOLLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":97 * GAPLIMIT = SCIP_STATUS_GAPLIMIT * SOLLIMIT = SCIP_STATUS_SOLLIMIT * BESTSOLLIMIT = SCIP_STATUS_BESTSOLLIMIT # <<<<<<<<<<<<<< * RESTARTLIMIT = SCIP_STATUS_RESTARTLIMIT * OPTIMAL = SCIP_STATUS_OPTIMAL */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_BESTSOLLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_BESTSOLLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":98 * SOLLIMIT = SCIP_STATUS_SOLLIMIT * BESTSOLLIMIT = SCIP_STATUS_BESTSOLLIMIT * RESTARTLIMIT = SCIP_STATUS_RESTARTLIMIT # <<<<<<<<<<<<<< * OPTIMAL = SCIP_STATUS_OPTIMAL * INFEASIBLE = SCIP_STATUS_INFEASIBLE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_RESTARTLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_RESTARTLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":99 * BESTSOLLIMIT = SCIP_STATUS_BESTSOLLIMIT * RESTARTLIMIT = SCIP_STATUS_RESTARTLIMIT * OPTIMAL = SCIP_STATUS_OPTIMAL # <<<<<<<<<<<<<< * INFEASIBLE = SCIP_STATUS_INFEASIBLE * UNBOUNDED = SCIP_STATUS_UNBOUNDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_OPTIMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_OPTIMAL, __pyx_t_6) < 0) __PYX_ERR(3, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":100 * RESTARTLIMIT = SCIP_STATUS_RESTARTLIMIT * OPTIMAL = SCIP_STATUS_OPTIMAL * INFEASIBLE = SCIP_STATUS_INFEASIBLE # <<<<<<<<<<<<<< * UNBOUNDED = SCIP_STATUS_UNBOUNDED * INFORUNBD = SCIP_STATUS_INFORUNBD */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_INFEASIBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_INFEASIBLE, __pyx_t_6) < 0) __PYX_ERR(3, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":101 * OPTIMAL = SCIP_STATUS_OPTIMAL * INFEASIBLE = SCIP_STATUS_INFEASIBLE * UNBOUNDED = SCIP_STATUS_UNBOUNDED # <<<<<<<<<<<<<< * INFORUNBD = SCIP_STATUS_INFORUNBD * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_UNBOUNDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_UNBOUNDED, __pyx_t_6) < 0) __PYX_ERR(3, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":102 * INFEASIBLE = SCIP_STATUS_INFEASIBLE * UNBOUNDED = SCIP_STATUS_UNBOUNDED * INFORUNBD = SCIP_STATUS_INFORUNBD # <<<<<<<<<<<<<< * * cdef class PY_SCIP_STAGE: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS_INFORUNBD); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS->tp_dict, __pyx_n_s_INFORUNBD, __pyx_t_6) < 0) __PYX_ERR(3, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STATUS); /* "pyscipopt/scip.pyx":105 * * cdef class PY_SCIP_STAGE: * INIT = SCIP_STAGE_INIT # <<<<<<<<<<<<<< * PROBLEM = SCIP_STAGE_PROBLEM * TRANSFORMING = SCIP_STAGE_TRANSFORMING */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_INIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_INIT, __pyx_t_6) < 0) __PYX_ERR(3, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":106 * cdef class PY_SCIP_STAGE: * INIT = SCIP_STAGE_INIT * PROBLEM = SCIP_STAGE_PROBLEM # <<<<<<<<<<<<<< * TRANSFORMING = SCIP_STAGE_TRANSFORMING * TRANSFORMED = SCIP_STAGE_TRANSFORMED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_PROBLEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_PROBLEM, __pyx_t_6) < 0) __PYX_ERR(3, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":107 * INIT = SCIP_STAGE_INIT * PROBLEM = SCIP_STAGE_PROBLEM * TRANSFORMING = SCIP_STAGE_TRANSFORMING # <<<<<<<<<<<<<< * TRANSFORMED = SCIP_STAGE_TRANSFORMED * INITPRESOLVE = SCIP_STAGE_INITPRESOLVE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_TRANSFORMING); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_TRANSFORMING, __pyx_t_6) < 0) __PYX_ERR(3, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":108 * PROBLEM = SCIP_STAGE_PROBLEM * TRANSFORMING = SCIP_STAGE_TRANSFORMING * TRANSFORMED = SCIP_STAGE_TRANSFORMED # <<<<<<<<<<<<<< * INITPRESOLVE = SCIP_STAGE_INITPRESOLVE * PRESOLVING = SCIP_STAGE_PRESOLVING */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_TRANSFORMED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_TRANSFORMED, __pyx_t_6) < 0) __PYX_ERR(3, 108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":109 * TRANSFORMING = SCIP_STAGE_TRANSFORMING * TRANSFORMED = SCIP_STAGE_TRANSFORMED * INITPRESOLVE = SCIP_STAGE_INITPRESOLVE # <<<<<<<<<<<<<< * PRESOLVING = SCIP_STAGE_PRESOLVING * EXITPRESOLVE = SCIP_STAGE_EXITPRESOLVE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_INITPRESOLVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_INITPRESOLVE, __pyx_t_6) < 0) __PYX_ERR(3, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":110 * TRANSFORMED = SCIP_STAGE_TRANSFORMED * INITPRESOLVE = SCIP_STAGE_INITPRESOLVE * PRESOLVING = SCIP_STAGE_PRESOLVING # <<<<<<<<<<<<<< * EXITPRESOLVE = SCIP_STAGE_EXITPRESOLVE * PRESOLVED = SCIP_STAGE_PRESOLVED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_PRESOLVING); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_PRESOLVING, __pyx_t_6) < 0) __PYX_ERR(3, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":111 * INITPRESOLVE = SCIP_STAGE_INITPRESOLVE * PRESOLVING = SCIP_STAGE_PRESOLVING * EXITPRESOLVE = SCIP_STAGE_EXITPRESOLVE # <<<<<<<<<<<<<< * PRESOLVED = SCIP_STAGE_PRESOLVED * INITSOLVE = SCIP_STAGE_INITSOLVE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_EXITPRESOLVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_EXITPRESOLVE, __pyx_t_6) < 0) __PYX_ERR(3, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":112 * PRESOLVING = SCIP_STAGE_PRESOLVING * EXITPRESOLVE = SCIP_STAGE_EXITPRESOLVE * PRESOLVED = SCIP_STAGE_PRESOLVED # <<<<<<<<<<<<<< * INITSOLVE = SCIP_STAGE_INITSOLVE * SOLVING = SCIP_STAGE_SOLVING */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_PRESOLVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_PRESOLVED, __pyx_t_6) < 0) __PYX_ERR(3, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":113 * EXITPRESOLVE = SCIP_STAGE_EXITPRESOLVE * PRESOLVED = SCIP_STAGE_PRESOLVED * INITSOLVE = SCIP_STAGE_INITSOLVE # <<<<<<<<<<<<<< * SOLVING = SCIP_STAGE_SOLVING * SOLVED = SCIP_STAGE_SOLVED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_INITSOLVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_INITSOLVE, __pyx_t_6) < 0) __PYX_ERR(3, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":114 * PRESOLVED = SCIP_STAGE_PRESOLVED * INITSOLVE = SCIP_STAGE_INITSOLVE * SOLVING = SCIP_STAGE_SOLVING # <<<<<<<<<<<<<< * SOLVED = SCIP_STAGE_SOLVED * EXITSOLVE = SCIP_STAGE_EXITSOLVE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_SOLVING); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_SOLVING, __pyx_t_6) < 0) __PYX_ERR(3, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":115 * INITSOLVE = SCIP_STAGE_INITSOLVE * SOLVING = SCIP_STAGE_SOLVING * SOLVED = SCIP_STAGE_SOLVED # <<<<<<<<<<<<<< * EXITSOLVE = SCIP_STAGE_EXITSOLVE * FREETRANS = SCIP_STAGE_FREETRANS */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_SOLVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_SOLVED, __pyx_t_6) < 0) __PYX_ERR(3, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":116 * SOLVING = SCIP_STAGE_SOLVING * SOLVED = SCIP_STAGE_SOLVED * EXITSOLVE = SCIP_STAGE_EXITSOLVE # <<<<<<<<<<<<<< * FREETRANS = SCIP_STAGE_FREETRANS * FREE = SCIP_STAGE_FREE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_EXITSOLVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_EXITSOLVE, __pyx_t_6) < 0) __PYX_ERR(3, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":117 * SOLVED = SCIP_STAGE_SOLVED * EXITSOLVE = SCIP_STAGE_EXITSOLVE * FREETRANS = SCIP_STAGE_FREETRANS # <<<<<<<<<<<<<< * FREE = SCIP_STAGE_FREE * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_FREETRANS); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_FREETRANS, __pyx_t_6) < 0) __PYX_ERR(3, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":118 * EXITSOLVE = SCIP_STAGE_EXITSOLVE * FREETRANS = SCIP_STAGE_FREETRANS * FREE = SCIP_STAGE_FREE # <<<<<<<<<<<<<< * * cdef class PY_SCIP_NODETYPE: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE_FREE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE->tp_dict, __pyx_n_s_FREE, __pyx_t_6) < 0) __PYX_ERR(3, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_STAGE); /* "pyscipopt/scip.pyx":121 * * cdef class PY_SCIP_NODETYPE: * FOCUSNODE = SCIP_NODETYPE_FOCUSNODE # <<<<<<<<<<<<<< * PROBINGNODE = SCIP_NODETYPE_PROBINGNODE * SIBLING = SCIP_NODETYPE_SIBLING */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_FOCUSNODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_FOCUSNODE, __pyx_t_6) < 0) __PYX_ERR(3, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":122 * cdef class PY_SCIP_NODETYPE: * FOCUSNODE = SCIP_NODETYPE_FOCUSNODE * PROBINGNODE = SCIP_NODETYPE_PROBINGNODE # <<<<<<<<<<<<<< * SIBLING = SCIP_NODETYPE_SIBLING * CHILD = SCIP_NODETYPE_CHILD */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_PROBINGNODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_PROBINGNODE, __pyx_t_6) < 0) __PYX_ERR(3, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":123 * FOCUSNODE = SCIP_NODETYPE_FOCUSNODE * PROBINGNODE = SCIP_NODETYPE_PROBINGNODE * SIBLING = SCIP_NODETYPE_SIBLING # <<<<<<<<<<<<<< * CHILD = SCIP_NODETYPE_CHILD * LEAF = SCIP_NODETYPE_LEAF */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_SIBLING); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_SIBLING, __pyx_t_6) < 0) __PYX_ERR(3, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":124 * PROBINGNODE = SCIP_NODETYPE_PROBINGNODE * SIBLING = SCIP_NODETYPE_SIBLING * CHILD = SCIP_NODETYPE_CHILD # <<<<<<<<<<<<<< * LEAF = SCIP_NODETYPE_LEAF * DEADEND = SCIP_NODETYPE_DEADEND */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_CHILD); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_CHILD, __pyx_t_6) < 0) __PYX_ERR(3, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":125 * SIBLING = SCIP_NODETYPE_SIBLING * CHILD = SCIP_NODETYPE_CHILD * LEAF = SCIP_NODETYPE_LEAF # <<<<<<<<<<<<<< * DEADEND = SCIP_NODETYPE_DEADEND * JUNCTION = SCIP_NODETYPE_JUNCTION */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_LEAF); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_LEAF, __pyx_t_6) < 0) __PYX_ERR(3, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":126 * CHILD = SCIP_NODETYPE_CHILD * LEAF = SCIP_NODETYPE_LEAF * DEADEND = SCIP_NODETYPE_DEADEND # <<<<<<<<<<<<<< * JUNCTION = SCIP_NODETYPE_JUNCTION * PSEUDOFORK = SCIP_NODETYPE_PSEUDOFORK */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_DEADEND); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_DEADEND, __pyx_t_6) < 0) __PYX_ERR(3, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":127 * LEAF = SCIP_NODETYPE_LEAF * DEADEND = SCIP_NODETYPE_DEADEND * JUNCTION = SCIP_NODETYPE_JUNCTION # <<<<<<<<<<<<<< * PSEUDOFORK = SCIP_NODETYPE_PSEUDOFORK * FORK = SCIP_NODETYPE_FORK */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_JUNCTION); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_JUNCTION, __pyx_t_6) < 0) __PYX_ERR(3, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":128 * DEADEND = SCIP_NODETYPE_DEADEND * JUNCTION = SCIP_NODETYPE_JUNCTION * PSEUDOFORK = SCIP_NODETYPE_PSEUDOFORK # <<<<<<<<<<<<<< * FORK = SCIP_NODETYPE_FORK * SUBROOT = SCIP_NODETYPE_SUBROOT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_PSEUDOFORK); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_PSEUDOFORK, __pyx_t_6) < 0) __PYX_ERR(3, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":129 * JUNCTION = SCIP_NODETYPE_JUNCTION * PSEUDOFORK = SCIP_NODETYPE_PSEUDOFORK * FORK = SCIP_NODETYPE_FORK # <<<<<<<<<<<<<< * SUBROOT = SCIP_NODETYPE_SUBROOT * REFOCUSNODE = SCIP_NODETYPE_REFOCUSNODE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_FORK); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_FORK, __pyx_t_6) < 0) __PYX_ERR(3, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":130 * PSEUDOFORK = SCIP_NODETYPE_PSEUDOFORK * FORK = SCIP_NODETYPE_FORK * SUBROOT = SCIP_NODETYPE_SUBROOT # <<<<<<<<<<<<<< * REFOCUSNODE = SCIP_NODETYPE_REFOCUSNODE * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_SUBROOT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_SUBROOT, __pyx_t_6) < 0) __PYX_ERR(3, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":131 * FORK = SCIP_NODETYPE_FORK * SUBROOT = SCIP_NODETYPE_SUBROOT * REFOCUSNODE = SCIP_NODETYPE_REFOCUSNODE # <<<<<<<<<<<<<< * * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE_REFOCUSNODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE->tp_dict, __pyx_n_s_REFOCUSNODE, __pyx_t_6) < 0) __PYX_ERR(3, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_NODETYPE); /* "pyscipopt/scip.pyx":135 * * cdef class PY_SCIP_PROPTIMING: * BEFORELP = SCIP_PROPTIMING_BEFORELP # <<<<<<<<<<<<<< * DURINGLPLOOP = SCIP_PROPTIMING_DURINGLPLOOP * AFTERLPLOOP = SCIP_PROPTIMING_AFTERLPLOOP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PROPTIMING(SCIP_PROPTIMING_BEFORELP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING->tp_dict, __pyx_n_s_BEFORELP, __pyx_t_6) < 0) __PYX_ERR(3, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING); /* "pyscipopt/scip.pyx":136 * cdef class PY_SCIP_PROPTIMING: * BEFORELP = SCIP_PROPTIMING_BEFORELP * DURINGLPLOOP = SCIP_PROPTIMING_DURINGLPLOOP # <<<<<<<<<<<<<< * AFTERLPLOOP = SCIP_PROPTIMING_AFTERLPLOOP * AFTERLPNODE = SCIP_PROPTIMING_AFTERLPNODE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PROPTIMING(SCIP_PROPTIMING_DURINGLPLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING->tp_dict, __pyx_n_s_DURINGLPLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING); /* "pyscipopt/scip.pyx":137 * BEFORELP = SCIP_PROPTIMING_BEFORELP * DURINGLPLOOP = SCIP_PROPTIMING_DURINGLPLOOP * AFTERLPLOOP = SCIP_PROPTIMING_AFTERLPLOOP # <<<<<<<<<<<<<< * AFTERLPNODE = SCIP_PROPTIMING_AFTERLPNODE * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PROPTIMING(SCIP_PROPTIMING_AFTERLPLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING->tp_dict, __pyx_n_s_AFTERLPLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING); /* "pyscipopt/scip.pyx":138 * DURINGLPLOOP = SCIP_PROPTIMING_DURINGLPLOOP * AFTERLPLOOP = SCIP_PROPTIMING_AFTERLPLOOP * AFTERLPNODE = SCIP_PROPTIMING_AFTERLPNODE # <<<<<<<<<<<<<< * * cdef class PY_SCIP_PRESOLTIMING: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PROPTIMING(SCIP_PROPTIMING_AFTERLPNODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING->tp_dict, __pyx_n_s_AFTERLPNODE, __pyx_t_6) < 0) __PYX_ERR(3, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING); /* "pyscipopt/scip.pyx":141 * * cdef class PY_SCIP_PRESOLTIMING: * NONE = SCIP_PRESOLTIMING_NONE # <<<<<<<<<<<<<< * FAST = SCIP_PRESOLTIMING_FAST * MEDIUM = SCIP_PRESOLTIMING_MEDIUM */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING->tp_dict, __pyx_n_s_NONE, __pyx_t_6) < 0) __PYX_ERR(3, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING); /* "pyscipopt/scip.pyx":142 * cdef class PY_SCIP_PRESOLTIMING: * NONE = SCIP_PRESOLTIMING_NONE * FAST = SCIP_PRESOLTIMING_FAST # <<<<<<<<<<<<<< * MEDIUM = SCIP_PRESOLTIMING_MEDIUM * EXHAUSTIVE = SCIP_PRESOLTIMING_EXHAUSTIVE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING_FAST); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING->tp_dict, __pyx_n_s_FAST, __pyx_t_6) < 0) __PYX_ERR(3, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING); /* "pyscipopt/scip.pyx":143 * NONE = SCIP_PRESOLTIMING_NONE * FAST = SCIP_PRESOLTIMING_FAST * MEDIUM = SCIP_PRESOLTIMING_MEDIUM # <<<<<<<<<<<<<< * EXHAUSTIVE = SCIP_PRESOLTIMING_EXHAUSTIVE * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING_MEDIUM); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING->tp_dict, __pyx_n_s_MEDIUM, __pyx_t_6) < 0) __PYX_ERR(3, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING); /* "pyscipopt/scip.pyx":144 * FAST = SCIP_PRESOLTIMING_FAST * MEDIUM = SCIP_PRESOLTIMING_MEDIUM * EXHAUSTIVE = SCIP_PRESOLTIMING_EXHAUSTIVE # <<<<<<<<<<<<<< * * cdef class PY_SCIP_HEURTIMING: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING_EXHAUSTIVE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING->tp_dict, __pyx_n_s_EXHAUSTIVE, __pyx_t_6) < 0) __PYX_ERR(3, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING); /* "pyscipopt/scip.pyx":147 * * cdef class PY_SCIP_HEURTIMING: * BEFORENODE = SCIP_HEURTIMING_BEFORENODE # <<<<<<<<<<<<<< * DURINGLPLOOP = SCIP_HEURTIMING_DURINGLPLOOP * AFTERLPLOOP = SCIP_HEURTIMING_AFTERLPLOOP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_BEFORENODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_BEFORENODE, __pyx_t_6) < 0) __PYX_ERR(3, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":148 * cdef class PY_SCIP_HEURTIMING: * BEFORENODE = SCIP_HEURTIMING_BEFORENODE * DURINGLPLOOP = SCIP_HEURTIMING_DURINGLPLOOP # <<<<<<<<<<<<<< * AFTERLPLOOP = SCIP_HEURTIMING_AFTERLPLOOP * AFTERLPNODE = SCIP_HEURTIMING_AFTERLPNODE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_DURINGLPLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_DURINGLPLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":149 * BEFORENODE = SCIP_HEURTIMING_BEFORENODE * DURINGLPLOOP = SCIP_HEURTIMING_DURINGLPLOOP * AFTERLPLOOP = SCIP_HEURTIMING_AFTERLPLOOP # <<<<<<<<<<<<<< * AFTERLPNODE = SCIP_HEURTIMING_AFTERLPNODE * AFTERPSEUDONODE = SCIP_HEURTIMING_AFTERPSEUDONODE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_AFTERLPLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_AFTERLPLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":150 * DURINGLPLOOP = SCIP_HEURTIMING_DURINGLPLOOP * AFTERLPLOOP = SCIP_HEURTIMING_AFTERLPLOOP * AFTERLPNODE = SCIP_HEURTIMING_AFTERLPNODE # <<<<<<<<<<<<<< * AFTERPSEUDONODE = SCIP_HEURTIMING_AFTERPSEUDONODE * AFTERLPPLUNGE = SCIP_HEURTIMING_AFTERLPPLUNGE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_AFTERLPNODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_AFTERLPNODE, __pyx_t_6) < 0) __PYX_ERR(3, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":151 * AFTERLPLOOP = SCIP_HEURTIMING_AFTERLPLOOP * AFTERLPNODE = SCIP_HEURTIMING_AFTERLPNODE * AFTERPSEUDONODE = SCIP_HEURTIMING_AFTERPSEUDONODE # <<<<<<<<<<<<<< * AFTERLPPLUNGE = SCIP_HEURTIMING_AFTERLPPLUNGE * AFTERPSEUDOPLUNGE = SCIP_HEURTIMING_AFTERPSEUDOPLUNGE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_AFTERPSEUDONODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_AFTERPSEUDONODE, __pyx_t_6) < 0) __PYX_ERR(3, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":152 * AFTERLPNODE = SCIP_HEURTIMING_AFTERLPNODE * AFTERPSEUDONODE = SCIP_HEURTIMING_AFTERPSEUDONODE * AFTERLPPLUNGE = SCIP_HEURTIMING_AFTERLPPLUNGE # <<<<<<<<<<<<<< * AFTERPSEUDOPLUNGE = SCIP_HEURTIMING_AFTERPSEUDOPLUNGE * DURINGPRICINGLOOP = SCIP_HEURTIMING_DURINGPRICINGLOOP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_AFTERLPPLUNGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_AFTERLPPLUNGE, __pyx_t_6) < 0) __PYX_ERR(3, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":153 * AFTERPSEUDONODE = SCIP_HEURTIMING_AFTERPSEUDONODE * AFTERLPPLUNGE = SCIP_HEURTIMING_AFTERLPPLUNGE * AFTERPSEUDOPLUNGE = SCIP_HEURTIMING_AFTERPSEUDOPLUNGE # <<<<<<<<<<<<<< * DURINGPRICINGLOOP = SCIP_HEURTIMING_DURINGPRICINGLOOP * BEFOREPRESOL = SCIP_HEURTIMING_BEFOREPRESOL */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_AFTERPSEUDOPLUNGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_AFTERPSEUDOPLUNGE, __pyx_t_6) < 0) __PYX_ERR(3, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":154 * AFTERLPPLUNGE = SCIP_HEURTIMING_AFTERLPPLUNGE * AFTERPSEUDOPLUNGE = SCIP_HEURTIMING_AFTERPSEUDOPLUNGE * DURINGPRICINGLOOP = SCIP_HEURTIMING_DURINGPRICINGLOOP # <<<<<<<<<<<<<< * BEFOREPRESOL = SCIP_HEURTIMING_BEFOREPRESOL * DURINGPRESOLLOOP = SCIP_HEURTIMING_DURINGPRESOLLOOP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_DURINGPRICINGLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_DURINGPRICINGLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":155 * AFTERPSEUDOPLUNGE = SCIP_HEURTIMING_AFTERPSEUDOPLUNGE * DURINGPRICINGLOOP = SCIP_HEURTIMING_DURINGPRICINGLOOP * BEFOREPRESOL = SCIP_HEURTIMING_BEFOREPRESOL # <<<<<<<<<<<<<< * DURINGPRESOLLOOP = SCIP_HEURTIMING_DURINGPRESOLLOOP * AFTERPROPLOOP = SCIP_HEURTIMING_AFTERPROPLOOP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_BEFOREPRESOL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_BEFOREPRESOL, __pyx_t_6) < 0) __PYX_ERR(3, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":156 * DURINGPRICINGLOOP = SCIP_HEURTIMING_DURINGPRICINGLOOP * BEFOREPRESOL = SCIP_HEURTIMING_BEFOREPRESOL * DURINGPRESOLLOOP = SCIP_HEURTIMING_DURINGPRESOLLOOP # <<<<<<<<<<<<<< * AFTERPROPLOOP = SCIP_HEURTIMING_AFTERPROPLOOP * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_DURINGPRESOLLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_DURINGPRESOLLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":157 * BEFOREPRESOL = SCIP_HEURTIMING_BEFOREPRESOL * DURINGPRESOLLOOP = SCIP_HEURTIMING_DURINGPRESOLLOOP * AFTERPROPLOOP = SCIP_HEURTIMING_AFTERPROPLOOP # <<<<<<<<<<<<<< * * cdef class PY_SCIP_EVENTTYPE: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_AFTERPROPLOOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING->tp_dict, __pyx_n_s_AFTERPROPLOOP, __pyx_t_6) < 0) __PYX_ERR(3, 157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_HEURTIMING); /* "pyscipopt/scip.pyx":160 * * cdef class PY_SCIP_EVENTTYPE: * DISABLED = SCIP_EVENTTYPE_DISABLED # <<<<<<<<<<<<<< * VARADDED = SCIP_EVENTTYPE_VARADDED * VARDELETED = SCIP_EVENTTYPE_VARDELETED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_DISABLED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_DISABLED, __pyx_t_6) < 0) __PYX_ERR(3, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":161 * cdef class PY_SCIP_EVENTTYPE: * DISABLED = SCIP_EVENTTYPE_DISABLED * VARADDED = SCIP_EVENTTYPE_VARADDED # <<<<<<<<<<<<<< * VARDELETED = SCIP_EVENTTYPE_VARDELETED * VARFIXED = SCIP_EVENTTYPE_VARFIXED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_VARADDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_VARADDED, __pyx_t_6) < 0) __PYX_ERR(3, 161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":162 * DISABLED = SCIP_EVENTTYPE_DISABLED * VARADDED = SCIP_EVENTTYPE_VARADDED * VARDELETED = SCIP_EVENTTYPE_VARDELETED # <<<<<<<<<<<<<< * VARFIXED = SCIP_EVENTTYPE_VARFIXED * VARUNLOCKED = SCIP_EVENTTYPE_VARUNLOCKED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_VARDELETED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_VARDELETED, __pyx_t_6) < 0) __PYX_ERR(3, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":163 * VARADDED = SCIP_EVENTTYPE_VARADDED * VARDELETED = SCIP_EVENTTYPE_VARDELETED * VARFIXED = SCIP_EVENTTYPE_VARFIXED # <<<<<<<<<<<<<< * VARUNLOCKED = SCIP_EVENTTYPE_VARUNLOCKED * OBJCHANGED = SCIP_EVENTTYPE_OBJCHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_VARFIXED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_VARFIXED, __pyx_t_6) < 0) __PYX_ERR(3, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":164 * VARDELETED = SCIP_EVENTTYPE_VARDELETED * VARFIXED = SCIP_EVENTTYPE_VARFIXED * VARUNLOCKED = SCIP_EVENTTYPE_VARUNLOCKED # <<<<<<<<<<<<<< * OBJCHANGED = SCIP_EVENTTYPE_OBJCHANGED * GLBCHANGED = SCIP_EVENTTYPE_GLBCHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_VARUNLOCKED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_VARUNLOCKED, __pyx_t_6) < 0) __PYX_ERR(3, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":165 * VARFIXED = SCIP_EVENTTYPE_VARFIXED * VARUNLOCKED = SCIP_EVENTTYPE_VARUNLOCKED * OBJCHANGED = SCIP_EVENTTYPE_OBJCHANGED # <<<<<<<<<<<<<< * GLBCHANGED = SCIP_EVENTTYPE_GLBCHANGED * GUBCHANGED = SCIP_EVENTTYPE_GUBCHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_OBJCHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_OBJCHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":166 * VARUNLOCKED = SCIP_EVENTTYPE_VARUNLOCKED * OBJCHANGED = SCIP_EVENTTYPE_OBJCHANGED * GLBCHANGED = SCIP_EVENTTYPE_GLBCHANGED # <<<<<<<<<<<<<< * GUBCHANGED = SCIP_EVENTTYPE_GUBCHANGED * LBTIGHTENED = SCIP_EVENTTYPE_LBTIGHTENED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_GLBCHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_GLBCHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":167 * OBJCHANGED = SCIP_EVENTTYPE_OBJCHANGED * GLBCHANGED = SCIP_EVENTTYPE_GLBCHANGED * GUBCHANGED = SCIP_EVENTTYPE_GUBCHANGED # <<<<<<<<<<<<<< * LBTIGHTENED = SCIP_EVENTTYPE_LBTIGHTENED * LBRELAXED = SCIP_EVENTTYPE_LBRELAXED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_GUBCHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_GUBCHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":168 * GLBCHANGED = SCIP_EVENTTYPE_GLBCHANGED * GUBCHANGED = SCIP_EVENTTYPE_GUBCHANGED * LBTIGHTENED = SCIP_EVENTTYPE_LBTIGHTENED # <<<<<<<<<<<<<< * LBRELAXED = SCIP_EVENTTYPE_LBRELAXED * UBTIGHTENED = SCIP_EVENTTYPE_UBTIGHTENED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_LBTIGHTENED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_LBTIGHTENED, __pyx_t_6) < 0) __PYX_ERR(3, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":169 * GUBCHANGED = SCIP_EVENTTYPE_GUBCHANGED * LBTIGHTENED = SCIP_EVENTTYPE_LBTIGHTENED * LBRELAXED = SCIP_EVENTTYPE_LBRELAXED # <<<<<<<<<<<<<< * UBTIGHTENED = SCIP_EVENTTYPE_UBTIGHTENED * UBRELAXED = SCIP_EVENTTYPE_UBRELAXED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_LBRELAXED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_LBRELAXED, __pyx_t_6) < 0) __PYX_ERR(3, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":170 * LBTIGHTENED = SCIP_EVENTTYPE_LBTIGHTENED * LBRELAXED = SCIP_EVENTTYPE_LBRELAXED * UBTIGHTENED = SCIP_EVENTTYPE_UBTIGHTENED # <<<<<<<<<<<<<< * UBRELAXED = SCIP_EVENTTYPE_UBRELAXED * GHOLEADDED = SCIP_EVENTTYPE_GHOLEADDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_UBTIGHTENED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_UBTIGHTENED, __pyx_t_6) < 0) __PYX_ERR(3, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":171 * LBRELAXED = SCIP_EVENTTYPE_LBRELAXED * UBTIGHTENED = SCIP_EVENTTYPE_UBTIGHTENED * UBRELAXED = SCIP_EVENTTYPE_UBRELAXED # <<<<<<<<<<<<<< * GHOLEADDED = SCIP_EVENTTYPE_GHOLEADDED * GHOLEREMOVED = SCIP_EVENTTYPE_GHOLEREMOVED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_UBRELAXED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_UBRELAXED, __pyx_t_6) < 0) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":172 * UBTIGHTENED = SCIP_EVENTTYPE_UBTIGHTENED * UBRELAXED = SCIP_EVENTTYPE_UBRELAXED * GHOLEADDED = SCIP_EVENTTYPE_GHOLEADDED # <<<<<<<<<<<<<< * GHOLEREMOVED = SCIP_EVENTTYPE_GHOLEREMOVED * LHOLEADDED = SCIP_EVENTTYPE_LHOLEADDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_GHOLEADDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_GHOLEADDED, __pyx_t_6) < 0) __PYX_ERR(3, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":173 * UBRELAXED = SCIP_EVENTTYPE_UBRELAXED * GHOLEADDED = SCIP_EVENTTYPE_GHOLEADDED * GHOLEREMOVED = SCIP_EVENTTYPE_GHOLEREMOVED # <<<<<<<<<<<<<< * LHOLEADDED = SCIP_EVENTTYPE_LHOLEADDED * LHOLEREMOVED = SCIP_EVENTTYPE_LHOLEREMOVED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_GHOLEREMOVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_GHOLEREMOVED, __pyx_t_6) < 0) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":174 * GHOLEADDED = SCIP_EVENTTYPE_GHOLEADDED * GHOLEREMOVED = SCIP_EVENTTYPE_GHOLEREMOVED * LHOLEADDED = SCIP_EVENTTYPE_LHOLEADDED # <<<<<<<<<<<<<< * LHOLEREMOVED = SCIP_EVENTTYPE_LHOLEREMOVED * IMPLADDED = SCIP_EVENTTYPE_IMPLADDED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_LHOLEADDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_LHOLEADDED, __pyx_t_6) < 0) __PYX_ERR(3, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":175 * GHOLEREMOVED = SCIP_EVENTTYPE_GHOLEREMOVED * LHOLEADDED = SCIP_EVENTTYPE_LHOLEADDED * LHOLEREMOVED = SCIP_EVENTTYPE_LHOLEREMOVED # <<<<<<<<<<<<<< * IMPLADDED = SCIP_EVENTTYPE_IMPLADDED * PRESOLVEROUND = SCIP_EVENTTYPE_PRESOLVEROUND */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_LHOLEREMOVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_LHOLEREMOVED, __pyx_t_6) < 0) __PYX_ERR(3, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":176 * LHOLEADDED = SCIP_EVENTTYPE_LHOLEADDED * LHOLEREMOVED = SCIP_EVENTTYPE_LHOLEREMOVED * IMPLADDED = SCIP_EVENTTYPE_IMPLADDED # <<<<<<<<<<<<<< * PRESOLVEROUND = SCIP_EVENTTYPE_PRESOLVEROUND * NODEFOCUSED = SCIP_EVENTTYPE_NODEFOCUSED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_IMPLADDED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_IMPLADDED, __pyx_t_6) < 0) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":177 * LHOLEREMOVED = SCIP_EVENTTYPE_LHOLEREMOVED * IMPLADDED = SCIP_EVENTTYPE_IMPLADDED * PRESOLVEROUND = SCIP_EVENTTYPE_PRESOLVEROUND # <<<<<<<<<<<<<< * NODEFOCUSED = SCIP_EVENTTYPE_NODEFOCUSED * NODEFEASIBLE = SCIP_EVENTTYPE_NODEFEASIBLE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_PRESOLVEROUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_PRESOLVEROUND, __pyx_t_6) < 0) __PYX_ERR(3, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":178 * IMPLADDED = SCIP_EVENTTYPE_IMPLADDED * PRESOLVEROUND = SCIP_EVENTTYPE_PRESOLVEROUND * NODEFOCUSED = SCIP_EVENTTYPE_NODEFOCUSED # <<<<<<<<<<<<<< * NODEFEASIBLE = SCIP_EVENTTYPE_NODEFEASIBLE * NODEINFEASIBLE = SCIP_EVENTTYPE_NODEINFEASIBLE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_NODEFOCUSED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_NODEFOCUSED, __pyx_t_6) < 0) __PYX_ERR(3, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":179 * PRESOLVEROUND = SCIP_EVENTTYPE_PRESOLVEROUND * NODEFOCUSED = SCIP_EVENTTYPE_NODEFOCUSED * NODEFEASIBLE = SCIP_EVENTTYPE_NODEFEASIBLE # <<<<<<<<<<<<<< * NODEINFEASIBLE = SCIP_EVENTTYPE_NODEINFEASIBLE * NODEBRANCHED = SCIP_EVENTTYPE_NODEBRANCHED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_NODEFEASIBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_NODEFEASIBLE, __pyx_t_6) < 0) __PYX_ERR(3, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":180 * NODEFOCUSED = SCIP_EVENTTYPE_NODEFOCUSED * NODEFEASIBLE = SCIP_EVENTTYPE_NODEFEASIBLE * NODEINFEASIBLE = SCIP_EVENTTYPE_NODEINFEASIBLE # <<<<<<<<<<<<<< * NODEBRANCHED = SCIP_EVENTTYPE_NODEBRANCHED * FIRSTLPSOLVED = SCIP_EVENTTYPE_FIRSTLPSOLVED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_NODEINFEASIBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_NODEINFEASIBLE, __pyx_t_6) < 0) __PYX_ERR(3, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":181 * NODEFEASIBLE = SCIP_EVENTTYPE_NODEFEASIBLE * NODEINFEASIBLE = SCIP_EVENTTYPE_NODEINFEASIBLE * NODEBRANCHED = SCIP_EVENTTYPE_NODEBRANCHED # <<<<<<<<<<<<<< * FIRSTLPSOLVED = SCIP_EVENTTYPE_FIRSTLPSOLVED * LPSOLVED = SCIP_EVENTTYPE_LPSOLVED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_NODEBRANCHED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_NODEBRANCHED, __pyx_t_6) < 0) __PYX_ERR(3, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":182 * NODEINFEASIBLE = SCIP_EVENTTYPE_NODEINFEASIBLE * NODEBRANCHED = SCIP_EVENTTYPE_NODEBRANCHED * FIRSTLPSOLVED = SCIP_EVENTTYPE_FIRSTLPSOLVED # <<<<<<<<<<<<<< * LPSOLVED = SCIP_EVENTTYPE_LPSOLVED * LPEVENT = SCIP_EVENTTYPE_LPEVENT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_FIRSTLPSOLVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_FIRSTLPSOLVED, __pyx_t_6) < 0) __PYX_ERR(3, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":183 * NODEBRANCHED = SCIP_EVENTTYPE_NODEBRANCHED * FIRSTLPSOLVED = SCIP_EVENTTYPE_FIRSTLPSOLVED * LPSOLVED = SCIP_EVENTTYPE_LPSOLVED # <<<<<<<<<<<<<< * LPEVENT = SCIP_EVENTTYPE_LPEVENT * POORSOLFOUND = SCIP_EVENTTYPE_POORSOLFOUND */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_LPSOLVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_LPSOLVED, __pyx_t_6) < 0) __PYX_ERR(3, 183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":184 * FIRSTLPSOLVED = SCIP_EVENTTYPE_FIRSTLPSOLVED * LPSOLVED = SCIP_EVENTTYPE_LPSOLVED * LPEVENT = SCIP_EVENTTYPE_LPEVENT # <<<<<<<<<<<<<< * POORSOLFOUND = SCIP_EVENTTYPE_POORSOLFOUND * BESTSOLFOUND = SCIP_EVENTTYPE_BESTSOLFOUND */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_LPEVENT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_LPEVENT, __pyx_t_6) < 0) __PYX_ERR(3, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":185 * LPSOLVED = SCIP_EVENTTYPE_LPSOLVED * LPEVENT = SCIP_EVENTTYPE_LPEVENT * POORSOLFOUND = SCIP_EVENTTYPE_POORSOLFOUND # <<<<<<<<<<<<<< * BESTSOLFOUND = SCIP_EVENTTYPE_BESTSOLFOUND * ROWADDEDSEPA = SCIP_EVENTTYPE_ROWADDEDSEPA */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_POORSOLFOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_POORSOLFOUND, __pyx_t_6) < 0) __PYX_ERR(3, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":186 * LPEVENT = SCIP_EVENTTYPE_LPEVENT * POORSOLFOUND = SCIP_EVENTTYPE_POORSOLFOUND * BESTSOLFOUND = SCIP_EVENTTYPE_BESTSOLFOUND # <<<<<<<<<<<<<< * ROWADDEDSEPA = SCIP_EVENTTYPE_ROWADDEDSEPA * ROWDELETEDSEPA = SCIP_EVENTTYPE_ROWDELETEDSEPA */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_BESTSOLFOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_BESTSOLFOUND, __pyx_t_6) < 0) __PYX_ERR(3, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":187 * POORSOLFOUND = SCIP_EVENTTYPE_POORSOLFOUND * BESTSOLFOUND = SCIP_EVENTTYPE_BESTSOLFOUND * ROWADDEDSEPA = SCIP_EVENTTYPE_ROWADDEDSEPA # <<<<<<<<<<<<<< * ROWDELETEDSEPA = SCIP_EVENTTYPE_ROWDELETEDSEPA * ROWADDEDLP = SCIP_EVENTTYPE_ROWADDEDLP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWADDEDSEPA); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWADDEDSEPA, __pyx_t_6) < 0) __PYX_ERR(3, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":188 * BESTSOLFOUND = SCIP_EVENTTYPE_BESTSOLFOUND * ROWADDEDSEPA = SCIP_EVENTTYPE_ROWADDEDSEPA * ROWDELETEDSEPA = SCIP_EVENTTYPE_ROWDELETEDSEPA # <<<<<<<<<<<<<< * ROWADDEDLP = SCIP_EVENTTYPE_ROWADDEDLP * ROWDELETEDLP = SCIP_EVENTTYPE_ROWDELETEDLP */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWDELETEDSEPA); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWDELETEDSEPA, __pyx_t_6) < 0) __PYX_ERR(3, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":189 * ROWADDEDSEPA = SCIP_EVENTTYPE_ROWADDEDSEPA * ROWDELETEDSEPA = SCIP_EVENTTYPE_ROWDELETEDSEPA * ROWADDEDLP = SCIP_EVENTTYPE_ROWADDEDLP # <<<<<<<<<<<<<< * ROWDELETEDLP = SCIP_EVENTTYPE_ROWDELETEDLP * ROWCOEFCHANGED = SCIP_EVENTTYPE_ROWCOEFCHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWADDEDLP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWADDEDLP, __pyx_t_6) < 0) __PYX_ERR(3, 189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":190 * ROWDELETEDSEPA = SCIP_EVENTTYPE_ROWDELETEDSEPA * ROWADDEDLP = SCIP_EVENTTYPE_ROWADDEDLP * ROWDELETEDLP = SCIP_EVENTTYPE_ROWDELETEDLP # <<<<<<<<<<<<<< * ROWCOEFCHANGED = SCIP_EVENTTYPE_ROWCOEFCHANGED * ROWCONSTCHANGED = SCIP_EVENTTYPE_ROWCONSTCHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWDELETEDLP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWDELETEDLP, __pyx_t_6) < 0) __PYX_ERR(3, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":191 * ROWADDEDLP = SCIP_EVENTTYPE_ROWADDEDLP * ROWDELETEDLP = SCIP_EVENTTYPE_ROWDELETEDLP * ROWCOEFCHANGED = SCIP_EVENTTYPE_ROWCOEFCHANGED # <<<<<<<<<<<<<< * ROWCONSTCHANGED = SCIP_EVENTTYPE_ROWCONSTCHANGED * ROWSIDECHANGED = SCIP_EVENTTYPE_ROWSIDECHANGED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWCOEFCHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWCOEFCHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":192 * ROWDELETEDLP = SCIP_EVENTTYPE_ROWDELETEDLP * ROWCOEFCHANGED = SCIP_EVENTTYPE_ROWCOEFCHANGED * ROWCONSTCHANGED = SCIP_EVENTTYPE_ROWCONSTCHANGED # <<<<<<<<<<<<<< * ROWSIDECHANGED = SCIP_EVENTTYPE_ROWSIDECHANGED * SYNC = SCIP_EVENTTYPE_SYNC */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWCONSTCHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWCONSTCHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":193 * ROWCOEFCHANGED = SCIP_EVENTTYPE_ROWCOEFCHANGED * ROWCONSTCHANGED = SCIP_EVENTTYPE_ROWCONSTCHANGED * ROWSIDECHANGED = SCIP_EVENTTYPE_ROWSIDECHANGED # <<<<<<<<<<<<<< * SYNC = SCIP_EVENTTYPE_SYNC * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_ROWSIDECHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_ROWSIDECHANGED, __pyx_t_6) < 0) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":194 * ROWCONSTCHANGED = SCIP_EVENTTYPE_ROWCONSTCHANGED * ROWSIDECHANGED = SCIP_EVENTTYPE_ROWSIDECHANGED * SYNC = SCIP_EVENTTYPE_SYNC # <<<<<<<<<<<<<< * * cdef class PY_SCIP_LPSOLSTAT: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE_SYNC); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE->tp_dict, __pyx_n_s_SYNC, __pyx_t_6) < 0) __PYX_ERR(3, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_EVENTTYPE); /* "pyscipopt/scip.pyx":197 * * cdef class PY_SCIP_LPSOLSTAT: * NOTSOLVED = SCIP_LPSOLSTAT_NOTSOLVED # <<<<<<<<<<<<<< * OPTIMAL = SCIP_LPSOLSTAT_OPTIMAL * INFEASIBLE = SCIP_LPSOLSTAT_INFEASIBLE */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_NOTSOLVED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_NOTSOLVED, __pyx_t_6) < 0) __PYX_ERR(3, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":198 * cdef class PY_SCIP_LPSOLSTAT: * NOTSOLVED = SCIP_LPSOLSTAT_NOTSOLVED * OPTIMAL = SCIP_LPSOLSTAT_OPTIMAL # <<<<<<<<<<<<<< * INFEASIBLE = SCIP_LPSOLSTAT_INFEASIBLE * UNBOUNDEDRAY = SCIP_LPSOLSTAT_UNBOUNDEDRAY */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_OPTIMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_OPTIMAL, __pyx_t_6) < 0) __PYX_ERR(3, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":199 * NOTSOLVED = SCIP_LPSOLSTAT_NOTSOLVED * OPTIMAL = SCIP_LPSOLSTAT_OPTIMAL * INFEASIBLE = SCIP_LPSOLSTAT_INFEASIBLE # <<<<<<<<<<<<<< * UNBOUNDEDRAY = SCIP_LPSOLSTAT_UNBOUNDEDRAY * OBJLIMIT = SCIP_LPSOLSTAT_OBJLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_INFEASIBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_INFEASIBLE, __pyx_t_6) < 0) __PYX_ERR(3, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":200 * OPTIMAL = SCIP_LPSOLSTAT_OPTIMAL * INFEASIBLE = SCIP_LPSOLSTAT_INFEASIBLE * UNBOUNDEDRAY = SCIP_LPSOLSTAT_UNBOUNDEDRAY # <<<<<<<<<<<<<< * OBJLIMIT = SCIP_LPSOLSTAT_OBJLIMIT * ITERLIMIT = SCIP_LPSOLSTAT_ITERLIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_UNBOUNDEDRAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_UNBOUNDEDRAY, __pyx_t_6) < 0) __PYX_ERR(3, 200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":201 * INFEASIBLE = SCIP_LPSOLSTAT_INFEASIBLE * UNBOUNDEDRAY = SCIP_LPSOLSTAT_UNBOUNDEDRAY * OBJLIMIT = SCIP_LPSOLSTAT_OBJLIMIT # <<<<<<<<<<<<<< * ITERLIMIT = SCIP_LPSOLSTAT_ITERLIMIT * TIMELIMIT = SCIP_LPSOLSTAT_TIMELIMIT */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_OBJLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_OBJLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":202 * UNBOUNDEDRAY = SCIP_LPSOLSTAT_UNBOUNDEDRAY * OBJLIMIT = SCIP_LPSOLSTAT_OBJLIMIT * ITERLIMIT = SCIP_LPSOLSTAT_ITERLIMIT # <<<<<<<<<<<<<< * TIMELIMIT = SCIP_LPSOLSTAT_TIMELIMIT * ERROR = SCIP_LPSOLSTAT_ERROR */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_ITERLIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_ITERLIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":203 * OBJLIMIT = SCIP_LPSOLSTAT_OBJLIMIT * ITERLIMIT = SCIP_LPSOLSTAT_ITERLIMIT * TIMELIMIT = SCIP_LPSOLSTAT_TIMELIMIT # <<<<<<<<<<<<<< * ERROR = SCIP_LPSOLSTAT_ERROR * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_TIMELIMIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_TIMELIMIT, __pyx_t_6) < 0) __PYX_ERR(3, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":204 * ITERLIMIT = SCIP_LPSOLSTAT_ITERLIMIT * TIMELIMIT = SCIP_LPSOLSTAT_TIMELIMIT * ERROR = SCIP_LPSOLSTAT_ERROR # <<<<<<<<<<<<<< * * cdef class PY_SCIP_BRANCHDIR: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT->tp_dict, __pyx_n_s_ERROR, __pyx_t_6) < 0) __PYX_ERR(3, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_LPSOLSTAT); /* "pyscipopt/scip.pyx":207 * * cdef class PY_SCIP_BRANCHDIR: * DOWNWARDS = SCIP_BRANCHDIR_DOWNWARDS # <<<<<<<<<<<<<< * UPWARDS = SCIP_BRANCHDIR_UPWARDS * FIXED = SCIP_BRANCHDIR_FIXED */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BRANCHDIR(SCIP_BRANCHDIR_DOWNWARDS); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR->tp_dict, __pyx_n_s_DOWNWARDS, __pyx_t_6) < 0) __PYX_ERR(3, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR); /* "pyscipopt/scip.pyx":208 * cdef class PY_SCIP_BRANCHDIR: * DOWNWARDS = SCIP_BRANCHDIR_DOWNWARDS * UPWARDS = SCIP_BRANCHDIR_UPWARDS # <<<<<<<<<<<<<< * FIXED = SCIP_BRANCHDIR_FIXED * AUTO = SCIP_BRANCHDIR_AUTO */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BRANCHDIR(SCIP_BRANCHDIR_UPWARDS); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR->tp_dict, __pyx_n_s_UPWARDS, __pyx_t_6) < 0) __PYX_ERR(3, 208, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR); /* "pyscipopt/scip.pyx":209 * DOWNWARDS = SCIP_BRANCHDIR_DOWNWARDS * UPWARDS = SCIP_BRANCHDIR_UPWARDS * FIXED = SCIP_BRANCHDIR_FIXED # <<<<<<<<<<<<<< * AUTO = SCIP_BRANCHDIR_AUTO * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BRANCHDIR(SCIP_BRANCHDIR_FIXED); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR->tp_dict, __pyx_n_s_FIXED, __pyx_t_6) < 0) __PYX_ERR(3, 209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR); /* "pyscipopt/scip.pyx":210 * UPWARDS = SCIP_BRANCHDIR_UPWARDS * FIXED = SCIP_BRANCHDIR_FIXED * AUTO = SCIP_BRANCHDIR_AUTO # <<<<<<<<<<<<<< * * cdef class PY_SCIP_BENDERSENFOTYPE: */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BRANCHDIR(SCIP_BRANCHDIR_AUTO); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR->tp_dict, __pyx_n_s_AUTO, __pyx_t_6) < 0) __PYX_ERR(3, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BRANCHDIR); /* "pyscipopt/scip.pyx":213 * * cdef class PY_SCIP_BENDERSENFOTYPE: * LP = SCIP_BENDERSENFOTYPE_LP # <<<<<<<<<<<<<< * RELAX = SCIP_BENDERSENFOTYPE_RELAX * PSEUDO = SCIP_BENDERSENFOTYPE_PSEUDO */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(SCIP_BENDERSENFOTYPE_LP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE->tp_dict, __pyx_n_s_LP, __pyx_t_6) < 0) __PYX_ERR(3, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE); /* "pyscipopt/scip.pyx":214 * cdef class PY_SCIP_BENDERSENFOTYPE: * LP = SCIP_BENDERSENFOTYPE_LP * RELAX = SCIP_BENDERSENFOTYPE_RELAX # <<<<<<<<<<<<<< * PSEUDO = SCIP_BENDERSENFOTYPE_PSEUDO * CHECK = SCIP_BENDERSENFOTYPE_CHECK */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(SCIP_BENDERSENFOTYPE_RELAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE->tp_dict, __pyx_n_s_RELAX, __pyx_t_6) < 0) __PYX_ERR(3, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE); /* "pyscipopt/scip.pyx":215 * LP = SCIP_BENDERSENFOTYPE_LP * RELAX = SCIP_BENDERSENFOTYPE_RELAX * PSEUDO = SCIP_BENDERSENFOTYPE_PSEUDO # <<<<<<<<<<<<<< * CHECK = SCIP_BENDERSENFOTYPE_CHECK * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(SCIP_BENDERSENFOTYPE_PSEUDO); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE->tp_dict, __pyx_n_s_PSEUDO, __pyx_t_6) < 0) __PYX_ERR(3, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE); /* "pyscipopt/scip.pyx":216 * RELAX = SCIP_BENDERSENFOTYPE_RELAX * PSEUDO = SCIP_BENDERSENFOTYPE_PSEUDO * CHECK = SCIP_BENDERSENFOTYPE_CHECK # <<<<<<<<<<<<<< * * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(SCIP_BENDERSENFOTYPE_CHECK); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE->tp_dict, __pyx_n_s_CHECK, __pyx_t_6) < 0) __PYX_ERR(3, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_9pyscipopt_4scip_PY_SCIP_BENDERSENFOTYPE); /* "pyscipopt/scip.pyx":219 * * * def PY_SCIP_CALL(SCIP_RETCODE rc): # <<<<<<<<<<<<<< * if rc == SCIP_OKAY: * pass */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_23PY_SCIP_CALL, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PY_SCIP_CALL, __pyx_t_6) < 0) __PYX_ERR(3, 219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2780 * eagerfreq=100, maxprerounds=-1, delaysepa=False, * delayprop=False, needscons=True, * proptiming=PY_SCIP_PROPTIMING.BEFORELP, # <<<<<<<<<<<<<< * presoltiming=PY_SCIP_PRESOLTIMING.MEDIUM): * """Include a constraint handler */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PROPTIMING), __pyx_n_s_BEFORELP); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_k__90 = __pyx_t_6; __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2781 * delayprop=False, needscons=True, * proptiming=PY_SCIP_PROPTIMING.BEFORELP, * presoltiming=PY_SCIP_PRESOLTIMING.MEDIUM): # <<<<<<<<<<<<<< * """Include a constraint handler * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9pyscipopt_4scip_PY_SCIP_PRESOLTIMING), __pyx_n_s_MEDIUM); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_k__91 = __pyx_t_6; __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2842 * return constraint * * def includePresol(self, Presol presol, name, desc, priority, maxrounds, timing=SCIP_PRESOLTIMING_FAST): # <<<<<<<<<<<<<< * """Include a presolver * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING_FAST); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_k__92 = __pyx_t_6; __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2882 * * def includeProp(self, Prop prop, name, desc, presolpriority, presolmaxrounds, * proptiming, presoltiming=SCIP_PRESOLTIMING_FAST, priority=1, freq=1, delay=True): # <<<<<<<<<<<<<< * """Include a propagator. * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING_FAST); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_k__93 = __pyx_t_6; __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":2910 * * def includeHeur(self, Heur heur, name, desc, dispchar, priority=10000, freq=1, freqofs=0, * maxdepth=-1, timingmask=SCIP_HEURTIMING_BEFORENODE, usessubscip=False): # <<<<<<<<<<<<<< * """Include a primal heuristic. * */ __pyx_t_6 = __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING_BEFORENODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_k__94 = __pyx_t_6; __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":5841 * * # debugging memory management * def is_memory_freed(): # <<<<<<<<<<<<<< * return BMSgetMemoryUsed() == 0 * */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_25is_memory_freed, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_memory_freed, __pyx_t_6) < 0) __PYX_ERR(3, 5841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":5844 * return BMSgetMemoryUsed() == 0 * * def print_memory_in_use(): # <<<<<<<<<<<<<< * BMScheckEmptyMemory() * */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_27print_memory_in_use, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_print_memory_in_use, __pyx_t_6) < 0) __PYX_ERR(3, 5844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Expr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_29__pyx_unpickle_Expr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Expr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Expr__set_state(<Expr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Expr__set_state(Expr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.terms = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_31__pyx_unpickle_ExprCons, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ExprCons, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_GenExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_33__pyx_unpickle_GenExpr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_GenExpr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_GenExpr__set_state(<GenExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_GenExpr__set_state(GenExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.operatorIndex = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_35__pyx_unpickle_SumExpr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SumExpr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_ProdExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_37__pyx_unpickle_ProdExpr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ProdExpr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_ProdExpr__set_state(<ProdExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ProdExpr__set_state(ProdExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.constant = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_39__pyx_unpickle_VarExpr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VarExpr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PowExpr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_41__pyx_unpickle_PowExpr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PowExpr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PowExpr__set_state(<PowExpr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PowExpr__set_state(PowExpr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.expo = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_43__pyx_unpickle_UnaryExpr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_UnaryExpr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Constant(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_45__pyx_unpickle_Constant, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Constant, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Constant__set_state(<Constant> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Constant__set_state(Constant __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result._op = __pyx_state[0]; __pyx_result.children = __pyx_state[1]; __pyx_result.number = __pyx_state[2]; __pyx_result.operatorIndex = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_47__pyx_unpickle_Benders, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Benders, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Benderscut(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_49__pyx_unpickle_Benderscut, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Benderscut, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Benderscut__set_state(<Benderscut> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Benderscut__set_state(Benderscut __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.benders = __pyx_state[0]; __pyx_result.model = __pyx_state[1]; __pyx_result.name = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_51__pyx_unpickle_Branchrule, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Branchrule, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Conshdlr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_53__pyx_unpickle_Conshdlr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Conshdlr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Conshdlr__set_state(<Conshdlr> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Conshdlr__set_state(Conshdlr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_55__pyx_unpickle_Eventhdlr, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Eventhdlr, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Heur(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_57__pyx_unpickle_Heur, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Heur, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Heur__set_state(<Heur> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Heur__set_state(Heur __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_59__pyx_unpickle_Presol, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Presol, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Pricer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_61__pyx_unpickle_Pricer, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Pricer, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Pricer__set_state(<Pricer> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Pricer__set_state(Pricer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_63__pyx_unpickle_Prop, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Prop, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Sepa(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_65__pyx_unpickle_Sepa, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Sepa, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Sepa__set_state(<Sepa> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Sepa__set_state(Sepa __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0]; __pyx_result.name = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_67__pyx_unpickle_Relax, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Relax, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_Nodesel(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_69__pyx_unpickle_Nodesel, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Nodesel, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Nodesel__set_state(<Nodesel> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Nodesel__set_state(Nodesel __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.model = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_73__pyx_unpickle_PY_SCIP_RESULT, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_RESULT, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PARAMSETTING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_75__pyx_unpickle_PY_SCIP_PARAMSETTING, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMSETT, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(<PY_SCIP_PARAMSETTING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PARAMSETTING__set_state(PY_SCIP_PARAMSETTING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_77__pyx_unpickle_PY_SCIP_PARAMEMPHASIS, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_PARAMEMPH, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_STATUS(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_79__pyx_unpickle_PY_SCIP_STATUS, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_STATUS, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_STATUS__set_state(<PY_SCIP_STATUS> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_STATUS__set_state(PY_SCIP_STATUS __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_81__pyx_unpickle_PY_SCIP_STAGE, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_STAGE, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_NODETYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_83__pyx_unpickle_PY_SCIP_NODETYPE, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_NODETYPE, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_NODETYPE__set_state(<PY_SCIP_NODETYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_NODETYPE__set_state(PY_SCIP_NODETYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_85__pyx_unpickle_PY_SCIP_PROPTIMING, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_PROPTIMIN, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_PRESOLTIMING(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_87__pyx_unpickle_PY_SCIP_PRESOLTIMING, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_PRESOLTIM, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(<PY_SCIP_PRESOLTIMING> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_PRESOLTIMING__set_state(PY_SCIP_PRESOLTIMING __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_89__pyx_unpickle_PY_SCIP_HEURTIMING, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_HEURTIMIN, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_EVENTTYPE(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_91__pyx_unpickle_PY_SCIP_EVENTTYPE, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_EVENTTYPE, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(<PY_SCIP_EVENTTYPE> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_EVENTTYPE__set_state(PY_SCIP_EVENTTYPE __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_93__pyx_unpickle_PY_SCIP_LPSOLSTAT, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_LPSOLSTAT, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_PY_SCIP_BRANCHDIR(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_95__pyx_unpickle_PY_SCIP_BRANCHDIR, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_BRANCHDIR, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "(tree fragment)":11 * __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(<PY_SCIP_BRANCHDIR> __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_PY_SCIP_BRANCHDIR__set_state(PY_SCIP_BRANCHDIR __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9pyscipopt_4scip_97__pyx_unpickle_PY_SCIP_BENDERSENFOTYPE, NULL, __pyx_n_s_pyscipopt_scip); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PY_SCIP_BENDERSEN, __pyx_t_6) < 0) __PYX_ERR(4, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyscipopt/scip.pyx":1 * ##@file scip.pyx # <<<<<<<<<<<<<< * #@brief holding functions in python that reference the SCIP public functions included in scip.pxd * import weakref */ __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "../../../py-venv-test/lib/python3.6/site-packages/numpy/__init__.pxd":892 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init pyscipopt.scip", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pyscipopt.scip"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* pyobject_as_double */ static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if !CYTHON_USE_TYPE_SLOTS float_value = PyNumber_Float(obj); if ((0)) goto bad; #else PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; if (likely(nb) && likely(nb->nb_float)) { float_value = nb->nb_float(obj); if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { PyErr_Format(PyExc_TypeError, "__float__ returned non-float (type %.200s)", Py_TYPE(float_value)->tp_name); Py_DECREF(float_value); goto bad; } } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; #endif Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i<n; i++) { if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; } #endif for (i=0; i<n; i++) { if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1; } return 0; } static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { PyObject *exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; if (unlikely(PyTuple_Check(err))) return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* PyIntCompare */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { if (op1 == op2) { Py_RETURN_TRUE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; if (intval == 0) { if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } else if (intval < 0) { if (size >= 0) Py_RETURN_FALSE; intval = -intval; size = -size; } else { if (size <= 0) Py_RETURN_FALSE; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } return ( PyObject_RichCompare(op1, op2, Py_EQ)); } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif /* PyObjectCall2Args */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args, *result = NULL; #if CYTHON_FAST_PYCALL if (PyFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyFunction_FastCall(function, args, 2); } #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyCFunction_FastCall(function, args, 2); } #endif args = PyTuple_New(2); if (unlikely(!args)) goto done; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); Py_INCREF(function); result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); done: return result; } /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif if (likely(PyCFunction_Check(func))) { if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (__Pyx_PyFastCFunction_Check(func)) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyFloatBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_EqObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { const double b = floatval; double a; (void)inplace; (void)zerodivision_check; if (op1 == op2) { Py_RETURN_TRUE; } if (likely(PyFloat_CheckExact(op1))) { a = PyFloat_AS_DOUBLE(op1); } else #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { a = (double) PyInt_AS_LONG(op1); } else #endif if (likely(PyLong_CheckExact(op1))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); switch (size) { case 0: a = 0.0; break; case -1: a = -(double) digits[0]; break; case 1: a = (double) digits[0]; break; case -2: case 2: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -2) a = -a; break; } } CYTHON_FALLTHROUGH; case -3: case 3: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -3) a = -a; break; } } CYTHON_FALLTHROUGH; case -4: case 4: if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -4) a = -a; break; } } CYTHON_FALLTHROUGH; default: #else { #endif return ( PyFloat_Type.tp_richcompare(op2, op1, Py_EQ)); } } else { return ( PyObject_RichCompare(op1, op2, Py_EQ)); } if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else if (likely(PyCFunction_Check(func))) #endif { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif /* None */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CythonFunctionShared */ #include <structmember.h> static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { if (unlikely(op == NULL)) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { #if PY_MAJOR_VERSION < 3 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; #endif return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("<cyfunction %U at %p>", op->func_qualname, (void *)op); #else return PyString_FromFormat("<cyfunction %s at %p>", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; argc = PyTuple_GET_SIZE(args); new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #endif /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; if (unlikely(!(m && m->sq_item))) { PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); return NULL; } key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; if (likely(m && m->mp_subscript)) { return m->mp_subscript(obj, key); } return __Pyx_PyObject_GetIndex(obj, key); } #endif /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (descr != NULL) { *method = descr; return 0; } PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(name)); #endif return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } /* UnpackTuple2 */ static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } *pvalue1 = value1; *pvalue2 = value2; return 0; #if CYTHON_COMPILING_IN_PYPY bad: Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; #endif } static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { #if !CYTHON_COMPILING_IN_PYPY *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; #elif PY_MAJOR_VERSION >= 3 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; PyObject **pp = NULL; if (method_name) { const char *name = PyUnicode_AsUTF8(method_name); if (strcmp(name, "iteritems") == 0) pp = &py_items; else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; else if (strcmp(name, "itervalues") == 0) pp = &py_values; if (pp) { if (!*pp) { *pp = PyUnicode_FromString(name + 4); if (!*pp) return NULL; } method_name = *pp; } } #endif } *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* IterNext */ static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign exc_type = __Pyx_PyErr_Occurred(); if (unlikely(exc_type)) { if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(defval); return defval; } if (defval) { Py_INCREF(defval); return defval; } __Pyx_PyErr_SetNone(PyExc_StopIteration); return NULL; } static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { PyErr_Format(PyExc_TypeError, "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name); } static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { PyObject* next; iternextfunc iternext = Py_TYPE(iterator)->tp_iternext; if (likely(iternext)) { #if CYTHON_USE_TYPE_SLOTS next = iternext(iterator); if (likely(next)) return next; #if PY_VERSION_HEX >= 0x02070000 if (unlikely(iternext == &_PyObject_NextNotImplemented)) return NULL; #endif #else next = PyIter_Next(iterator); if (likely(next)) return next; #endif } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) { __Pyx_PyIter_Next_ErrorNoIterator(iterator); return NULL; } #if !CYTHON_USE_TYPE_SLOTS else { next = PyIter_Next(iterator); if (likely(next)) return next; } #endif return __Pyx_PyIter_Next2Default(defval); } /* py_abs */ #if CYTHON_USE_PYLONG_INTERNALS static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) { if (likely(Py_SIZE(n) == -1)) { return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]); } #if CYTHON_COMPILING_IN_CPYTHON { PyObject *copy = _PyLong_Copy((PyLongObject*)n); if (likely(copy)) { __Pyx_SET_SIZE(copy, -Py_SIZE(copy)); } return copy; } #else return PyNumber_Negative(n); #endif } #endif /* UnpackUnboundCMethod */ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; target->method = method; #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } #endif return 0; } /* CallUnboundCMethod1 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; if (flag == METH_O) { return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); } #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(2, self, arg); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* CallUnboundCMethod2 */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { if (likely(cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); #else return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } #if PY_VERSION_HEX >= 0x030700A0 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); } #endif static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(3); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg1); PyTuple_SET_ITEM(args, 1, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 2, arg2); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(3, self, arg1, arg2); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* dict_getitem_default */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); if ((1)); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } #endif else { if (default_value == Py_None) value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); else value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); } return value; } /* PyFloatBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_NeObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { const double b = floatval; double a; (void)inplace; (void)zerodivision_check; if (op1 == op2) { Py_RETURN_FALSE; } if (likely(PyFloat_CheckExact(op1))) { a = PyFloat_AS_DOUBLE(op1); } else #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { a = (double) PyInt_AS_LONG(op1); } else #endif if (likely(PyLong_CheckExact(op1))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); switch (size) { case 0: a = 0.0; break; case -1: a = -(double) digits[0]; break; case 1: a = (double) digits[0]; break; case -2: case 2: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -2) a = -a; break; } } CYTHON_FALLTHROUGH; case -3: case 3: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -3) a = -a; break; } } CYTHON_FALLTHROUGH; case -4: case 4: if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -4) a = -a; break; } } CYTHON_FALLTHROUGH; default: #else { #endif return ( PyFloat_Type.tp_richcompare(op2, op1, Py_NE)); } } else { return ( PyObject_RichCompare(op1, op2, Py_NE)); } if (a != b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* GetAttr3 */ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); } /* PyObjectFormatAndDecref */ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { if (unlikely(!s)) return NULL; if (likely(PyUnicode_CheckExact(s))) return s; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(s))) { PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict"); Py_DECREF(s); return result; } #endif return __Pyx_PyObject_FormatAndDecref(s, f); } static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { PyObject *result = PyObject_Format(s, f); Py_DECREF(s); return result; } /* JoinPyUnicode */ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, CYTHON_UNUSED Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; int result_ukind; Py_ssize_t i, char_pos; void *result_udata; #if CYTHON_PEP393_ENABLED result_uval = PyUnicode_New(result_ulength, max_char); if (unlikely(!result_uval)) return NULL; result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; result_udata = PyUnicode_DATA(result_uval); #else result_uval = PyUnicode_FromUnicode(NULL, result_ulength); if (unlikely(!result_uval)) return NULL; result_ukind = sizeof(Py_UNICODE); result_udata = PyUnicode_AS_UNICODE(result_uval); #endif char_pos = 0; for (i=0; i < value_count; i++) { int ukind; Py_ssize_t ulength; void *udata; PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); if (unlikely(__Pyx_PyUnicode_READY(uval))) goto bad; ulength = __Pyx_PyUnicode_GET_LENGTH(uval); if (unlikely(!ulength)) continue; if (unlikely(char_pos + ulength < 0)) goto overflow; ukind = __Pyx_PyUnicode_KIND(uval); udata = __Pyx_PyUnicode_DATA(uval); if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind)); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); #else Py_ssize_t j; for (j=0; j < ulength; j++) { Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); } #endif } char_pos += ulength; } return result_uval; overflow: PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); bad: Py_DECREF(result_uval); return NULL; #else result_ulength++; value_count++; return PyUnicode_Join(__pyx_empty_unicode, value_tuple); #endif } /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* PyObjectCallMethod1 */ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #ifdef _MSC_VER else state = (PyGILState_STATE)-1; #endif #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla + llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla - llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { if (unlikely(PyTuple_Check(key))) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) { PyErr_SetObject(PyExc_KeyError, args); Py_DECREF(args); } } else { PyErr_SetObject(PyExc_KeyError, key); } } return NULL; } Py_INCREF(value); return value; } #endif /* decode_c_bytes */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { if (unlikely((start < 0) | (stop < 0))) { if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (stop > length) stop = length; if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } /* PyFloatBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { const double b = floatval; double a, result; (void)inplace; (void)zerodivision_check; if (likely(PyFloat_CheckExact(op1))) { a = PyFloat_AS_DOUBLE(op1); } else #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { a = (double) PyInt_AS_LONG(op1); } else #endif if (likely(PyLong_CheckExact(op1))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); switch (size) { case 0: a = 0.0; break; case -1: a = -(double) digits[0]; break; case 1: a = (double) digits[0]; break; case -2: case 2: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -2) a = -a; break; } } CYTHON_FALLTHROUGH; case -3: case 3: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -3) a = -a; break; } } CYTHON_FALLTHROUGH; case -4: case 4: if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -4) a = -a; break; } } CYTHON_FALLTHROUGH; default: #else { #endif a = PyLong_AsDouble(op1); if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL; } } else { return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2); } PyFPE_START_PROTECT("divide", return NULL) result = a / b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } #endif /* PyIntCompare */ static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { if (op1 == op2) { Py_RETURN_FALSE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; if (intval == 0) { if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } else if (intval < 0) { if (size >= 0) Py_RETURN_TRUE; intval = -intval; size = -size; } else { if (size <= 0) Py_RETURN_TRUE; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } return ( PyObject_RichCompare(op1, op2, Py_NE)); } /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } /* UnicodeAsUCS4 */ static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) { Py_ssize_t length; #if CYTHON_PEP393_ENABLED length = PyUnicode_GET_LENGTH(x); if (likely(length == 1)) { return PyUnicode_READ_CHAR(x, 0); } #else length = PyUnicode_GET_SIZE(x); if (likely(length == 1)) { return PyUnicode_AS_UNICODE(x)[0]; } #if Py_UNICODE_SIZE == 2 else if (PyUnicode_GET_SIZE(x) == 2) { Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0]; if (high_val >= 0xD800 && high_val <= 0xDBFF) { Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1]; if (low_val >= 0xDC00 && low_val <= 0xDFFF) { return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1))); } } } #endif #endif PyErr_Format(PyExc_ValueError, "only single character unicode strings can be converted to Py_UCS4, " "got length %" CYTHON_FORMAT_SSIZE_T "d", length); return (Py_UCS4)-1; } /* object_ord */ static long __Pyx__PyObject_Ord(PyObject* c) { Py_ssize_t size; if (PyBytes_Check(c)) { size = PyBytes_GET_SIZE(c); if (likely(size == 1)) { return (unsigned char) PyBytes_AS_STRING(c)[0]; } #if PY_MAJOR_VERSION < 3 } else if (PyUnicode_Check(c)) { return (long)__Pyx_PyUnicode_AsPy_UCS4(c); #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) } else if (PyByteArray_Check(c)) { size = PyByteArray_GET_SIZE(c); if (likely(size == 1)) { return (unsigned char) PyByteArray_AS_STRING(c)[0]; } #endif } else { PyErr_Format(PyExc_TypeError, "ord() expected string of length 1, but %.200s found", Py_TYPE(c)->tp_name); return (long)(Py_UCS4)-1; } PyErr_Format(PyExc_TypeError, "ord() expected a character, but string of length %zd found", size); return (long)(Py_UCS4)-1; } /* IsLittleEndian */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; uint8_t u8[4]; } S; S.u32 = 0x01020304; return S.u8[0] == 4; } /* BufferFormatCheck */ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t <= '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case '?': return "'bool'"; case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparseable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number, ndim; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ndim = ctx->head->field->type->ndim; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) return PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); if (*ts != ',' && *ts != ')') return PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); if (*ts == ',') ts++; i++; } if (i != ndim) return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return NULL; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return Py_None; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } CYTHON_FALLTHROUGH; case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } CYTHON_FALLTHROUGH; case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } /* BufferGetAndValidate */ static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (unlikely(info->buf == NULL)) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; buf->shape = __Pyx_zeros; buf->suboffsets = __Pyx_minusones; } static int __Pyx__GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { buf->buf = NULL; if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { __Pyx_ZeroBuffer(buf); return -1; } if (unlikely(buf->ndim != nd)) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", nd, buf->ndim); goto fail; } if (!cast) { __Pyx_BufFmt_Context ctx; __Pyx_BufFmt_Init(&ctx, stack, dtype); if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; } if (unlikely((size_t)buf->itemsize != dtype->size)) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; fail:; __Pyx_SafeReleaseBuffer(buf); return -1; } /* BufferFallbackError */ static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } /* BufferIndexError */ static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } /* SetItemInt */ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return -1; PyErr_Clear(); } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) #else if (is_list || PySequence_Check(o)) #endif { return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op2))) { const long a = intval; long x; long b = PyInt_AS_LONG(op2); x = (long)((unsigned long)a - b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op2))) { const long a = intval; long b, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG lla = intval; PY_LONG_LONG llb, llx; #endif const digit* digits = ((PyLongObject*)op2)->ob_digit; const Py_ssize_t size = Py_SIZE(op2); if (likely(__Pyx_sst_abs(size) <= 1)) { b = likely(size) ? digits[0] : 0; if (size == -1) b = -b; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla - llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op2)) { const long a = intval; double b = PyFloat_AS_DOUBLE(op2); double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, attr_name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(attr_name)); #endif return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; } /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } /* SetVTable */ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif result = PyObject_GetAttrString(module, class_name); if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if ((size_t)basicsize < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if ((0)) {} view->obj = NULL; Py_DECREF(obj); } #endif /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif /* Arithmetic */ #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } #if 1 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { if (b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); } else if (fabsf(b.real) >= fabsf(b.imag)) { if (b.real == 0 && b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); } else { float r = b.imag / b.real; float s = (float)(1.0) / (b.real + b.imag * r); return __pyx_t_float_complex_from_parts( (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); } } else { float r = b.real / b.imag; float s = (float)(1.0) / (b.imag + b.real * r); return __pyx_t_float_complex_from_parts( (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); } } #else static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { if (b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); } else { float denom = b.real * b.real + b.imag * b.imag; return __pyx_t_float_complex_from_parts( (a.real * b.real + a.imag * b.imag) / denom, (a.imag * b.real - a.real * b.imag) / denom); } } #endif static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: return __Pyx_c_prod_float(a, a); case 3: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(z, a); case 4: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { z.real = powf(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { r = a.real; theta = 0; } else { r = -a.real; theta = atan2f(0.0, -1.0); } } else { r = __Pyx_c_abs_float(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif /* Arithmetic */ #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } #if 1 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { if (b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); } else if (fabs(b.real) >= fabs(b.imag)) { if (b.real == 0 && b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); } else { double r = b.imag / b.real; double s = (double)(1.0) / (b.real + b.imag * r); return __pyx_t_double_complex_from_parts( (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); } } else { double r = b.real / b.imag; double s = (double)(1.0) / (b.imag + b.real * r); return __pyx_t_double_complex_from_parts( (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); } } #else static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { if (b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); } else { double denom = b.real * b.real + b.imag * b.imag; return __pyx_t_double_complex_from_parts( (a.real * b.real + a.imag * b.imag) / denom, (a.imag * b.real - a.real * b.imag) / denom); } } #endif static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: return __Pyx_c_prod_double(a, a); case 3: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(z, a); case 4: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { z.real = pow(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { r = a.real; theta = 0; } else { r = -a.real; theta = atan2(0.0, -1.0); } } else { r = __Pyx_c_abs_double(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_EXPROP(SCIP_EXPROP value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_EXPROP neg_one = (SCIP_EXPROP) -1, const_zero = (SCIP_EXPROP) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_EXPROP) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_EXPROP) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EXPROP) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_EXPROP) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EXPROP) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_EXPROP), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_RESULT(SCIP_RESULT value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_RESULT neg_one = (SCIP_RESULT) -1, const_zero = (SCIP_RESULT) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_RESULT) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_RESULT) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RESULT) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_RESULT) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RESULT) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_RESULT), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PARAMSETTING(SCIP_PARAMSETTING value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PARAMSETTING neg_one = (SCIP_PARAMSETTING) -1, const_zero = (SCIP_PARAMSETTING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_PARAMSETTING) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_PARAMSETTING) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMSETTING) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_PARAMSETTING) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMSETTING) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_PARAMSETTING), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PARAMEMPHASIS(SCIP_PARAMEMPHASIS value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PARAMEMPHASIS neg_one = (SCIP_PARAMEMPHASIS) -1, const_zero = (SCIP_PARAMEMPHASIS) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_PARAMEMPHASIS) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_PARAMEMPHASIS), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_STATUS(SCIP_STATUS value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_STATUS neg_one = (SCIP_STATUS) -1, const_zero = (SCIP_STATUS) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_STATUS) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_STATUS) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_STATUS) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_STATUS) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_STATUS) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_STATUS), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_STAGE(SCIP_STAGE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_STAGE neg_one = (SCIP_STAGE) -1, const_zero = (SCIP_STAGE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_STAGE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_STAGE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_STAGE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_STAGE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_STAGE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_STAGE), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_NODETYPE(SCIP_NODETYPE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_NODETYPE neg_one = (SCIP_NODETYPE) -1, const_zero = (SCIP_NODETYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_NODETYPE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_NODETYPE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_NODETYPE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_NODETYPE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_NODETYPE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_NODETYPE), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PROPTIMING(SCIP_PROPTIMING value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PROPTIMING neg_one = (SCIP_PROPTIMING) -1, const_zero = (SCIP_PROPTIMING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_PROPTIMING) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_PROPTIMING) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PROPTIMING) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_PROPTIMING) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PROPTIMING) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_PROPTIMING), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_PRESOLTIMING(SCIP_PRESOLTIMING value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PRESOLTIMING neg_one = (SCIP_PRESOLTIMING) -1, const_zero = (SCIP_PRESOLTIMING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_PRESOLTIMING) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_PRESOLTIMING) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PRESOLTIMING) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_PRESOLTIMING) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PRESOLTIMING) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_PRESOLTIMING), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_HEURTIMING(SCIP_HEURTIMING value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_HEURTIMING neg_one = (SCIP_HEURTIMING) -1, const_zero = (SCIP_HEURTIMING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_HEURTIMING) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_HEURTIMING) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_HEURTIMING) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_HEURTIMING) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_HEURTIMING) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_HEURTIMING), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_EVENTTYPE(SCIP_EVENTTYPE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_EVENTTYPE neg_one = (SCIP_EVENTTYPE) -1, const_zero = (SCIP_EVENTTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_EVENTTYPE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_EVENTTYPE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EVENTTYPE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_EVENTTYPE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EVENTTYPE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_EVENTTYPE), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_LPSOLSTAT(SCIP_LPSOLSTAT value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_LPSOLSTAT neg_one = (SCIP_LPSOLSTAT) -1, const_zero = (SCIP_LPSOLSTAT) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_LPSOLSTAT) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_LPSOLSTAT) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_LPSOLSTAT) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_LPSOLSTAT) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_LPSOLSTAT) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_LPSOLSTAT), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BRANCHDIR(SCIP_BRANCHDIR value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_BRANCHDIR neg_one = (SCIP_BRANCHDIR) -1, const_zero = (SCIP_BRANCHDIR) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_BRANCHDIR) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_BRANCHDIR) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BRANCHDIR) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_BRANCHDIR) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BRANCHDIR) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_BRANCHDIR), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BENDERSENFOTYPE(SCIP_BENDERSENFOTYPE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_BENDERSENFOTYPE neg_one = (SCIP_BENDERSENFOTYPE) -1, const_zero = (SCIP_BENDERSENFOTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_BENDERSENFOTYPE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_BENDERSENFOTYPE), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE SCIP_RETCODE __Pyx_PyInt_As_SCIP_RETCODE(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_RETCODE neg_one = (SCIP_RETCODE) -1, const_zero = (SCIP_RETCODE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_RETCODE) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_RETCODE) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_RETCODE) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, digit, digits[0]) case 2: if (8 * sizeof(SCIP_RETCODE) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) >= 2 * PyLong_SHIFT) { return (SCIP_RETCODE) (((((SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_RETCODE) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) >= 3 * PyLong_SHIFT) { return (SCIP_RETCODE) (((((((SCIP_RETCODE)digits[2]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_RETCODE) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) >= 4 * PyLong_SHIFT) { return (SCIP_RETCODE) (((((((((SCIP_RETCODE)digits[3]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[2]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_RETCODE) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_RETCODE) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RETCODE, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RETCODE) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RETCODE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_RETCODE) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_RETCODE) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) - 1 > 2 * PyLong_SHIFT) { return (SCIP_RETCODE) (((SCIP_RETCODE)-1)*(((((SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_RETCODE) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) - 1 > 2 * PyLong_SHIFT) { return (SCIP_RETCODE) ((((((SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_RETCODE) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) - 1 > 3 * PyLong_SHIFT) { return (SCIP_RETCODE) (((SCIP_RETCODE)-1)*(((((((SCIP_RETCODE)digits[2]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_RETCODE) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) - 1 > 3 * PyLong_SHIFT) { return (SCIP_RETCODE) ((((((((SCIP_RETCODE)digits[2]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_RETCODE) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) - 1 > 4 * PyLong_SHIFT) { return (SCIP_RETCODE) (((SCIP_RETCODE)-1)*(((((((((SCIP_RETCODE)digits[3]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[2]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_RETCODE) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RETCODE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RETCODE) - 1 > 4 * PyLong_SHIFT) { return (SCIP_RETCODE) ((((((((((SCIP_RETCODE)digits[3]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[2]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[1]) << PyLong_SHIFT) | (SCIP_RETCODE)digits[0]))); } } break; } #endif if (sizeof(SCIP_RETCODE) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RETCODE, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RETCODE) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RETCODE, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_RETCODE val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_RETCODE) -1; } } else { SCIP_RETCODE val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_RETCODE) -1; val = __Pyx_PyInt_As_SCIP_RETCODE(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_RETCODE"); return (SCIP_RETCODE) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_RETCODE"); return (SCIP_RETCODE) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_RETCODE(SCIP_RETCODE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_RETCODE neg_one = (SCIP_RETCODE) -1, const_zero = (SCIP_RETCODE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_RETCODE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_RETCODE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RETCODE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_RETCODE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RETCODE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_RETCODE), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(size_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (size_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (size_t) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) case -2: if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -3: if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -4: if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; } #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (size_t) -1; } } else { size_t val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_RESULT __Pyx_PyInt_As_SCIP_RESULT(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_RESULT neg_one = (SCIP_RESULT) -1, const_zero = (SCIP_RESULT) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_RESULT) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_RESULT) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_RESULT) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_RESULT, digit, digits[0]) case 2: if (8 * sizeof(SCIP_RESULT) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) >= 2 * PyLong_SHIFT) { return (SCIP_RESULT) (((((SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_RESULT) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) >= 3 * PyLong_SHIFT) { return (SCIP_RESULT) (((((((SCIP_RESULT)digits[2]) << PyLong_SHIFT) | (SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_RESULT) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) >= 4 * PyLong_SHIFT) { return (SCIP_RESULT) (((((((((SCIP_RESULT)digits[3]) << PyLong_SHIFT) | (SCIP_RESULT)digits[2]) << PyLong_SHIFT) | (SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_RESULT) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_RESULT) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RESULT, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RESULT) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RESULT, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_RESULT) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_RESULT, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_RESULT, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_RESULT) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) - 1 > 2 * PyLong_SHIFT) { return (SCIP_RESULT) (((SCIP_RESULT)-1)*(((((SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_RESULT) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) - 1 > 2 * PyLong_SHIFT) { return (SCIP_RESULT) ((((((SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_RESULT) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) - 1 > 3 * PyLong_SHIFT) { return (SCIP_RESULT) (((SCIP_RESULT)-1)*(((((((SCIP_RESULT)digits[2]) << PyLong_SHIFT) | (SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_RESULT) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) - 1 > 3 * PyLong_SHIFT) { return (SCIP_RESULT) ((((((((SCIP_RESULT)digits[2]) << PyLong_SHIFT) | (SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_RESULT) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) - 1 > 4 * PyLong_SHIFT) { return (SCIP_RESULT) (((SCIP_RESULT)-1)*(((((((((SCIP_RESULT)digits[3]) << PyLong_SHIFT) | (SCIP_RESULT)digits[2]) << PyLong_SHIFT) | (SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_RESULT) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_RESULT, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_RESULT) - 1 > 4 * PyLong_SHIFT) { return (SCIP_RESULT) ((((((((((SCIP_RESULT)digits[3]) << PyLong_SHIFT) | (SCIP_RESULT)digits[2]) << PyLong_SHIFT) | (SCIP_RESULT)digits[1]) << PyLong_SHIFT) | (SCIP_RESULT)digits[0]))); } } break; } #endif if (sizeof(SCIP_RESULT) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RESULT, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_RESULT) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_RESULT, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_RESULT val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_RESULT) -1; } } else { SCIP_RESULT val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_RESULT) -1; val = __Pyx_PyInt_As_SCIP_RESULT(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_RESULT"); return (SCIP_RESULT) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_RESULT"); return (SCIP_RESULT) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_LOCKTYPE(SCIP_LOCKTYPE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_LOCKTYPE neg_one = (SCIP_LOCKTYPE) -1, const_zero = (SCIP_LOCKTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_LOCKTYPE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_LOCKTYPE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_LOCKTYPE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_LOCKTYPE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_LOCKTYPE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_LOCKTYPE), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BOUNDTYPE(SCIP_BOUNDTYPE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_BOUNDTYPE neg_one = (SCIP_BOUNDTYPE) -1, const_zero = (SCIP_BOUNDTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_BOUNDTYPE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_BOUNDTYPE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BOUNDTYPE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_BOUNDTYPE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BOUNDTYPE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_BOUNDTYPE), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_Longint(SCIP_Longint value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_Longint neg_one = (SCIP_Longint) -1, const_zero = (SCIP_Longint) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_Longint) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_Longint) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_Longint) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_Longint) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_Longint) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_Longint), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SCIP_BOUNDCHGTYPE(SCIP_BOUNDCHGTYPE value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_BOUNDCHGTYPE neg_one = (SCIP_BOUNDCHGTYPE) -1, const_zero = (SCIP_BOUNDCHGTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SCIP_BOUNDCHGTYPE) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SCIP_BOUNDCHGTYPE) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BOUNDCHGTYPE) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SCIP_BOUNDCHGTYPE) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BOUNDCHGTYPE) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SCIP_BOUNDCHGTYPE), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE SCIP_PARAMSETTING __Pyx_PyInt_As_SCIP_PARAMSETTING(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PARAMSETTING neg_one = (SCIP_PARAMSETTING) -1, const_zero = (SCIP_PARAMSETTING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_PARAMSETTING) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_PARAMSETTING) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PARAMSETTING) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, digit, digits[0]) case 2: if (8 * sizeof(SCIP_PARAMSETTING) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) >= 2 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) (((((SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_PARAMSETTING) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) >= 3 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) (((((((SCIP_PARAMSETTING)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_PARAMSETTING) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) >= 4 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) (((((((((SCIP_PARAMSETTING)digits[3]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_PARAMSETTING) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_PARAMSETTING) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMSETTING, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMSETTING) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMSETTING, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PARAMSETTING) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) (((SCIP_PARAMSETTING)-1)*(((((SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_PARAMSETTING) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) ((((((SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) (((SCIP_PARAMSETTING)-1)*(((((((SCIP_PARAMSETTING)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_PARAMSETTING) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) ((((((((SCIP_PARAMSETTING)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) (((SCIP_PARAMSETTING)-1)*(((((((((SCIP_PARAMSETTING)digits[3]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_PARAMSETTING) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMSETTING, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMSETTING) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PARAMSETTING) ((((((((((SCIP_PARAMSETTING)digits[3]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMSETTING)digits[0]))); } } break; } #endif if (sizeof(SCIP_PARAMSETTING) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMSETTING, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMSETTING) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMSETTING, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_PARAMSETTING val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_PARAMSETTING) -1; } } else { SCIP_PARAMSETTING val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_PARAMSETTING) -1; val = __Pyx_PyInt_As_SCIP_PARAMSETTING(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_PARAMSETTING"); return (SCIP_PARAMSETTING) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_PARAMSETTING"); return (SCIP_PARAMSETTING) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_EXPROP __Pyx_PyInt_As_SCIP_EXPROP(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_EXPROP neg_one = (SCIP_EXPROP) -1, const_zero = (SCIP_EXPROP) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_EXPROP) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_EXPROP) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_EXPROP) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, digit, digits[0]) case 2: if (8 * sizeof(SCIP_EXPROP) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) >= 2 * PyLong_SHIFT) { return (SCIP_EXPROP) (((((SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_EXPROP) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) >= 3 * PyLong_SHIFT) { return (SCIP_EXPROP) (((((((SCIP_EXPROP)digits[2]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_EXPROP) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) >= 4 * PyLong_SHIFT) { return (SCIP_EXPROP) (((((((((SCIP_EXPROP)digits[3]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[2]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_EXPROP) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_EXPROP) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EXPROP, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EXPROP) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EXPROP, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_EXPROP) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_EXPROP) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) - 1 > 2 * PyLong_SHIFT) { return (SCIP_EXPROP) (((SCIP_EXPROP)-1)*(((((SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_EXPROP) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) - 1 > 2 * PyLong_SHIFT) { return (SCIP_EXPROP) ((((((SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_EXPROP) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) - 1 > 3 * PyLong_SHIFT) { return (SCIP_EXPROP) (((SCIP_EXPROP)-1)*(((((((SCIP_EXPROP)digits[2]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_EXPROP) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) - 1 > 3 * PyLong_SHIFT) { return (SCIP_EXPROP) ((((((((SCIP_EXPROP)digits[2]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_EXPROP) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) - 1 > 4 * PyLong_SHIFT) { return (SCIP_EXPROP) (((SCIP_EXPROP)-1)*(((((((((SCIP_EXPROP)digits[3]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[2]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_EXPROP) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EXPROP, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EXPROP) - 1 > 4 * PyLong_SHIFT) { return (SCIP_EXPROP) ((((((((((SCIP_EXPROP)digits[3]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[2]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[1]) << PyLong_SHIFT) | (SCIP_EXPROP)digits[0]))); } } break; } #endif if (sizeof(SCIP_EXPROP) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EXPROP, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EXPROP) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EXPROP, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_EXPROP val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_EXPROP) -1; } } else { SCIP_EXPROP val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_EXPROP) -1; val = __Pyx_PyInt_As_SCIP_EXPROP(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_EXPROP"); return (SCIP_EXPROP) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_EXPROP"); return (SCIP_EXPROP) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_BENDERSENFOTYPE __Pyx_PyInt_As_SCIP_BENDERSENFOTYPE(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_BENDERSENFOTYPE neg_one = (SCIP_BENDERSENFOTYPE) -1, const_zero = (SCIP_BENDERSENFOTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_BENDERSENFOTYPE) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_BENDERSENFOTYPE) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_BENDERSENFOTYPE) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, digit, digits[0]) case 2: if (8 * sizeof(SCIP_BENDERSENFOTYPE) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) >= 2 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) (((((SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_BENDERSENFOTYPE) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) >= 3 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) (((((((SCIP_BENDERSENFOTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_BENDERSENFOTYPE) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) >= 4 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) (((((((((SCIP_BENDERSENFOTYPE)digits[3]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_BENDERSENFOTYPE) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BENDERSENFOTYPE, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BENDERSENFOTYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_BENDERSENFOTYPE) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 2 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) (((SCIP_BENDERSENFOTYPE)-1)*(((((SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_BENDERSENFOTYPE) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 2 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) ((((((SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 3 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) (((SCIP_BENDERSENFOTYPE)-1)*(((((((SCIP_BENDERSENFOTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_BENDERSENFOTYPE) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 3 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) ((((((((SCIP_BENDERSENFOTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 4 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) (((SCIP_BENDERSENFOTYPE)-1)*(((((((((SCIP_BENDERSENFOTYPE)digits[3]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_BENDERSENFOTYPE) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BENDERSENFOTYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BENDERSENFOTYPE) - 1 > 4 * PyLong_SHIFT) { return (SCIP_BENDERSENFOTYPE) ((((((((((SCIP_BENDERSENFOTYPE)digits[3]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_BENDERSENFOTYPE)digits[0]))); } } break; } #endif if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BENDERSENFOTYPE, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BENDERSENFOTYPE) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BENDERSENFOTYPE, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_BENDERSENFOTYPE val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_BENDERSENFOTYPE) -1; } } else { SCIP_BENDERSENFOTYPE val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_BENDERSENFOTYPE) -1; val = __Pyx_PyInt_As_SCIP_BENDERSENFOTYPE(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_BENDERSENFOTYPE"); return (SCIP_BENDERSENFOTYPE) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_BENDERSENFOTYPE"); return (SCIP_BENDERSENFOTYPE) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_PROPTIMING __Pyx_PyInt_As_SCIP_PROPTIMING(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PROPTIMING neg_one = (SCIP_PROPTIMING) -1, const_zero = (SCIP_PROPTIMING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_PROPTIMING) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_PROPTIMING) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PROPTIMING) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, digit, digits[0]) case 2: if (8 * sizeof(SCIP_PROPTIMING) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) >= 2 * PyLong_SHIFT) { return (SCIP_PROPTIMING) (((((SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_PROPTIMING) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) >= 3 * PyLong_SHIFT) { return (SCIP_PROPTIMING) (((((((SCIP_PROPTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_PROPTIMING) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) >= 4 * PyLong_SHIFT) { return (SCIP_PROPTIMING) (((((((((SCIP_PROPTIMING)digits[3]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_PROPTIMING) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_PROPTIMING) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PROPTIMING, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PROPTIMING) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PROPTIMING, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PROPTIMING) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_PROPTIMING) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PROPTIMING) (((SCIP_PROPTIMING)-1)*(((((SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_PROPTIMING) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PROPTIMING) ((((((SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_PROPTIMING) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PROPTIMING) (((SCIP_PROPTIMING)-1)*(((((((SCIP_PROPTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_PROPTIMING) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PROPTIMING) ((((((((SCIP_PROPTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_PROPTIMING) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PROPTIMING) (((SCIP_PROPTIMING)-1)*(((((((((SCIP_PROPTIMING)digits[3]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_PROPTIMING) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PROPTIMING, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PROPTIMING) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PROPTIMING) ((((((((((SCIP_PROPTIMING)digits[3]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PROPTIMING)digits[0]))); } } break; } #endif if (sizeof(SCIP_PROPTIMING) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PROPTIMING, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PROPTIMING) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PROPTIMING, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_PROPTIMING val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_PROPTIMING) -1; } } else { SCIP_PROPTIMING val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_PROPTIMING) -1; val = __Pyx_PyInt_As_SCIP_PROPTIMING(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_PROPTIMING"); return (SCIP_PROPTIMING) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_PROPTIMING"); return (SCIP_PROPTIMING) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_PRESOLTIMING __Pyx_PyInt_As_SCIP_PRESOLTIMING(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PRESOLTIMING neg_one = (SCIP_PRESOLTIMING) -1, const_zero = (SCIP_PRESOLTIMING) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_PRESOLTIMING) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_PRESOLTIMING) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PRESOLTIMING) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, digit, digits[0]) case 2: if (8 * sizeof(SCIP_PRESOLTIMING) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) >= 2 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) (((((SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_PRESOLTIMING) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) >= 3 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) (((((((SCIP_PRESOLTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_PRESOLTIMING) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) >= 4 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) (((((((((SCIP_PRESOLTIMING)digits[3]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_PRESOLTIMING) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_PRESOLTIMING) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PRESOLTIMING, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PRESOLTIMING) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PRESOLTIMING, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PRESOLTIMING) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) (((SCIP_PRESOLTIMING)-1)*(((((SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_PRESOLTIMING) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) ((((((SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) (((SCIP_PRESOLTIMING)-1)*(((((((SCIP_PRESOLTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_PRESOLTIMING) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) ((((((((SCIP_PRESOLTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) (((SCIP_PRESOLTIMING)-1)*(((((((((SCIP_PRESOLTIMING)digits[3]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_PRESOLTIMING) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PRESOLTIMING, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PRESOLTIMING) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PRESOLTIMING) ((((((((((SCIP_PRESOLTIMING)digits[3]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[2]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[1]) << PyLong_SHIFT) | (SCIP_PRESOLTIMING)digits[0]))); } } break; } #endif if (sizeof(SCIP_PRESOLTIMING) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PRESOLTIMING, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PRESOLTIMING) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PRESOLTIMING, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_PRESOLTIMING val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_PRESOLTIMING) -1; } } else { SCIP_PRESOLTIMING val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_PRESOLTIMING) -1; val = __Pyx_PyInt_As_SCIP_PRESOLTIMING(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_PRESOLTIMING"); return (SCIP_PRESOLTIMING) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_PRESOLTIMING"); return (SCIP_PRESOLTIMING) -1; } /* CIntFromPy */ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (unsigned int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned int) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0]) case 2: if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) { return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } } break; case 3: if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) { return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } } break; case 4: if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) { return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (unsigned int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(unsigned int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned int) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0]) case -2: if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case 2: if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case -3: if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case 3: if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case -4: if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case 4: if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; } #endif if (sizeof(unsigned int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (unsigned int) -1; } } else { unsigned int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (unsigned int) -1; val = __Pyx_PyInt_As_unsigned_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned int"); return (unsigned int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned int"); return (unsigned int) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_BRANCHDIR __Pyx_PyInt_As_SCIP_BRANCHDIR(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_BRANCHDIR neg_one = (SCIP_BRANCHDIR) -1, const_zero = (SCIP_BRANCHDIR) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_BRANCHDIR) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_BRANCHDIR) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_BRANCHDIR) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, digit, digits[0]) case 2: if (8 * sizeof(SCIP_BRANCHDIR) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) >= 2 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) (((((SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_BRANCHDIR) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) >= 3 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) (((((((SCIP_BRANCHDIR)digits[2]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_BRANCHDIR) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) >= 4 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) (((((((((SCIP_BRANCHDIR)digits[3]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[2]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_BRANCHDIR) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_BRANCHDIR) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BRANCHDIR, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BRANCHDIR) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BRANCHDIR, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_BRANCHDIR) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 2 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) (((SCIP_BRANCHDIR)-1)*(((((SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_BRANCHDIR) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 2 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) ((((((SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 3 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) (((SCIP_BRANCHDIR)-1)*(((((((SCIP_BRANCHDIR)digits[2]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_BRANCHDIR) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 3 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) ((((((((SCIP_BRANCHDIR)digits[2]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 4 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) (((SCIP_BRANCHDIR)-1)*(((((((((SCIP_BRANCHDIR)digits[3]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[2]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_BRANCHDIR) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_BRANCHDIR, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_BRANCHDIR) - 1 > 4 * PyLong_SHIFT) { return (SCIP_BRANCHDIR) ((((((((((SCIP_BRANCHDIR)digits[3]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[2]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[1]) << PyLong_SHIFT) | (SCIP_BRANCHDIR)digits[0]))); } } break; } #endif if (sizeof(SCIP_BRANCHDIR) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BRANCHDIR, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_BRANCHDIR) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_BRANCHDIR, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_BRANCHDIR val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_BRANCHDIR) -1; } } else { SCIP_BRANCHDIR val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_BRANCHDIR) -1; val = __Pyx_PyInt_As_SCIP_BRANCHDIR(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_BRANCHDIR"); return (SCIP_BRANCHDIR) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_BRANCHDIR"); return (SCIP_BRANCHDIR) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_EVENTTYPE __Pyx_PyInt_As_SCIP_EVENTTYPE(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_EVENTTYPE neg_one = (SCIP_EVENTTYPE) -1, const_zero = (SCIP_EVENTTYPE) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_EVENTTYPE) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_EVENTTYPE) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_EVENTTYPE) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, digit, digits[0]) case 2: if (8 * sizeof(SCIP_EVENTTYPE) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) >= 2 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) (((((SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_EVENTTYPE) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) >= 3 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) (((((((SCIP_EVENTTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_EVENTTYPE) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) >= 4 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) (((((((((SCIP_EVENTTYPE)digits[3]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_EVENTTYPE) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_EVENTTYPE) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EVENTTYPE, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EVENTTYPE) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EVENTTYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_EVENTTYPE) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 2 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) (((SCIP_EVENTTYPE)-1)*(((((SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_EVENTTYPE) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 2 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) ((((((SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 3 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) (((SCIP_EVENTTYPE)-1)*(((((((SCIP_EVENTTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_EVENTTYPE) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 3 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) ((((((((SCIP_EVENTTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 4 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) (((SCIP_EVENTTYPE)-1)*(((((((((SCIP_EVENTTYPE)digits[3]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_EVENTTYPE) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_EVENTTYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_EVENTTYPE) - 1 > 4 * PyLong_SHIFT) { return (SCIP_EVENTTYPE) ((((((((((SCIP_EVENTTYPE)digits[3]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[2]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[1]) << PyLong_SHIFT) | (SCIP_EVENTTYPE)digits[0]))); } } break; } #endif if (sizeof(SCIP_EVENTTYPE) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EVENTTYPE, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_EVENTTYPE) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_EVENTTYPE, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_EVENTTYPE val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_EVENTTYPE) -1; } } else { SCIP_EVENTTYPE val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_EVENTTYPE) -1; val = __Pyx_PyInt_As_SCIP_EVENTTYPE(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_EVENTTYPE"); return (SCIP_EVENTTYPE) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_EVENTTYPE"); return (SCIP_EVENTTYPE) -1; } /* CIntFromPy */ static CYTHON_INLINE SCIP_Longint __Pyx_PyInt_As_SCIP_Longint(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_Longint neg_one = (SCIP_Longint) -1, const_zero = (SCIP_Longint) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_Longint) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_Longint) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_Longint) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_Longint, digit, digits[0]) case 2: if (8 * sizeof(SCIP_Longint) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) >= 2 * PyLong_SHIFT) { return (SCIP_Longint) (((((SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_Longint) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) >= 3 * PyLong_SHIFT) { return (SCIP_Longint) (((((((SCIP_Longint)digits[2]) << PyLong_SHIFT) | (SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_Longint) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) >= 4 * PyLong_SHIFT) { return (SCIP_Longint) (((((((((SCIP_Longint)digits[3]) << PyLong_SHIFT) | (SCIP_Longint)digits[2]) << PyLong_SHIFT) | (SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_Longint) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_Longint) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_Longint, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_Longint) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_Longint, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_Longint) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_Longint, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_Longint, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_Longint) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) - 1 > 2 * PyLong_SHIFT) { return (SCIP_Longint) (((SCIP_Longint)-1)*(((((SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_Longint) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) - 1 > 2 * PyLong_SHIFT) { return (SCIP_Longint) ((((((SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_Longint) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) - 1 > 3 * PyLong_SHIFT) { return (SCIP_Longint) (((SCIP_Longint)-1)*(((((((SCIP_Longint)digits[2]) << PyLong_SHIFT) | (SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_Longint) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) - 1 > 3 * PyLong_SHIFT) { return (SCIP_Longint) ((((((((SCIP_Longint)digits[2]) << PyLong_SHIFT) | (SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_Longint) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) - 1 > 4 * PyLong_SHIFT) { return (SCIP_Longint) (((SCIP_Longint)-1)*(((((((((SCIP_Longint)digits[3]) << PyLong_SHIFT) | (SCIP_Longint)digits[2]) << PyLong_SHIFT) | (SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_Longint) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_Longint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_Longint) - 1 > 4 * PyLong_SHIFT) { return (SCIP_Longint) ((((((((((SCIP_Longint)digits[3]) << PyLong_SHIFT) | (SCIP_Longint)digits[2]) << PyLong_SHIFT) | (SCIP_Longint)digits[1]) << PyLong_SHIFT) | (SCIP_Longint)digits[0]))); } } break; } #endif if (sizeof(SCIP_Longint) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_Longint, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_Longint) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_Longint, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_Longint val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_Longint) -1; } } else { SCIP_Longint val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_Longint) -1; val = __Pyx_PyInt_As_SCIP_Longint(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_Longint"); return (SCIP_Longint) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_Longint"); return (SCIP_Longint) -1; } /* CIntFromPy */ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const char neg_one = (char) -1, const_zero = (char) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(char) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (char) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (char) 0; case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0]) case 2: if (8 * sizeof(char) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) { return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; case 3: if (8 * sizeof(char) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) { return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; case 4: if (8 * sizeof(char) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) { return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (char) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(char) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (char) 0; case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0]) case -2: if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 2: if (8 * sizeof(char) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case -3: if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 3: if (8 * sizeof(char) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case -4: if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 4: if (8 * sizeof(char) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; } #endif if (sizeof(char) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else char val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (char) -1; } } else { char val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (char) -1; val = __Pyx_PyInt_As_char(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to char"); return (char) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to char"); return (char) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const char neg_one = (char) -1, const_zero = (char) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(char) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(char) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(char) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(char), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE SCIP_PARAMEMPHASIS __Pyx_PyInt_As_SCIP_PARAMEMPHASIS(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SCIP_PARAMEMPHASIS neg_one = (SCIP_PARAMEMPHASIS) -1, const_zero = (SCIP_PARAMEMPHASIS) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SCIP_PARAMEMPHASIS) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SCIP_PARAMEMPHASIS) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PARAMEMPHASIS) 0; case 1: __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, digit, digits[0]) case 2: if (8 * sizeof(SCIP_PARAMEMPHASIS) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) >= 2 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) (((((SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0])); } } break; case 3: if (8 * sizeof(SCIP_PARAMEMPHASIS) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) >= 3 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) (((((((SCIP_PARAMEMPHASIS)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0])); } } break; case 4: if (8 * sizeof(SCIP_PARAMEMPHASIS) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) >= 4 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) (((((((((SCIP_PARAMEMPHASIS)digits[3]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SCIP_PARAMEMPHASIS) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMEMPHASIS, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMEMPHASIS, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SCIP_PARAMEMPHASIS) 0; case -1: __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, digit, +digits[0]) case -2: if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) (((SCIP_PARAMEMPHASIS)-1)*(((((SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0]))); } } break; case 2: if (8 * sizeof(SCIP_PARAMEMPHASIS) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 2 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) ((((((SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0]))); } } break; case -3: if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) (((SCIP_PARAMEMPHASIS)-1)*(((((((SCIP_PARAMEMPHASIS)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0]))); } } break; case 3: if (8 * sizeof(SCIP_PARAMEMPHASIS) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 3 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) ((((((((SCIP_PARAMEMPHASIS)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0]))); } } break; case -4: if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) (((SCIP_PARAMEMPHASIS)-1)*(((((((((SCIP_PARAMEMPHASIS)digits[3]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0]))); } } break; case 4: if (8 * sizeof(SCIP_PARAMEMPHASIS) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SCIP_PARAMEMPHASIS, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SCIP_PARAMEMPHASIS) - 1 > 4 * PyLong_SHIFT) { return (SCIP_PARAMEMPHASIS) ((((((((((SCIP_PARAMEMPHASIS)digits[3]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[2]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[1]) << PyLong_SHIFT) | (SCIP_PARAMEMPHASIS)digits[0]))); } } break; } #endif if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMEMPHASIS, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SCIP_PARAMEMPHASIS) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SCIP_PARAMEMPHASIS, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SCIP_PARAMEMPHASIS val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SCIP_PARAMEMPHASIS) -1; } } else { SCIP_PARAMEMPHASIS val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SCIP_PARAMEMPHASIS) -1; val = __Pyx_PyInt_As_SCIP_PARAMEMPHASIS(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SCIP_PARAMEMPHASIS"); return (SCIP_PARAMEMPHASIS) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SCIP_PARAMEMPHASIS"); return (SCIP_PARAMEMPHASIS) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(npy_int32) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int32) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(npy_int32) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(npy_int32), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_int32) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_int32) 0; case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, digits[0]) case 2: if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT) { return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); } } break; case 3: if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT) { return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); } } break; case 4: if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT) { return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (npy_int32) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_int32) 0; case -1: __PYX_VERIFY_RETURN_INT(npy_int32, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, +digits[0]) case -2: if (8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case 2: if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case -3: if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case 3: if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case -4: if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { return (npy_int32) (((npy_int32)-1)*(((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case 4: if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; } #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int32 val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (npy_int32) -1; } } else { npy_int32 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to npy_int32"); return (npy_int32) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; if (!res) { res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } return res; } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i<n; i++) { if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; } #endif for (i=0; i<n; i++) { PyObject *t = PyTuple_GET_ITEM(tuple, i); #if PY_MAJOR_VERSION < 3 if (likely(exc_type == t)) return 1; #endif if (likely(PyExceptionClass_Check(t))) { if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1; } else { } } return 0; } static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) { if (likely(err == exc_type)) return 1; if (likely(PyExceptionClass_Check(err))) { if (likely(PyExceptionClass_Check(exc_type))) { return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type); } else if (likely(PyTuple_Check(exc_type))) { return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type); } else { } } return PyErr_GivenExceptionMatches(err, exc_type); } static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) { assert(PyExceptionClass_Check(exc_type1)); assert(PyExceptionClass_Check(exc_type2)); if (likely(err == exc_type1 || err == exc_type2)) return 1; if (likely(PyExceptionClass_Check(err))) { return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); } return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); } #endif /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* CoroutineBase */ #include <structmember.h> #include <frameobject.h> #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); value = Py_None; } #if PY_VERSION_HEX >= 0x030300A0 else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); } #endif else if (unlikely(PyTuple_Check(ev))) { if (PyTuple_GET_SIZE(ev) >= 1) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #else value = PySequence_ITEM(ev, 0); #endif } else { Py_INCREF(Py_None); value = Py_None; } Py_DECREF(ev); } else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { value = ev; } if (likely(value)) { Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { PyObject *t, *v, *tb; t = exc_state->exc_type; v = exc_state->exc_value; tb = exc_state->exc_traceback; exc_state->exc_type = NULL; exc_state->exc_value = NULL; exc_state->exc_traceback = NULL; Py_XDECREF(t); Py_XDECREF(v); Py_XDECREF(tb); } #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { const char *msg; if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { msg = "coroutine already executing"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { msg = "async generator already executing"; #endif } else { msg = "generator already executing"; } PyErr_SetString(PyExc_ValueError, msg); } #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { const char *msg; if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(gen)) { msg = "can't send non-None value to a just-started coroutine"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(gen)) { msg = "can't send non-None value to a just-started async generator"; #endif } else { msg = "can't send non-None value to a just-started generator"; } PyErr_SetString(PyExc_TypeError, msg); } #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) { #ifdef __Pyx_Coroutine_USED if (!closing && __Pyx_Coroutine_Check(gen)) { PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); } else #endif if (value) { #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); else #endif PyErr_SetNone(PyExc_StopIteration); } } static PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { __Pyx_PyThreadState_declare PyThreadState *tstate; __Pyx_ExcInfoStruct *exc_state; PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { return __Pyx_Coroutine_NotStartedError((PyObject*)self); } } if (unlikely(self->resume_label == -1)) { return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); } #if CYTHON_FAST_THREAD_STATE __Pyx_PyThreadState_assign tstate = __pyx_tstate; #else tstate = __Pyx_PyThreadState_Current; #endif exc_state = &self->gi_exc_state; if (exc_state->exc_type) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else if (exc_state->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif } #if CYTHON_USE_EXC_INFO_STACK exc_state->previous_item = tstate->exc_info; tstate->exc_info = exc_state; #else if (exc_state->exc_type) { __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(exc_state); __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } #endif self->is_running = 1; retval = self->body((PyObject *) self, tstate, value); self->is_running = 0; #if CYTHON_USE_EXC_INFO_STACK exc_state = &self->gi_exc_state; tstate->exc_info = exc_state->previous_item; exc_state->previous_item = NULL; __Pyx_Coroutine_ResetFrameBackpointer(exc_state); #endif return retval; } static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { PyObject *exc_tb = exc_state->exc_traceback; if (likely(exc_tb)) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); #endif } } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) { if (unlikely(!retval)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (!__Pyx_PyErr_Occurred()) { PyObject *exc = PyExc_StopIteration; #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) exc = __Pyx_PyExc_StopAsyncIteration; #endif __Pyx_PyErr_SetNone(exc); } } return retval; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) static CYTHON_INLINE PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { #if PY_VERSION_HEX <= 0x030A00A1 return _PyGen_Send(gen, arg); #else PyObject *result; if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { if (PyAsyncGen_CheckExact(gen)) { assert(result == Py_None); PyErr_SetNone(PyExc_StopAsyncIteration); } else if (result == Py_None) { PyErr_SetNone(PyExc_StopIteration); } else { _PyGen_SetStopIterationValue(result); } Py_CLEAR(result); } return result; #endif } #endif static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); ret = __Pyx_Coroutine_SendEx(gen, val, 0); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { ret = __Pyx_async_gen_asend_send(yf, value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyCoro_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif { if (value == Py_None) ret = Py_TYPE(yf)->tp_iternext(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value, 0); } return __Pyx_Coroutine_MethodReturn(self, retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); if (!retval) return -1; } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { retval = __Pyx_async_gen_asend_close(yf, NULL); } else if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { retval = __Pyx_async_gen_athrow_close(yf, NULL); } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Next(yf); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, Py_None); } else #endif ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None, 0); } static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __Pyx_Coroutine_Close(self); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); if (unlikely(retval)) { const char *msg; Py_DECREF(retval); if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(self)) { msg = "coroutine ignored GeneratorExit"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(self)) { #if PY_VERSION_HEX < 0x03060000 msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; #else msg = "async generator ignored GeneratorExit"; #endif #endif } else { msg = "generator ignored GeneratorExit"; } PyErr_SetString(PyExc_RuntimeError, msg); return NULL; } raised_exception = PyErr_Occurred(); if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, PyObject *args, int close_on_genexit) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; Py_INCREF(yf); if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); goto throw_here; } gen->is_running = 1; if (0 #ifdef __Pyx_Generator_USED || __Pyx_Generator_CheckExact(yf) #endif #ifdef __Pyx_Coroutine_USED || __Pyx_Coroutine_Check(yf) #endif ) { ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); #ifdef __Pyx_Coroutine_USED } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); #endif } else { PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } if (likely(args)) { ret = PyObject_CallObject(meth, args); } else { ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL); } Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(self, ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { PyObject *typ; PyObject *val = NULL; PyObject *tb = NULL; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); } static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { Py_VISIT(exc_state->exc_type); Py_VISIT(exc_state->exc_value); Py_VISIT(exc_state->exc_traceback); return 0; } static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); } #endif Py_CLEAR(gen->gi_code); Py_CLEAR(gen->gi_frame); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); Py_CLEAR(gen->gi_modulename); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label >= 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (Py_REFCNT(self) > 0) #endif { return; } PyObject_GC_UnTrack(self); } #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { /* We have to handle this case for asynchronous generators right here, because this code has to be between UNTRACK and GC_Del. */ Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); } #endif __Pyx_Coroutine_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; __Pyx_PyThreadState_declare if (gen->resume_label < 0) { return; } #if !CYTHON_USE_TP_FINALIZE assert(self->ob_refcnt == 0); __Pyx_SET_REFCNT(self, 1); #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; PyObject *finalizer = agen->ag_finalizer; if (finalizer && !agen->ag_closed) { PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); if (unlikely(!res)) { PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } __Pyx_ErrRestore(error_type, error_value, error_traceback); return; } } #endif if (unlikely(gen->resume_label == 0 && !error_value)) { #ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Generator_USED if (!__Pyx_Generator_CheckExact(self)) #endif { PyObject_GC_UnTrack(self); #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat) if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) PyErr_WriteUnraisable(self); #else {PyObject *msg; char *cmsg; #if CYTHON_COMPILING_IN_PYPY msg = NULL; cmsg = (char*) "coroutine was never awaited"; #else char *cname; PyObject *qualname; qualname = gen->gi_qualname; cname = PyString_AS_STRING(qualname); msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); if (unlikely(!msg)) { PyErr_Clear(); cmsg = (char*) "coroutine was never awaited"; } else { cmsg = PyString_AS_STRING(msg); } #endif if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) PyErr_WriteUnraisable(self); Py_XDECREF(msg);} #endif PyObject_GC_Track(self); } #endif } else { PyObject *res = __Pyx_Coroutine_Close(self); if (unlikely(!res)) { if (PyErr_Occurred()) PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } } __Pyx_ErrRestore(error_type, error_value, error_traceback); #if !CYTHON_USE_TP_FINALIZE assert(Py_REFCNT(self) > 0); if (--self->ob_refcnt == 0) { return; } { Py_ssize_t refcnt = Py_REFCNT(self); _Py_NewReference(self); __Pyx_SET_REFCNT(self, refcnt); } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(Py_TYPE(self)) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_name; if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = self->gi_name; Py_INCREF(value); self->gi_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_qualname; if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = self->gi_qualname; Py_INCREF(value); self->gi_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *frame = self->gi_frame; if (!frame) { if (unlikely(!self->gi_code)) { Py_RETURN_NONE; } frame = (PyObject *) PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (unlikely(!frame)) return NULL; self->gi_frame = frame; } Py_INCREF(frame); return frame; } static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (unlikely(!gen)) return NULL; return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); } static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; gen->gi_exc_state.exc_traceback = NULL; #if CYTHON_USE_EXC_INFO_STACK gen->gi_exc_state.previous_item = NULL; #endif gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; Py_XINCREF(module_name); gen->gi_modulename = module_name; Py_XINCREF(code); gen->gi_code = code; gen->gi_frame = NULL; PyObject_GC_Track(gen); return gen; } /* PatchModuleWithCoroutine */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; globals = PyDict_New(); if (unlikely(!globals)) goto ignore; result = PyDict_SetItemString(globals, "_cython_coroutine_type", #ifdef __Pyx_Coroutine_USED (PyObject*)__pyx_CoroutineType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; result = PyDict_SetItemString(globals, "_cython_generator_type", #ifdef __Pyx_Generator_USED (PyObject*)__pyx_GeneratorType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; result_obj = PyRun_String(py_code, Py_file_input, globals, globals); if (unlikely(!result_obj)) goto ignore; Py_DECREF(result_obj); Py_DECREF(globals); return module; ignore: Py_XDECREF(globals); PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else py_code++; #endif return module; } /* PatchGeneratorABC */ #ifndef CYTHON_REGISTER_ABCS #define CYTHON_REGISTER_ABCS 1 #endif #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (CYTHON_REGISTER_ABCS && !abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); if (!module) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_MAJOR_VERSION >= 3) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } /* Generator */ static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, (char*) PyDoc_STR("Frame of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if CYTHON_USE_TP_FINALIZE 0, #else __Pyx_Coroutine_del, #endif 0, #if CYTHON_USE_TP_FINALIZE __Pyx_Coroutine_del, #elif PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } /* CheckBinaryVersion */ static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", type_name, type_name, Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */
8,771,017
44.361078
1,743
c
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_alldiff.py
import pytest networkx = pytest.importorskip("networkx") from pyscipopt import Model, Conshdlr, SCIP_RESULT, SCIP_PARAMEMPHASIS, SCIP_PARAMSETTING try: from types import SimpleNamespace except: class SimpleNamespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) def __repr__(self): keys = sorted(self.__dict__) items = ("{}={!r}".format(k, self.__dict__[k]) for k in keys) return "{}({})".format(type(self).__name__, ", ".join(items)) def __eq__(self, other): return self.__dict__ == other.__dict__ #initial Sudoku values init = [5, 3, 0, 0, 7, 0, 0, 0, 0, 6, 0, 0, 1, 9, 5, 0, 0, 0, 0, 9, 8, 0, 0, 0, 0, 6, 0, 8, 0, 0, 0, 6, 0, 0, 0, 3, 4, 0, 0, 8, 0, 3, 0, 0, 1, 7, 0, 0, 0, 2, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 2, 8, 0, 0, 0, 0, 4, 1, 9, 0, 0, 5, 0, 0, 0, 0, 8, 0, 0, 7, 9] def plot_graph(G): plt = pytest.importorskip("matplotlib.pyplot") X,Y = networkx.bipartite.sets(G) pos = dict() pos.update( (n, (1, i)) for i, n in enumerate(X) ) # put nodes from X at x=1 pos.update( (n, (2, i)) for i, n in enumerate(Y) ) # put nodes from Y at x=2 networkx.draw(G, pos=pos, with_labels=False) labels = {} for node in G.nodes(): labels[node] = node networkx.draw_networkx_labels(G, pos, labels) plt.show() # all different constraint handler class ALLDIFFconshdlr(Conshdlr): # value graph: bipartite graph between variables and the union of their domains # an edge connects a variable and a value iff the value is in the variable's domain def build_value_graph(self, vars, domains): #print(domains) vals = set([]) for var in vars: #print("domain of var ", var.name, "is ", domains[var]) vals.update(domains[var.ptr()]) # vals = vals union domains[var] G = networkx.Graph() G.add_nodes_from((var.name for var in vars), bipartite = 0) # add vars names as nodes G.add_nodes_from(vals, bipartite = 1) # add union of values as nodes for var in vars: for value in domains[var.ptr()]: G.add_edge(var.name, value) return G, vals # propagates single constraint: uses Regin's Algorithm as described in # https://www.ps.uni-saarland.de/courses/seminar-ws04/papers/anastasatos.pdf # The idea is that every solution of an all different constraint corresponds to a maximal matching in # a bipartite graph (see value graph). Furthermore, if an arc of this arc is in no maximal matching, then # one can remove it. Removing and arc corresponds to remove a value in the domain of the variable. # So what the algorithm does is to determine which arcs can be in a maximal matching. Graph theory help # us build fast algorithm so that we don't have to compute all possible maximal matchings ;) # That being said, the implementation is pretty naive and brute-force, so there is a lot of room for improvement def propagate_cons(self, cons): #print("propagating cons %s with id %d"%(cons.name, id(cons))) vars = cons.data.vars domains = cons.data.domains # TODO: would be nice to have a flag to know whether we should propagate the constraint. # We would need an event handler to let us know whenever a variable of our constraint changed its domain # Currently we can't write event handlers in python. G, vals = self.build_value_graph(vars, domains) try: M = networkx.bipartite.maximum_matching(G) # returns dict between nodes in matching except: top_nodes = {n for n, d in G.nodes(data=True) if d['bipartite'] == 0} bottom_nodes = set(G) - top_nodes M = networkx.bipartite.maximum_matching(G, top_nodes) # returns dict between nodes in matching if( len(M)/2 < len(vars) ): #print("it is infeasible: max matching of card ", len(M), " M: ", M) #print("Its value graph:\nV = ", G.nodes(), "\nE = ", G.edges()) plot_graph(G) return SCIP_RESULT.CUTOFF # build auxiliary directed graph: direct var -> val if [var, val] is in matching, otherwise var <- val # note that all vars are matched D = networkx.DiGraph() D.add_nodes_from(G) ## this seems to work for var in vars: D.add_edge(var.name, M[var.name]) for val in domains[var.ptr()]: if val != M[var.name]: D.add_edge(val, var.name) # find arcs that *do not* need to be removed and *remove* them from G. All remaining edges of G # should be use to remove values from the domain of variables # get all free vertices V = set(G.nodes()) V_matched = set(M) V_free = V.difference(V_matched) #print("matched nodes ", V_matched, "\nfree nodes ", V_free) # TODO quit() << this produces an assertion # no variable should be free! for var in vars: assert var.name not in V_free # perform breadth first search starting from free vertices and mark all visited edges as useful for v in V_free: visited_edges = networkx.bfs_edges(D, v) G.remove_edges_from(visited_edges) # compute strongly connected components of D and mark edges on the cc as useful for g in networkx.strongly_connected_components(D): for e in D.subgraph(g).edges(): if G.has_edge(*e): G.remove_edge(*e) # cannot remove edges in matching! for var in vars: e = (var.name, M[var.name]) if G.has_edge(*e): G.remove_edge(*e) # check that there is something to remove if G.size() == 0: return SCIP_RESULT.DIDNOTFIND #print("Edges to remove!", G.edges()) # remove values for var in vars: for val in domains[var.ptr()].copy(): if G.has_edge(var.name, val): domains[var.ptr()].remove(val) # this asserts if value is not there and we shouldn't delete two times the same value # "fix" variable when possible for var in vars: #print("domain of var ", var.name, "is ", domains[var]) minval = min(domains[var.ptr()]) maxval = max(domains[var.ptr()]) if var.getLbLocal() < minval: self.model.chgVarLb(var, minval) if var.getUbLocal() > maxval: self.model.chgVarUb(var, maxval) #print("bounds of ", var, "are (%d,%d)"%(minval,maxval)) return SCIP_RESULT.REDUCEDDOM # propagator callback def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming): # I have no idea what to return, documentation? result = SCIP_RESULT.DIDNOTFIND for cons in constraints: prop_result = self.propagate_cons(cons) if prop_result == SCIP_RESULT.CUTOFF: result = prop_result break if prop_result == SCIP_RESULT.REDUCEDDOM: result = prop_result return {"result": result} def is_cons_feasible(self, cons, solution = None): #print("checking feasibility of constraint %s id: %d"%(cons.name, id(cons))) sol_values = set() for var in cons.data.vars: sol_values.add(round(self.model.getSolVal(solution, var))) #print("sol_values = ", sol_values) return len(sol_values) == len(cons.data.vars) # checks whether solution is feasible, ie, if they are all different # since the checkpriority is < 0, we are only called if the integrality # constraint handler didn't find infeasibility, so solution is integral def conscheck(self, constraints, solution, check_integrality, check_lp_rows, print_reason, completely): for cons in constraints: if not self.is_cons_feasible(cons, solution): return {"result": SCIP_RESULT.INFEASIBLE} return {"result": SCIP_RESULT.FEASIBLE} # enforces LP solution def consenfolp(self, constraints, n_useful_conss, sol_infeasible): for cons in constraints: if not self.is_cons_feasible(cons): # TODO: suggest some value to branch on return {"result": SCIP_RESULT.INFEASIBLE} return {"result": SCIP_RESULT.FEASIBLE} def conslock(self, constraint, locktype, nlockspos, nlocksneg): for var in constraint.data.vars: self.model.addVarLocks(var, nlockspos + nlocksneg , nlockspos + nlocksneg) def constrans(self, constraint): #print("CONSTRANS BEING CAAAAAAAAAAAAAAAAAAAALLLLLLED") return {} # builds sudoku model; adds variables and all diff constraints def create_sudoku(): scip = Model("Sudoku") x = {} # values of squares for row in range(9): for col in range(9): # some variables are fix if init[row*9 + col] != 0: x[row,col] = scip.addVar(vtype = "I", lb = init[row*9 + col], ub = init[row*9 + col], name = "x(%s,%s)" % (row,col)) else: x[row,col] = scip.addVar(vtype = "I", lb = 1, ub = 9, name = "x(%s,%s)" % (row,col)) var = x[row,col] #print("built var ", var.name, " with bounds: (%d,%d)"%(var.getLbLocal(), var.getUbLocal())) conshdlr = ALLDIFFconshdlr() # hoping to get called when all vars have integer values scip.includeConshdlr(conshdlr, "ALLDIFF", "All different constraint", propfreq = 1, enfopriority = -10, chckpriority = -10) # row constraints; also we specify the domain of all variables here # TODO/QUESTION: in principle domain is of course associated to the var and not the constraint. it should be "var.data" # But ideally that information would be handle by SCIP itself... the reason we can't is because domain holes is not implemented, right? domains = {} for row in range(9): vars = [] for col in range(9): var = x[row,col] vars.append(var) vals = set(range(int(round(var.getLbLocal())), int(round(var.getUbLocal())) + 1)) domains[var.ptr()] = vals # this is kind of ugly, isn't it? cons = scip.createCons(conshdlr, "row_%d" % row) #print("in test: received a constraint with id ", id(cons)) ### DELETE cons.data = SimpleNamespace() # so that data behaves like an instance of a class (ie, cons.data.whatever is allowed) cons.data.vars = vars cons.data.domains = domains scip.addPyCons(cons) # col constraints for col in range(9): vars = [] for row in range(9): var = x[row,col] vars.append(var) cons = scip.createCons(conshdlr, "col_%d"%col) cons.data = SimpleNamespace() cons.data.vars = vars cons.data.domains = domains scip.addPyCons(cons) # square constraints for idx1 in range(3): for idx2 in range(3): vars = [] for row in range(3): for col in range(3): var = x[3*idx1 + row, 3*idx2 + col] vars.append(var) cons = scip.createCons(conshdlr, "square_%d-%d"%(idx1, idx2)) cons.data = SimpleNamespace() cons.data.vars = vars cons.data.domains = domains scip.addPyCons(cons) #scip.setObjective() return scip, x def test_main(): scip, x = create_sudoku() #scip.setBoolParam("misc/allowdualreds", False) scip.setBoolParam("misc/allowdualreds", False) scip.setEmphasis(SCIP_PARAMEMPHASIS.CPSOLVER) scip.setPresolve(SCIP_PARAMSETTING.OFF) scip.optimize() if scip.getStatus() != 'optimal': print('Sudoku is not feasible!') else: print('\nSudoku solution:\n') for row in range(9): out = '' for col in range(9): out += str(round(scip.getVal(x[row,col]))) + ' ' print(out) if __name__ == "__main__": test_main()
12,268
39.094771
139
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_benders.py
""" flp-benders.py: model for solving the capacitated facility location problem using Benders' decomposition minimize the total (weighted) travel cost from n customers to some facilities with fixed costs and capacities. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ from pyscipopt import Model, quicksum, multidict, SCIP_PARAMSETTING import pdb def flp(I,J,d,M,f,c): """flp -- model for the capacitated facility location problem Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j Returns a model, ready to be solved. """ master = Model("flp-master") subprob = Model("flp-subprob") # creating the problem y = {} for j in J: y[j] = master.addVar(vtype="B", name="y(%s)"%j) master.setObjective( quicksum(f[j]*y[j] for j in J), "minimize") master.data = y # creating the subproblem x,y = {},{} for j in J: y[j] = subprob.addVar(vtype="B", name="y(%s)"%j) for i in I: x[i,j] = subprob.addVar(vtype="C", name="x(%s,%s)"%(i,j)) for i in I: subprob.addCons(quicksum(x[i,j] for j in J) == d[i], "Demand(%s)"%i) for j in M: subprob.addCons(quicksum(x[i,j] for i in I) <= M[j]*y[j], "Capacity(%s)"%i) for (i,j) in x: subprob.addCons(x[i,j] <= d[i]*y[j], "Strong(%s,%s)"%(i,j)) subprob.setObjective( quicksum(c[i,j]*x[i,j] for i in I for j in J), "minimize") subprob.data = x,y return master, subprob def make_data(): I,d = multidict({1:80, 2:270, 3:250, 4:160, 5:180}) # demand J,M,f = multidict({1:[500,1000], 2:[500,1000], 3:[500,1000]}) # capacity, fixed costs c = {(1,1):4, (1,2):6, (1,3):9, # transportation costs (2,1):5, (2,2):4, (2,3):7, (3,1):6, (3,2):3, (3,3):4, (4,1):8, (4,2):5, (4,3):3, (5,1):10, (5,2):8, (5,3):4, } return I,J,d,M,f,c def test_flpbenders(): ''' test the Benders' decomposition plugins with the facility location problem. ''' I,J,d,M,f,c = make_data() master, subprob = flp(I,J,d,M,f,c) # initializing the default Benders' decomposition with the subproblem master.setPresolve(SCIP_PARAMSETTING.OFF) master.setBoolParam("misc/allowdualreds", False) master.setBoolParam("benders/copybenders", False) master.initBendersDefault(subprob) # optimizing the problem using Benders' decomposition master.optimize() # solving the subproblems to get the best solution master.computeBestSolSubproblems() EPS = 1.e-6 y = master.data facilities = [j for j in y if master.getVal(y[j]) > EPS] x, suby = subprob.data edges = [(i,j) for (i,j) in x if subprob.getVal(x[i,j]) > EPS] print("Optimal value:", master.getObjVal()) print("Facilities at nodes:", facilities) print("Edges:", edges) master.printStatistics() # since computeBestSolSubproblems() was called above, we need to free the # subproblems. This must happen after the solution is extracted, otherwise # the solution will be lost master.freeBendersSubproblems() assert master.getObjVal() == 5.61e+03 if __name__ == "__main__": test_flpbenders()
3,451
29.280702
105
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_branch_probing_lp.py
from pyscipopt import Model, Branchrule, SCIP_RESULT, quicksum class MyBranching(Branchrule): def __init__(self, model, cont): self.model = model self.cont = cont self.count = 0 self.was_called_val = False self.was_called_int = False def branchexeclp(self, allowaddcons): self.count += 1 if self.count >= 2: return {"result": SCIP_RESULT.DIDNOTRUN} assert allowaddcons assert not self.model.inRepropagation() assert not self.model.inProbing() self.model.startProbing() assert not self.model.isObjChangedProbing() self.model.fixVarProbing(self.cont, 2.0) self.model.constructLP() self.model.solveProbingLP() self.model.getLPObjVal() self.model.endProbing() self.integral = self.model.getLPBranchCands()[0][0] if self.count == 1: down, eq, up = self.model.branchVarVal(self.cont, 1.3) self.model.chgVarLbNode(down, self.cont, -1.5) self.model.chgVarUbNode(up, self.cont, 3.0) self.was_called_val = True down2, eq2, up2 = self.model.branchVar(self.integral) self.was_called_int = True self.model.createChild(6, 7) return {"result": SCIP_RESULT.BRANCHED} m = Model() m.setIntParam("presolving/maxrounds", 0) #m.setLongintParam("lp/rootiterlim", 3) m.setRealParam("limits/time", 60) x0 = m.addVar(lb=-2, ub=4) r1 = m.addVar() r2 = m.addVar() y0 = m.addVar(lb=3) t = m.addVar(lb=None) l = m.addVar(vtype="I", lb=-9, ub=18) u = m.addVar(vtype="I", lb=-3, ub=99) more_vars = [] for i in range(1000): more_vars.append(m.addVar(vtype="I", lb= -12, ub=40)) m.addCons(quicksum(v for v in more_vars) <= (40 - i) * quicksum(v for v in more_vars[::2])) for i in range(1000): more_vars.append(m.addVar(vtype="I", lb= -52, ub=10)) m.addCons(quicksum(v for v in more_vars[50::2]) <= (40 - i) * quicksum(v for v in more_vars[405::2])) m.addCons(r1 >= x0) m.addCons(r2 >= -x0) m.addCons(y0 == r1 +r2) #m.addCons(t * l + l * u >= 4) m.addCons(t + l + 7* u <= 300) m.addCons(t >= quicksum(v for v in more_vars[::3]) - 10 * more_vars[5] + 5* more_vars[9]) m.addCons(more_vars[3] >= l + 2) m.addCons(7 <= quicksum(v for v in more_vars[::4]) - x0) m.addCons(quicksum(v for v in more_vars[::2]) + l <= quicksum(v for v in more_vars[::4])) m.setObjective(t - quicksum(j*v for j, v in enumerate(more_vars[20:-40]))) #m.addCons(t >= r1 * (r1 - x0) + r2 * (r2 + x0)) my_branchrule = MyBranching(m, x0) m.includeBranchrule(my_branchrule, "test branch", "test branching and probing and lp functions", priority=10000000, maxdepth=3, maxbounddist=1) m.optimize() print("x0", m.getVal(x0)) print("r1", m.getVal(r1)) print("r2", m.getVal(r2)) print("y0", m.getVal(y0)) print("t", m.getVal(t)) assert my_branchrule.was_called_val assert my_branchrule.was_called_int
2,957
29.494845
105
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_conshdlr.py
from pyscipopt import Model, Conshdlr, SCIP_RESULT, SCIP_PRESOLTIMING, SCIP_PROPTIMING from sys import version_info if version_info >= (3, 3): from types import SimpleNamespace else: class SimpleNamespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) def __repr__(self): keys = sorted(self.__dict__) items = ("{}={!r}".format(k, self.__dict__[k]) for k in keys) return "{}({})".format(type(self).__name__, ", ".join(items)) def __eq__(self, other): return self.__dict__ == other.__dict__ ## callbacks which are not implemented yet: # PyConsGetdivebdchgs # PyConsGetvars # PyConsCopy ## callbacks which are not tested here are: # consenfops # consresprop # conscopy # consparse # consgetvars # consgetdivebdchgs ## callbacks which are not called are: # conssepasol # consdelvars # consprint ids = [] calls = set([]) class MyConshdlr(Conshdlr): def __init__(self, shouldtrans, shouldcopy): self.shouldtrans = shouldtrans self.shouldcopy = shouldcopy def createData(self, constraint, nvars, othername): print("Creating data for my constraint: %s"%constraint.name) constraint.data = SimpleNamespace() constraint.data.nvars = nvars constraint.data.myothername = othername ## fundamental callbacks ## def consenfolp(self, constraints, nusefulconss, solinfeasible): calls.add("consenfolp") for constraint in constraints: assert id(constraint) in ids return {"result": SCIP_RESULT.FEASIBLE} # consenfops def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely): calls.add("conscheck") for constraint in constraints: assert id(constraint) in ids return {"result": SCIP_RESULT.FEASIBLE} def conslock(self, constraint, locktype, nlockspos, nlocksneg): calls.add("conslock") assert id(constraint) in ids ## callbacks ## def consfree(self): calls.add("consfree") def consinit(self, constraints): calls.add("consinit") for constraint in constraints: assert id(constraint) in ids def consexit(self, constraints): calls.add("consexit") for constraint in constraints: assert id(constraint) in ids def consinitpre(self, constraints): calls.add("consinitpre") for constraint in constraints: assert id(constraint) in ids def consexitpre(self, constraints): calls.add("consexitpre") for constraint in constraints: assert id(constraint) in ids def consinitsol(self, constraints): calls.add("consinitsol") for constraint in constraints: assert id(constraint) in ids def consexitsol(self, constraints, restart): calls.add("consexitsol") for constraint in constraints: assert id(constraint) in ids def consdelete(self, constraint): calls.add("consdelete") assert id(constraint) in ids def constrans(self, sourceconstraint): calls.add("constrans") assert id(sourceconstraint) in ids if self.shouldtrans: transcons = self.model.createCons(self, "transformed_" + sourceconstraint.name) ids.append(id(transcons)) return {"targetcons" : transcons} return {} def consinitlp(self, constraints): calls.add("consinitlp") for constraint in constraints: assert id(constraint) in ids return {} def conssepalp(self, constraints, nusefulconss): calls.add("conssepalp") for constraint in constraints: assert id(constraint) in ids return {} def conssepasol(self, constraints, nusefulconss, solution): calls.add("conssepasol") for constraint in constraints: assert id(constraint) in ids return {} def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming): calls.add("consprop") for constraint in constraints: assert id(constraint) in ids return {} def conspresol(self, constraints, nrounds, presoltiming, nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict): calls.add("conspresol") return result_dict # consresprop def consactive(self, constraint): calls.add("consactive") assert id(constraint) in ids def consdeactive(self, constraint): calls.add("consdeactive") assert id(constraint) in ids def consenable(self, constraint): calls.add("consenable") assert id(constraint) in ids def consdisable(self, constraint): calls.add("consdisable") assert id(constraint) in ids def consdelvars(self, constraints): calls.add("consdelvars") for constraint in constraints: assert id(constraint) in ids def consprint(self, constraint): calls.add("consprint") assert id(constraint) in ids # conscopy # consparse # consgetvars def consgetnvars(self, constraint): calls.add("consgetnvars") assert id(constraint) in ids return {"nvars": 1, "success": True} # consgetdivebdchgs def test_conshdlr(): def create_model(): # create solver instance s = Model() # add some variables x = s.addVar("x", obj = -1.0, vtype = "I", lb=-10) y = s.addVar("y", obj = 1.0, vtype = "I", lb=-1000) z = s.addVar("z", obj = 1.0, vtype = "I", lb=-1000) # add some constraint s.addCons(314*x + 867*y + 860*z == 363) s.addCons(87*x + 875*y - 695*z == 423) # create conshdlr and include it to SCIP conshdlr = MyConshdlr(shouldtrans=True, shouldcopy=False) s.includeConshdlr(conshdlr, "PyCons", "custom constraint handler implemented in python", sepapriority = 1, enfopriority = 1, chckpriority = 1, sepafreq = 10, propfreq = 50, eagerfreq = 1, maxprerounds = -1, delaysepa = False, delayprop = False, needscons = True, presoltiming = SCIP_PRESOLTIMING.FAST, proptiming = SCIP_PROPTIMING.BEFORELP) cons1 = s.createCons(conshdlr, "cons1name") ids.append(id(cons1)) cons2 = s.createCons(conshdlr, "cons2name") ids.append(id(cons2)) conshdlr.createData(cons1, 10, "cons1_anothername") conshdlr.createData(cons2, 12, "cons2_anothername") # add these constraints s.addPyCons(cons1) s.addPyCons(cons2) return s s = create_model() # solve problem s.optimize() # so that consfree gets called del s # check callbacks got called assert "consenfolp" in calls assert "conscheck" in calls assert "conslock" in calls assert "consfree" in calls assert "consinit" in calls assert "consexit" in calls assert "consinitpre" in calls assert "consexitpre" in calls assert "consinitsol" in calls assert "consexitsol" in calls assert "consdelete" in calls assert "constrans" in calls assert "consinitlp" in calls assert "conssepalp" in calls #assert "conssepasol" in calls assert "consprop" in calls assert "conspresol" in calls assert "consactive" in calls assert "consdeactive" in calls assert "consenable" in calls assert "consdisable" in calls #assert "consdelvars" in calls #assert "consprint" in calls assert "consgetnvars" in calls if __name__ == "__main__": test_conshdlr()
7,831
29.59375
115
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_copy.py
from pyscipopt import Model def test_copy(): # create solver instance s = Model() # add some variables x = s.addVar("x", vtype = 'C', obj = 1.0) y = s.addVar("y", vtype = 'C', obj = 2.0) s.setObjective(4.0 * y, clear = False) c = s.addCons(x + 2 * y >= 1.0) s2 = Model(sourceModel=s) # solve problems s.optimize() s2.optimize() assert s.getObjVal() == s2.getObjVal() if __name__ == "__main__": test_copy()
465
18.416667
45
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_event.py
import pytest from pyscipopt import Model, Eventhdlr, SCIP_RESULT, SCIP_EVENTTYPE, SCIP_PARAMSETTING calls = [] class MyEvent(Eventhdlr): def eventinit(self): calls.append('eventinit') self.model.catchEvent(SCIP_EVENTTYPE.FIRSTLPSOLVED, self) def eventexit(self): calls.append('eventexit') self.model.dropEvent(SCIP_EVENTTYPE.FIRSTLPSOLVED, self) def eventexec(self, event): calls.append('eventexec') event.getNewBound() event.getOldBound() assert event.getNode().getNumber() == 1 def test_event(): # create solver instance s = Model() s.hideOutput() s.setPresolve(SCIP_PARAMSETTING.OFF) eventhdlr = MyEvent() s.includeEventhdlr(eventhdlr, "TestFirstLPevent", "python event handler to catch FIRSTLPEVENT") # add some variables x = s.addVar("x", obj=1.0) y = s.addVar("y", obj=2.0) # add some constraint s.addCons(x + 2*y >= 5) # solve problem s.optimize() # print solution assert round(s.getVal(x)) == 5.0 assert round(s.getVal(y)) == 0.0 del s assert 'eventinit' in calls assert 'eventexit' in calls assert 'eventexec' in calls assert len(calls) == 3 if __name__ == "__main__": test_event()
1,270
22.537037
99
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_expr.py
import pytest from pyscipopt import Model, sqrt, log, exp from pyscipopt.scip import Expr, GenExpr, ExprCons, Term, quicksum @pytest.fixture(scope="module") def model(): m = Model() x = m.addVar("x") y = m.addVar("y") z = m.addVar("z") return m, x, y, z CONST = Term() def test_upgrade(model): m, x, y, z = model expr = x + y assert isinstance(expr, Expr) expr += exp(z) assert isinstance(expr, GenExpr) expr = x + y assert isinstance(expr, Expr) expr -= exp(z) assert isinstance(expr, GenExpr) expr = x + y assert isinstance(expr, Expr) expr /= x assert isinstance(expr, GenExpr) expr = x + y assert isinstance(expr, Expr) expr *= sqrt(x) assert isinstance(expr, GenExpr) expr = x + y assert isinstance(expr, Expr) expr **= 1.5 assert isinstance(expr, GenExpr) expr = x + y assert isinstance(expr, Expr) assert isinstance(expr + exp(x), GenExpr) assert isinstance(expr - exp(x), GenExpr) assert isinstance(expr/x, GenExpr) assert isinstance(expr * x**1.2, GenExpr) assert isinstance(sqrt(expr), GenExpr) assert isinstance(abs(expr), GenExpr) assert isinstance(log(expr), GenExpr) assert isinstance(exp(expr), GenExpr) with pytest.raises(ZeroDivisionError): expr /= 0.0 def test_genexpr_op_expr(model): m, x, y, z = model genexpr = x**1.5 + y assert isinstance(genexpr, GenExpr) genexpr += x**2 assert isinstance(genexpr, GenExpr) genexpr += 1 assert isinstance(genexpr, GenExpr) genexpr += x assert isinstance(genexpr, GenExpr) genexpr += 2 * y assert isinstance(genexpr, GenExpr) genexpr -= x**2 assert isinstance(genexpr, GenExpr) genexpr -= 1 assert isinstance(genexpr, GenExpr) genexpr -= x assert isinstance(genexpr, GenExpr) genexpr -= 2 * y assert isinstance(genexpr, GenExpr) genexpr *= x + y assert isinstance(genexpr, GenExpr) genexpr *= 2 assert isinstance(genexpr, GenExpr) genexpr /= 2 assert isinstance(genexpr, GenExpr) genexpr /= x + y assert isinstance(genexpr, GenExpr) assert isinstance(x**1.2 + x + y, GenExpr) assert isinstance(x**1.2 - x, GenExpr) assert isinstance(x**1.2 *(x+y), GenExpr) def test_genexpr_op_genexpr(model): m, x, y, z = model genexpr = x**1.5 + y assert isinstance(genexpr, GenExpr) genexpr **= 2.2 assert isinstance(genexpr, GenExpr) genexpr += exp(x) assert isinstance(genexpr, GenExpr) genexpr -= exp(x) assert isinstance(genexpr, GenExpr) genexpr /= log(x + 1) assert isinstance(genexpr, GenExpr) genexpr *= (x + y)**1.2 assert isinstance(genexpr, GenExpr) genexpr /= exp(2) assert isinstance(genexpr, GenExpr) genexpr /= x + y assert isinstance(genexpr, GenExpr) genexpr = x**1.5 + y assert isinstance(genexpr, GenExpr) assert isinstance(sqrt(x) + genexpr, GenExpr) assert isinstance(exp(x) + genexpr, GenExpr) assert isinstance(1/x + genexpr, GenExpr) assert isinstance(1/x**1.5 - genexpr, GenExpr) assert isinstance(y/x - exp(genexpr), GenExpr) # sqrt(2) is not a constant expression and # we can only power to constant expressions! with pytest.raises(NotImplementedError): genexpr **= sqrt(2) def test_degree(model): m, x, y, z = model expr = GenExpr() assert expr.degree() == float('inf') # In contrast to Expr inequalities, we can't expect much of the sides def test_inequality(model): m, x, y, z = model expr = x + 2*y assert isinstance(expr, Expr) cons = expr <= x**1.2 assert isinstance(cons, ExprCons) assert isinstance(cons.expr, GenExpr) assert cons._lhs is None assert cons._rhs == 0.0 assert isinstance(expr, Expr) cons = expr >= x**1.2 assert isinstance(cons, ExprCons) assert isinstance(cons.expr, GenExpr) assert cons._lhs == 0.0 assert cons._rhs is None assert isinstance(expr, Expr) cons = expr >= 1 + x**1.2 assert isinstance(cons, ExprCons) assert isinstance(cons.expr, GenExpr) assert cons._lhs == 0.0 # NOTE: the 1 is pass the the other side because of the way GenExprs work assert cons._rhs is None assert isinstance(expr, Expr) cons = exp(expr) <= 1 + x**1.2 assert isinstance(cons, ExprCons) assert isinstance(cons.expr, GenExpr) assert cons._rhs == 0.0 assert cons._lhs is None def test_equation(model): m, x, y, z = model equat = 2*x**1.2 - 3*sqrt(y) == 1 assert isinstance(equat, ExprCons) assert equat._lhs == equat._rhs assert equat._lhs == 1.0 equat = exp(x+2*y) == 1 + x**1.2 assert isinstance(equat, ExprCons) assert isinstance(equat.expr, GenExpr) assert equat._lhs == equat._rhs assert equat._lhs == 0.0 equat = x == 1 + x**1.2 assert isinstance(equat, ExprCons) assert isinstance(equat.expr, GenExpr) assert equat._lhs == equat._rhs assert equat._lhs == 0.0
5,031
27.590909
101
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_gomory.py
import pytest from pyscipopt import Model, Sepa, SCIP_RESULT, SCIP_PARAMSETTING from pyscipopt.scip import is_memory_freed class GMI(Sepa): def __init__(self): self.ncuts = 0 def getGMIFromRow(self, cols, rows, binvrow, binvarow, primsol): """ Given the row (binvarow, binvrow) of the tableau, computes gomory cut :param primsol: is the rhs of the tableau row. :param cols: are the variables :param rows: are the slack variables :param binvrow: components of the tableau row associated to the basis inverse :param binvarow: components of the tableau row associated to the basis inverse * A The GMI is given by sum(f_j x_j , j in J_I s.t. f_j <= f_0) + sum((1-f_j)*f_0/(1 - f_0) x_j, j in J_I s.t. f_j > f_0) + sum(a_j x_j, , j in J_C s.t. a_j >= 0) - sum(a_j*f_0/(1-f_0) x_j , j in J_C s.t. a_j < 0) >= f_0. where J_I are the integer non-basic variables and J_C are the continuous. f_0 is the fractional part of primsol a_j is the j-th coefficient of the row and f_j its fractional part Note: we create -% <= -f_0 !! Note: this formula is valid for a problem of the form Ax = b, x>= 0. Since we do not have such problem structure in general, we have to (implicitely) transform whatever we are given to that form. Specifically, non-basic variables at their lower bound are shifted so that the lower bound is 0 and non-basic at their upper bound are complemented. """ # initialize cutcoefs = [0] * len(cols) cutrhs = 0 # get scip scip = self.model # Compute cut fractionality f0 and f0/(1-f0) f0 = scip.frac(primsol) ratiof0compl = f0/(1-f0) # rhs of the cut is the fractional part of the LP solution for the basic variable cutrhs = -f0 # Generate cut coefficients for the original variables for c in range(len(cols)): col = cols[c] assert col is not None # is this the equivalent of col != NULL? does it even make sense to have this assert? status = col.getBasisStatus() # Get simplex tableau coefficient if status == "lower": # Take coefficient if nonbasic at lower bound rowelem = binvarow[c] elif status == "upper": # Flip coefficient if nonbasic at upper bound: x --> u - x rowelem = -binvarow[c] else: # variable is nonbasic free at zero -> cut coefficient is zero, skip OR # variable is basic, skip assert status == "zero" or status == "basic" continue # Integer variables if col.isIntegral(): # warning: because of numerics cutelem < 0 is possible (though the fractional part is, mathematically, always positive) # However, when cutelem < 0 it is also very close to 0, enough that isZero(cutelem) is true, so we ignore # the coefficient (see below) cutelem = scip.frac(rowelem) if cutelem > f0: # sum((1-f_j)*f_0/(1 - f_0) x_j, j in J_I s.t. f_j > f_0) + cutelem = -((1.0 - cutelem) * ratiof0compl) else: # sum(f_j x_j , j in J_I s.t. f_j <= f_0) + cutelem = -cutelem else: # Continuous variables if rowelem < 0.0: # -sum(a_j*f_0/(1-f_0) x_j , j in J_C s.t. a_j < 0) >= f_0. cutelem = rowelem * ratiof0compl else: # sum(a_j x_j, , j in J_C s.t. a_j >= 0) - cutelem = -rowelem # cut is define when variables are in [0, infty). Translate to general bounds if not scip.isZero(cutelem): if col.getBasisStatus() == "upper": cutelem = -cutelem cutrhs += cutelem * col.getUb() else: cutrhs += cutelem * col.getLb() # Add coefficient to cut in dense form cutcoefs[col.getLPPos()] = cutelem # Generate cut coefficients for the slack variables; skip basic ones for c in range(len(rows)): row = rows[c] assert row != None status = row.getBasisStatus() # free slack variable shouldn't appear assert status != "zero" # Get simplex tableau coefficient if status == "lower": # Take coefficient if nonbasic at lower bound rowelem = binvrow[row.getLPPos()] # But if this is a >= or ranged constraint at the lower bound, we have to flip the row element if not scip.isInfinity(-row.getLhs()): rowelem = -rowelem elif status == "upper": # Take element if nonbasic at upper bound - see notes at beginning of file: only nonpositive slack variables # can be nonbasic at upper, therefore they should be flipped twice and we can take the element directly. rowelem = binvrow[row.getLPPos()] else: assert status == "basic" continue # if row is integral we can strengthen the cut coefficient if row.isIntegral() and not row.isModifiable(): # warning: because of numerics cutelem < 0 is possible (though the fractional part is, mathematically, always positive) # However, when cutelem < 0 it is also very close to 0, enough that isZero(cutelem) is true (see later) cutelem = scip.frac(rowelem) if cutelem > f0: # sum((1-f_j)*f_0/(1 - f_0) x_j, j in J_I s.t. f_j > f_0) + cutelem = -((1.0 - cutelem) * ratiof0compl) else: # sum(f_j x_j , j in J_I s.t. f_j <= f_0) + cutelem = -cutelem else: # Continuous variables if rowelem < 0.0: # -sum(a_j*f_0/(1-f_0) x_j , j in J_C s.t. a_j < 0) >= f_0. cutelem = rowelem * ratiof0compl else: # sum(a_j x_j, , j in J_C s.t. a_j >= 0) - cutelem = -rowelem # cut is define in original variables, so we replace slack by its definition if not scip.isZero(cutelem): # get lhs/rhs rlhs = row.getLhs() rrhs = row.getRhs() assert scip.isLE(rlhs, rrhs) assert not scip.isInfinity(rlhs) or not scip.isInfinity(rrhs) # If the slack variable is fixed, we can ignore this cut coefficient if scip.isFeasZero(rrhs - rlhs): continue # Unflip slack variable and adjust rhs if necessary: row at lower means the slack variable is at its upper bound. # Since SCIP adds +1 slacks, this can only happen when constraints have a finite lhs if row.getBasisStatus() == "lower": assert not scip.isInfinity(-rlhs) cutelem = -cutelem rowcols = row.getCols() rowvals = row.getVals() assert len(rowcols) == len(rowvals) # Eliminate slack variable: rowcols is sorted: [columns in LP, columns not in LP] for i in range(row.getNLPNonz()): cutcoefs[rowcols[i].getLPPos()] -= cutelem * rowvals[i] act = scip.getRowLPActivity(row) rhsslack = rrhs - act if scip.isFeasZero(rhsslack): assert row.getBasisStatus() == "upper" # cutelem != 0 and row active at upper bound -> slack at lower, row at upper cutrhs -= cutelem * (rrhs - row.getConstant()) else: assert scip.isFeasZero(act - rlhs) cutrhs -= cutelem * (rlhs - row.getConstant()) return cutcoefs, cutrhs def sepaexeclp(self): result = SCIP_RESULT.DIDNOTRUN scip = self.model if not scip.isLPSolBasic(): return {"result": result} #TODO: add SCIPgetNLPBranchCands # get var data ---> this is the same as getVars! vars = scip.getVars(transformed = True) # get LP data cols = scip.getLPColsData() rows = scip.getLPRowsData() # exit if LP is trivial if len(cols) == 0 or len(rows) == 0: return {"result": result} result = SCIP_RESULT.DIDNOTFIND # get basis indices basisind = scip.getLPBasisInd() # For all basic columns (not slacks) belonging to integer variables, try to generate a gomory cut for i in range(len(rows)): tryrow = False c = basisind[i] #primsol = SCIP_INVALID #print("Row %d/%d basic index: %d"%(i, len(rows),c)) #print("Row %d with value %f"%(i, cols[c].getPrimsol() if c >=0 else scip.getRowActivity(rows[-c-1]))) if c >= 0: assert c < len(cols) var = cols[c].getVar() if var.vtype() != "CONTINUOUS": primsol = cols[c].getPrimsol() assert scip.getSolVal(None, var) == primsol #print("var ", var," is not continuous. primsol = ", primsol) if 0.005 <= scip.frac(primsol) <= 1 - 0.005: #print("####trying gomory cut for col <%s> [%g] row %i"%(var, primsol, i)) tryrow = True # generate the cut! if tryrow: # get the row of B^-1 for this basic integer variable with fractional solution value binvrow = scip.getLPBInvRow(i) # get the tableau row for this basic integer variable with fractional solution value binvarow = scip.getLPBInvARow(i) # get cut's coefficients cutcoefs, cutrhs = self.getGMIFromRow(cols, rows, binvrow, binvarow, primsol) ######################################### #### This code is for testing only!! #### # the first two cuts are -x1 + 2y <= 0 and -x2 +2y <= 0 # the next two (when both previous ones are added) are -2x1 + 6y <=0 and -2x2 + 6y <=0 assert scip.isZero(cutcoefs[0]) or scip.isZero(cutcoefs[1]) if self.ncuts < 2: assert scip.isZero(cutcoefs[0] + 1) or scip.isZero(cutcoefs[1] + 1) assert scip.isZero(cutcoefs[2] - 2) else: assert scip.isZero(cutcoefs[0] + 2) or scip.isZero(cutcoefs[1] + 2) assert scip.isZero(cutcoefs[2] - 6) ########################################## # add cut # TODO: here it might make sense just to have a function `addCut` just like `addCons`. Or maybe better `createCut` # so that then one can ask stuff about it, like its efficacy, etc. This function would receive all coefficients # and basically do what we do here: cacheRowExtension etc up to releaseRow cut = scip.createEmptyRowSepa(self, "gmi%d_x%d"%(self.ncuts,c if c >= 0 else -c-1), lhs = None, rhs = cutrhs) scip.cacheRowExtensions(cut) for j in range(len(cutcoefs)): if scip.isZero(cutcoefs[j]): # maybe here we need isFeasZero continue #print("var : ", cols[j].getVar(), " coef: ", cutcoefs[j]) #print("cut.lhs : ", cut.getLhs(), " cut.rhs: ", cut.getRhs()) scip.addVarToRow(cut, cols[j].getVar(), cutcoefs[j]) if cut.getNNonz() == 0: assert scip.isFeasNegative(cutrhs) #print("Gomory cut is infeasible: 0 <= ", cutrhs) return {"result": SCIP_RESULT.CUTOFF} # Only take efficacious cuts, except for cuts with one non-zero coefficient (= bound changes) # the latter cuts will be handeled internally in sepastore. if cut.getNNonz() == 1 or scip.isCutEfficacious(cut): #print(" -> gomory cut for <%s>: rhs=%f, eff=%f"%(cols[c].getVar() if c >= 0 else rows[-c-1].getName(), # cutrhs, scip.getCutEfficacy(cut))) #SCIPdebugMessage(" -> found gomory cut <%s>: act=%f, rhs=%f, norm=%f, eff=%f, min=%f, max=%f (range=%f)\n", # cutname, SCIPgetRowLPActivity(scip, cut), SCIProwGetRhs(cut), SCIProwGetNorm(cut), # SCIPgetCutEfficacy(scip, NULL, cut), # SCIPgetRowMinCoef(scip, cut), SCIPgetRowMaxCoef(scip, cut), # SCIPgetRowMaxCoef(scip, cut)/SCIPgetRowMinCoef(scip, cut)) # flush all changes before adding the cut scip.flushRowExtensions(cut) infeasible = scip.addCut(cut, forcecut=True) self.ncuts += 1 if infeasible: result = SCIP_RESULT.CUTOFF else: result = SCIP_RESULT.SEPARATED scip.releaseRow(cut) return {"result": result} def model(): # create solver instance s = Model() # include separator sepa = GMI() s.includeSepa(sepa, "python_gmi", "generates gomory mixed integer cuts", priority = 1000, freq = 1) # turn off presolve s.setPresolve(SCIP_PARAMSETTING.OFF) # turn off heuristics s.setHeuristics(SCIP_PARAMSETTING.OFF) # turn off propagation s.setIntParam("propagating/maxrounds", 0) s.setIntParam("propagating/maxroundsroot", 0) # turn off some cuts s.setIntParam("separating/strongcg/freq", -1) s.setIntParam("separating/gomory/freq", -1) s.setIntParam("separating/aggregation/freq", -1) s.setIntParam("separating/mcf/freq", -1) s.setIntParam("separating/closecuts/freq", -1) s.setIntParam("separating/clique/freq", -1) s.setIntParam("separating/zerohalf/freq", -1) # only two rounds of cuts s.setIntParam("separating/maxroundsroot", 2) return s # we use Cook Kannan and Schrijver's example def test_CKS(): s = model() # add variables x1 = s.addVar("x1", vtype='I') x2 = s.addVar("x2", vtype='I') y = s.addVar("y", obj=-1, vtype='C') # add constraint s.addCons(-x1 + y <= 0) s.addCons( - x2 + y <= 0) s.addCons( x1 + x2 + y <= 2) # solve problem s.optimize() s.printStatistics() if __name__ == "__main__": test_CKS()
15,199
42.930636
136
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_heur.py
import gc import weakref import pytest from pyscipopt import Model, Heur, SCIP_RESULT, SCIP_PARAMSETTING, SCIP_HEURTIMING from pyscipopt.scip import is_memory_freed from util import is_optimized_mode class MyHeur(Heur): def heurexec(self, heurtiming, nodeinfeasible): sol = self.model.createSol(self) vars = self.model.getVars() self.model.setSolVal(sol, vars[0], 5.0) self.model.setSolVal(sol, vars[1], 0.0) accepted = self.model.trySol(sol) if accepted: return {"result": SCIP_RESULT.FOUNDSOL} else: return {"result": SCIP_RESULT.DIDNOTFIND} def test_heur(): # create solver instance s = Model() heuristic = MyHeur() s.includeHeur(heuristic, "PyHeur", "custom heuristic implemented in python", "Y", timingmask=SCIP_HEURTIMING.BEFORENODE) s.setPresolve(SCIP_PARAMSETTING.OFF) # add some variables x = s.addVar("x", obj=1.0) y = s.addVar("y", obj=2.0) # add some constraint s.addCons(x + 2*y >= 5) # solve problem s.optimize() # print solution assert round(s.getVal(x)) == 5.0 assert round(s.getVal(y)) == 0.0 def test_heur_memory(): if is_optimized_mode(): pytest.skip() def inner(): s = Model() heuristic = MyHeur() s.includeHeur(heuristic, "PyHeur", "custom heuristic implemented in python", "Y", timingmask=SCIP_HEURTIMING.BEFORENODE) return weakref.proxy(heuristic) heur_prox = inner() gc.collect() # necessary? with pytest.raises(ReferenceError): heur_prox.name assert is_memory_freed() if __name__ == "__main__": test_heur()
1,670
23.573529
128
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_knapsack.py
from pyscipopt import Model, quicksum def test_knapsack(): # create solver instance s = Model("Knapsack") s.hideOutput() # setting the objective sense to maximise s.setMaximize() # item weights weights = [4, 2, 6, 3, 7, 5] # item costs costs = [7, 2, 5, 4, 3, 4] assert len(weights) == len(costs) # knapsack size knapsackSize = 15 # adding the knapsack variables knapsackVars = [] varNames = [] varBaseName = "Item" for i in range(len(weights)): varNames.append(varBaseName + "_" + str(i)) knapsackVars.append(s.addVar(varNames[i], vtype='I', obj=costs[i], ub=1.0)) # adding a linear constraint for the knapsack constraint s.addCons(quicksum(w*v for (w, v) in zip(weights, knapsackVars)) <= knapsackSize) # solve problem s.optimize() s.printStatistics() # print solution varSolutions = [] for i in range(len(weights)): solValue = round(s.getVal(knapsackVars[i])) varSolutions.append(solValue) if solValue > 0: print (varNames[i], "Times Selected:", solValue) print ("\tIncluded Weight:", weights[i]*solValue, "\tItem Cost:", costs[i]*solValue) includedWeight = sum([weights[i]*varSolutions[i] for i in range(len(weights))]) assert includedWeight > 0 and includedWeight <= knapsackSize if __name__ == "__main__": test_knapsack()
1,417
26.269231
96
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_linexpr.py
import pytest from pyscipopt import Model from pyscipopt.scip import Expr, ExprCons, Term, quicksum @pytest.fixture(scope="module") def model(): m = Model() x = m.addVar("x") y = m.addVar("y") z = m.addVar("z") return m, x, y, z CONST = Term() def test_term(model): m, x, y, z = model assert x[x] == 1.0 assert x[y] == 0.0 def test_operations_linear(model): m, x, y, z = model expr = x + y assert isinstance(expr, Expr) assert expr[x] == 1.0 assert expr[y] == 1.0 assert expr[z] == 0.0 expr = -x assert isinstance(expr, Expr) assert expr[x] == -1.0 assert expr[y] == 0.0 expr = x*4 assert isinstance(expr, Expr) assert expr[x] == 4.0 assert expr[y] == 0.0 expr = 4*x assert isinstance(expr, Expr) assert expr[x] == 4.0 assert expr[y] == 0.0 expr = x + y + x assert isinstance(expr, Expr) assert expr[x] == 2.0 assert expr[y] == 1.0 expr = x + y - x assert isinstance(expr, Expr) assert expr[x] == 0.0 assert expr[y] == 1.0 expr = 3*x + 1.0 assert isinstance(expr, Expr) assert expr[x] == 3.0 assert expr[y] == 0.0 assert expr[CONST] == 1.0 expr = 1.0 + 3*x assert isinstance(expr, Expr) assert expr[x] == 3.0 assert expr[y] == 0.0 assert expr[CONST] == 1.0 def test_operations_quadratic(model): m, x, y, z = model expr = x*x assert isinstance(expr, Expr) assert expr[x] == 0.0 assert expr[y] == 0.0 assert expr[CONST] == 0.0 assert expr[Term(x,x)] == 1.0 expr = x*y assert isinstance(expr, Expr) assert expr[x] == 0.0 assert expr[y] == 0.0 assert expr[CONST] == 0.0 assert expr[Term(x,y)] == 1.0 expr = (x - 1)*(y + 1) assert isinstance(expr, Expr) assert expr[x] == 1.0 assert expr[y] == -1.0 assert expr[CONST] == -1.0 assert expr[Term(x,y)] == 1.0 def test_power_for_quadratic(model): m, x, y, z = model expr = x**2 + x + 1 assert isinstance(expr, Expr) assert expr[Term(x,x)] == 1.0 assert expr[x] == 1.0 assert expr[CONST] == 1.0 assert len(expr.terms) == 3 assert (x**2).terms == (x*x).terms assert ((x + 3)**2).terms == (x**2 + 6*x + 9).terms def test_operations_poly(model): m, x, y, z = model expr = x*x*x + 2*y*y assert isinstance(expr, Expr) assert expr[x] == 0.0 assert expr[y] == 0.0 assert expr[CONST] == 0.0 assert expr[Term(x,x,x)] == 1.0 assert expr[Term(y,y)] == 2.0 assert expr.terms == (x**3 + 2*y**2).terms def test_degree(model): m, x, y, z = model expr = Expr() assert expr.degree() == 0 expr = Expr() + 3.0 assert expr.degree() == 0 expr = x + 1 assert expr.degree() == 1 expr = x*x + y - 2 assert expr.degree() == 2 expr = (x + 1)*(y + 1)*(x - 1) assert expr.degree() == 3 def test_inequality(model): m, x, y, z = model expr = x + 2*y cons = expr <= 0 assert isinstance(cons, ExprCons) assert cons._lhs is None assert cons._rhs == 0.0 assert cons.expr[x] == 1.0 assert cons.expr[y] == 2.0 assert cons.expr[z] == 0.0 assert cons.expr[CONST] == 0.0 assert CONST not in cons.expr.terms cons = expr >= 5 assert isinstance(cons, ExprCons) assert cons._lhs == 5.0 assert cons._rhs is None assert cons.expr[x] == 1.0 assert cons.expr[y] == 2.0 assert cons.expr[z] == 0.0 assert cons.expr[CONST] == 0.0 assert CONST not in cons.expr.terms cons = 5 <= x + 2*y - 3 assert isinstance(cons, ExprCons) assert cons._lhs == 8.0 assert cons._rhs is None assert cons.expr[x] == 1.0 assert cons.expr[y] == 2.0 assert cons.expr[z] == 0.0 assert cons.expr[CONST] == 0.0 assert CONST not in cons.expr.terms def test_ranged(model): m, x, y, z = model expr = x + 2*y cons = expr >= 3 ranged = cons <= 5 assert isinstance(ranged, ExprCons) assert ranged._lhs == 3.0 assert ranged._rhs == 5.0 assert ranged.expr[y] == 2.0 assert ranged.expr[CONST] == 0.0 # again, more or less directly: ranged = 3 <= (x + 2*y <= 5) assert isinstance(ranged, ExprCons) assert ranged._lhs == 3.0 assert ranged._rhs == 5.0 assert ranged.expr[y] == 2.0 assert ranged.expr[CONST] == 0.0 # we must use the parenthesis, because # x <= y <= z # is a "chained comparison", which will be interpreted by Python # to be equivalent to # (x <= y) and (y <= z) # where "and" can not be overloaded and the expressions in # parenthesis are coerced to booleans. with pytest.raises(TypeError): ranged = (x + 2*y <= 5) <= 3 with pytest.raises(TypeError): ranged = 3 >= (x + 2*y <= 5) with pytest.raises(TypeError): ranged = (1 <= x + 2*y <= 5) def test_equation(model): m, x, y, z = model equat = 2*x - 3*y == 1 assert isinstance(equat, ExprCons) assert equat._lhs == equat._rhs assert equat._lhs == 1.0 assert equat.expr[x] == 2.0 assert equat.expr[y] == -3.0 assert equat.expr[CONST] == 0.0 def test_objective(model): m, x, y, z = model # setting linear objective m.setObjective(x + y) # using quicksum m.setObjective(quicksum(2 * v for v in [x, y, z])) # setting affine objective m.setObjective(x + y + 1) assert m.getObjoffset() == 1 # setting nonlinear objective with pytest.raises(ValueError): m.setObjective(x ** 2 - y * z)
5,534
23.709821
68
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_logical.py
from pyscipopt import Model from pyscipopt import quicksum try: import pytest itertools = pytest.importorskip("itertools") except ImportError: import itertools product = itertools.product # Testing AND/OR/XOR constraints # check whether any error is raised # see http://scip.zib.de/doc-5.0.1/html/cons__and_8c.php # for resultant and operators definition # CAVEAT: ONLY binary variables are allowed # Integer and continous variables behave unexpectedly (due to SCIP?) # TBI: automatic assertion of expected resultant VS optimal resultant # (visual inspection at the moment) verbose = True # py.test ignores this # AUXILIARY FUNCTIONS def setModel(vtype="B", name=None, imax=2): """initialize model and its variables. imax (int): number of operators""" if name is None: name = "model" m = Model(name) m.hideOutput() i = 0 r = m.addVar("r", vtype) while i < imax: m.addVar("v%s" % i, vtype) i += 1 return m def getVarByName(m, name): try: return [v for v in m.getVars() if name == v.name][0] except IndexError: return None def getAllVarsByName(m, name): try: return [v for v in m.getVars() if name in v.name] except IndexError: return [] def setConss(m, vtype="B", val=0, imax=1): """set numeric constraints to the operators. val (int): number to which the operators are constraint imax (int): number of operators affected by the constraint""" i = 0 while i < imax: vi = getVarByName(m, "v%s" % i) m.addCons(vi == val, vtype) i += 1 return def printOutput(m): """print status and values of variables AFTER optimization.""" status = m.getStatus() r = getVarByName(m, "r") rstr = "%d" % round(m.getVal(r)) vs = getAllVarsByName(m, "v") vsstr = "".join(["%d" % round(m.getVal(v)) for v in vs]) print("Status: %s, resultant: %s, operators: %s" % (status, rstr, vsstr)) # MAIN FUNCTIONS def main_variable(model, logical, sense="min"): """r is the BINARY resultant variable v are BINARY operators cf. http://scip.zib.de/doc-5.0.1/html/cons__and_8h.php""" try: r = getVarByName(model, "r") vs = getAllVarsByName(model, "v") # addConsAnd/Or method (Xor: TBI, custom) ### method_name = "addCons%s" % logical.capitalize() if method_name == "addConsXor": n = model.addVar("n", "I") model.addCons(r+quicksum(vs) == 2*n) else: try: _model_addConsLogical = getattr(model, method_name) _model_addConsLogical(vs, r) except AttributeError as e: raise AttributeError("%s not implemented" % method_name) model.setObjective(r, sense="%simize" % sense) model.optimize() assert model.getStatus() == "optimal" if verbose: printOutput(model) return True except Exception as e: if verbose: print("%s: %s" % (e.__class__.__name__, e)) return False def main_boolean(model, logical, value=False): """r is the BOOLEAN rhs (NOT a variable!) v are BINARY operators cf. http://scip.zib.de/doc-5.0.1/html/cons__xor_8h.php""" try: r = value vs = getAllVarsByName(model, "v") # addConsXor method (And/Or: TBI) ### method_name = "addCons%s" % logical.capitalize() try: _model_addConsLogical = getattr(model, method_name) _model_addConsLogical(vs, r) except AttributeError as e: raise AttributeError("%s not implemented" % method_name) model.optimize() assert model.getStatus() == "optimal" if verbose: printOutput(model) return True except Exception as e: if verbose: print("%s: %s" % (e.__class__.__name__, e)) return False # TEST FUNCTIONS @pytest.mark.parametrize("nconss", [1, 2, "all"]) @pytest.mark.parametrize("vconss", [0, 1]) @pytest.mark.parametrize("sense", ["min", "max"]) @pytest.mark.parametrize("logical", ["and", "or", "xor"]) @pytest.mark.parametrize("noperators", [2, 20, 51, 100]) @pytest.mark.parametrize("vtype", ["B"]) def test_variable(noperators, vtype, logical, sense, vconss, nconss): if nconss == "all": nconss = noperators if vtype in ["I", "C"]: pytest.skip("unsupported vtype \"%s\" may raise errors or unexpected results" % vtype) m = setModel(vtype, logical, noperators) setConss(m, vtype, vconss, nconss) success = main_variable(m, logical, sense) assert(success), "Status is not optimal" @pytest.mark.parametrize("nconss", [1, 2, "all"]) @pytest.mark.parametrize("vconss", [0, 1]) @pytest.mark.parametrize("value", [False, True]) @pytest.mark.parametrize("logical", ["xor", "and", "or"]) @pytest.mark.parametrize("noperators", [2, 20, 51, 100]) @pytest.mark.parametrize("vtype", ["B"]) def test_boolean(noperators, vtype, logical, value, vconss, nconss): if nconss == "all": nconss = noperators if vtype in ["I", "C"]: pytest.skip("unsupported vtype \"%s\" may raise errors or unexpected results" % vtype) if logical in ["and", "or"]: pytest.skip("unsupported logical: %s" % vtype) if logical == "xor" and nconss == noperators and noperators % 2 & vconss != value: pytest.xfail("addConsXor cannot be %s if an %s number of variables are all constraint to %s" % (value, noperators, vconss)) m = setModel(vtype, logical, noperators) setConss(m, vtype, vconss, nconss) success = main_boolean(m, logical, value) assert(success), "Test is not successful"
5,697
32.715976
131
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_lp.py
from pyscipopt import LP def test_lp(): # create LP instance, minimizing by default myLP = LP() # create cols w/o coefficients, 0 objective coefficient and 0,\infty bounds myLP.addCols(2 * [[]]) # create rows myLP.addRow(entries = [(0,1),(1,2)] ,lhs = 5) lhs, rhs = myLP.getSides() assert lhs[0] == 5.0 assert rhs[0] == myLP.infinity() assert(myLP.ncols() == 2) myLP.chgObj(0, 1.0) myLP.chgObj(1, 4.0) solval = myLP.solve() assert round(5.0 == solval) if __name__ == "__main__": test_lp()
556
20.423077
79
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_memory.py
import pytest from pyscipopt.scip import Model, is_memory_freed from util import is_optimized_mode def test_not_freed(): if is_optimized_mode(): pytest.skip() m = Model() assert not is_memory_freed() def test_freed(): if is_optimized_mode(): pytest.skip() m = Model() del m assert is_memory_freed() if __name__ == "__main__": test_not_freed() test_freed()
409
18.52381
49
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_model.py
from pyscipopt import Model def test_model(): # create solver instance s = Model() # add some variables x = s.addVar("x", vtype = 'C', obj = 1.0) y = s.addVar("y", vtype = 'C', obj = 2.0) assert x.getObj() == 1.0 assert y.getObj() == 2.0 s.setObjective(4.0 * y + 10.5, clear = False) assert x.getObj() == 1.0 assert y.getObj() == 4.0 assert s.getObjoffset() == 10.5 # add some constraint c = s.addCons(x + 2 * y >= 1.0) assert c.isLinear() s.chgLhs(c, 5.0) s.chgRhs(c, 6.0) assert s.getLhs(c) == 5.0 assert s.getRhs(c) == 6.0 # solve problem s.optimize() solution = s.getBestSol() # print solution assert (s.getVal(x) == s.getSolVal(solution, x)) assert (s.getVal(y) == s.getSolVal(solution, y)) assert round(s.getVal(x)) == 5.0 assert round(s.getVal(y)) == 0.0 assert s.getSlack(c, solution) == 0.0 assert s.getSlack(c, solution, 'lhs') == 0.0 assert s.getSlack(c, solution, 'rhs') == 1.0 assert s.getActivity(c, solution) == 5.0 s.writeProblem('model') s.writeProblem('model.lp') s.freeProb() s = Model() x = s.addVar("x", vtype = 'C', obj = 1.0) y = s.addVar("y", vtype = 'C', obj = 2.0) c = s.addCons(x + 2 * y <= 1.0) s.setMaximize() s.delCons(c) s.optimize() assert s.getStatus() == 'unbounded' if __name__ == "__main__": test_model()
1,424
22.360656
52
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_nonlinear.py
import pytest from pyscipopt import Model, quicksum, sqrt # test string with polynomial formulation (uses only Expr) def test_string_poly(): PI = 3.141592653589793238462643 NWIRES = 11 DIAMETERS = [0.207, 0.225, 0.244, 0.263, 0.283, 0.307, 0.331, 0.362, 0.394, 0.4375, 0.500] PRELOAD = 300.0 MAXWORKLOAD = 1000.0 MAXDEFLECT = 6.0 DEFLECTPRELOAD = 1.25 MAXFREELEN = 14.0 MAXCOILDIAM = 3.0 MAXSHEARSTRESS = 189000.0 SHEARMOD = 11500000.0 m = Model() coil = m.addVar('coildiam') wire = m.addVar('wirediam') defl = m.addVar('deflection', lb=DEFLECTPRELOAD / (MAXWORKLOAD - PRELOAD), ub=MAXDEFLECT / PRELOAD) ncoils = m.addVar('ncoils', vtype='I') const1 = m.addVar('const1') const2 = m.addVar('const2') volume = m.addVar('volume') y = [m.addVar('wire%d' % i, vtype='B') for i in range(NWIRES)] obj = 1.0 * volume m.setObjective(obj, 'minimize') m.addCons(PI/2*(ncoils + 2)*coil*wire**2 - volume == 0, name='voldef') # defconst1: coil / wire - const1 == 0.0 m.addCons(coil - const1*wire == 0, name='defconst1') # defconst2: (4.0*const1 - 1.0) / (4.0*const1 - 4.0) + 0.615 / const1 - const2 == 0.0 d1 = (4.0*const1 - 4.0) d2 = const1 m.addCons((4.0*const1 - 1.0)*d2 + 0.615*d1 - const2*d1*d2 == 0, name='defconst2') m.addCons(8.0*MAXWORKLOAD/PI*const1*const2 - MAXSHEARSTRESS*wire**2 <= 0.0, name='shear') # defdefl: 8.0/shearmod * ncoils * const1^3 / wire - defl == 0.0 m.addCons(8.0/SHEARMOD*ncoils*const1**3 - defl*wire == 0.0, name="defdefl") m.addCons(MAXWORKLOAD*defl + 1.05*ncoils*wire + 2.1*wire <= MAXFREELEN, name='freel') m.addCons(coil + wire <= MAXCOILDIAM, name='coilwidth') m.addCons(quicksum(c*v for (c,v) in zip(DIAMETERS, y)) - wire == 0, name='defwire') m.addCons(quicksum(y) == 1, name='selectwire') m.optimize() assert abs(m.getPrimalbound() - 1.6924910128) < 1.0e-5 # test string with original formulation (uses GenExpr) def test_string(): PI = 3.141592653589793238462643 NWIRES = 11 DIAMETERS = [0.207, 0.225, 0.244, 0.263, 0.283, 0.307, 0.331, 0.362, 0.394, 0.4375, 0.500] PRELOAD = 300.0 MAXWORKLOAD = 1000.0 MAXDEFLECT = 6.0 DEFLECTPRELOAD = 1.25 MAXFREELEN = 14.0 MAXCOILDIAM = 3.0 MAXSHEARSTRESS = 189000.0 SHEARMOD = 11500000.0 m = Model() coil = m.addVar('coildiam') wire = m.addVar('wirediam') defl = m.addVar('deflection', lb=DEFLECTPRELOAD / (MAXWORKLOAD - PRELOAD), ub=MAXDEFLECT / PRELOAD) ncoils = m.addVar('ncoils', vtype='I') const1 = m.addVar('const1') const2 = m.addVar('const2') volume = m.addVar('volume') y = [m.addVar('wire%d' % i, vtype='B') for i in range(NWIRES)] obj = 1.0 * volume m.setObjective(obj, 'minimize') m.addCons(PI/2*(ncoils + 2)*coil*wire**2 - volume == 0, name='voldef') m.addCons(coil / wire - const1 == 0, name='defconst1') m.addCons((4.0*const1 - 1.0) / (4.0*const1 - 4.0) + 0.615 / const1 - const2 == 0, name='defconst2') m.addCons(8.0*MAXWORKLOAD/PI*const1*const2 - MAXSHEARSTRESS*wire**2 <= 0.0, name='shear') m.addCons(8.0/SHEARMOD*ncoils*const1**3 / wire - defl == 0.0, name="defdefl") m.addCons(MAXWORKLOAD*defl + 1.05*ncoils*wire + 2.1*wire <= MAXFREELEN, name='freel') m.addCons(coil + wire <= MAXCOILDIAM, name='coilwidth') m.addCons(quicksum(c*v for (c,v) in zip(DIAMETERS, y)) - wire == 0, name='defwire') m.addCons(quicksum(y) == 1, name='selectwire') m.optimize() assert abs(m.getPrimalbound() - 1.6924910128) < 1.0e-6 # test circle: find circle of smallest radius that encloses the given points def test_circle(): points =[ (2.802686, 1.398947), (4.719673, 4.792101), (1.407758, 7.769566), (2.253320, 2.373641), (8.583144, 9.769102), (3.022725, 5.470335), (5.791380, 1.214782), (8.304504, 8.196392), (9.812677, 5.284600), (9.445761, 9.541600)] m = Model() a = m.addVar('a', lb=None) b = m.addVar('b', ub=None) r = m.addVar('r') # minimize radius m.setObjective(r, 'minimize') for i,p in enumerate(points): # NOTE: SCIP will not identify this as SOC constraints! m.addCons( sqrt((a - p[0])**2 + (b - p[1])**2) <= r, name = 'point_%d'%i) m.optimize() bestsol = m.getBestSol() assert abs(m.getSolVal(bestsol, r) - 5.2543) < 1.0e-3 assert abs(m.getSolVal(bestsol, a) - 6.1242) < 1.0e-3 assert abs(m.getSolVal(bestsol, b) - 5.4702) < 1.0e-3 # test gastrans: see example in <scip path>/examples/CallableLibrary/src/gastrans.c # of course there is a more pythonic/elegant way of implementing this, probably # starting by using a proper graph structure def test_gastrans(): GASTEMP = 281.15 RUGOSITY = 0.05 DENSITY = 0.616 COMPRESSIBILITY = 0.8 nodes = [ # name supplylo supplyup pressurelo pressureup cost ("Anderlues", 0.0, 1.2, 0.0, 66.2, 0.0 ), # 0 ("Antwerpen", None, -4.034, 30.0, 80.0, 0.0 ), # 1 ("Arlon", None, -0.222, 0.0, 66.2, 0.0 ), # 2 ("Berneau", 0.0, 0.0, 0.0, 66.2, 0.0 ), # 3 ("Blaregnies", None, -15.616, 50.0, 66.2, 0.0 ), # 4 ("Brugge", None, -3.918, 30.0, 80.0, 0.0 ), # 5 ("Dudzele", 0.0, 8.4, 0.0, 77.0, 2.28 ), # 6 ("Gent", None, -5.256, 30.0, 80.0, 0.0 ), # 7 ("Liege", None, -6.385, 30.0, 66.2, 0.0 ), # 8 ("Loenhout", 0.0, 4.8, 0.0, 77.0, 2.28 ), # 9 ("Mons", None, -6.848, 0.0, 66.2, 0.0 ), # 10 ("Namur", None, -2.120, 0.0, 66.2, 0.0 ), # 11 ("Petange", None, -1.919, 25.0, 66.2, 0.0 ), # 12 ("Peronnes", 0.0, 0.96, 0.0, 66.2, 1.68 ), # 13 ("Sinsin", 0.0, 0.0, 0.0, 63.0, 0.0 ), # 14 ("Voeren", 20.344, 22.012, 50.0, 66.2, 1.68 ), # 15 ("Wanze", 0.0, 0.0, 0.0, 66.2, 0.0 ), # 16 ("Warnand", 0.0, 0.0, 0.0, 66.2, 0.0 ), # 17 ("Zeebrugge", 8.87, 11.594, 0.0, 77.0, 2.28 ), # 18 ("Zomergem", 0.0, 0.0, 0.0, 80.0, 0.0 ) # 19 ] arcs = [ # node1 node2 diameter length active */ ( 18, 6, 890.0, 4.0, False ), ( 18, 6, 890.0, 4.0, False ), ( 6, 5, 890.0, 6.0, False ), ( 6, 5, 890.0, 6.0, False ), ( 5, 19, 890.0, 26.0, False ), ( 9, 1, 590.1, 43.0, False ), ( 1, 7, 590.1, 29.0, False ), ( 7, 19, 590.1, 19.0, False ), ( 19, 13, 890.0, 55.0, False ), ( 15, 3, 890.0, 5.0, True ), ( 15, 3, 395.0, 5.0, True ), ( 3, 8, 890.0, 20.0, False ), ( 3, 8, 395.0, 20.0, False ), ( 8, 17, 890.0, 25.0, False ), ( 8, 17, 395.0, 25.0, False ), ( 17, 11, 890.0, 42.0, False ), ( 11, 0, 890.0, 40.0, False ), ( 0, 13, 890.0, 5.0, False ), ( 13, 10, 890.0, 10.0, False ), ( 10, 4, 890.0, 25.0, False ), ( 17, 16, 395.5, 10.5, False ), ( 16, 14, 315.5, 26.0, True ), ( 14, 2, 315.5, 98.0, False ), ( 2, 12, 315.5, 6.0, False ) ] scip = Model() # create flow variables flow = {} for arc in arcs: flow[arc] = scip.addVar("flow_%s_%s"%(nodes[arc[0]][0],nodes[arc[1]][0]), # names of nodes in arc lb = 0.0 if arc[4] else None) # no lower bound if not active # pressure difference variables pressurediff = {} for arc in arcs: pressurediff[arc] = scip.addVar("pressurediff_%s_%s"%(nodes[arc[0]][0],nodes[arc[1]][0]), # names of nodes in arc lb = None) # supply variables supply = {} for node in nodes: supply[node] = scip.addVar("supply_%s"%(node[0]), lb = node[1], ub = node[2], obj = node[5]) # square pressure variables pressure = {} for node in nodes: pressure[node] = scip.addVar("pressure_%s"%(node[0]), lb = node[3]**2, ub = node[4]**2) # node balance constrains, for each node i: outflows - inflows = supply for nid, node in enumerate(nodes): # find arcs that go or end at this node flowbalance = 0 for arc in arcs: if arc[0] == nid: # arc is outgoing flowbalance += flow[arc] elif arc[1] == nid: # arc is incoming flowbalance -= flow[arc] else: continue scip.addCons(flowbalance == supply[node], name="flowbalance%s"%node[0]) # pressure difference constraints: pressurediff[node1 to node2] = pressure[node1] - pressure[node2] for arc in arcs: scip.addCons(pressurediff[arc] == pressure[nodes[arc[0]]] - pressure[nodes[arc[1]]], "pressurediffcons_%s_%s"%(nodes[arc[0]][0],nodes[arc[1]][0])) # pressure loss constraints: # active arc: flow[arc]^2 + coef * pressurediff[arc] <= 0.0 # regular pipes: flow[arc] * abs(flow[arc]) - coef * pressurediff[arc] == 0.0 # coef = 96.074830e-15*diameter(i)^5/(lambda*compressibility*temperatur*length(i)*density) # lambda = (2*log10(3.7*diameter(i)/rugosity))^(-2) from math import log10 for arc in arcs: coef = 96.074830e-15 * arc[2]**5 * (2.0*log10(3.7*arc[2]/RUGOSITY))**2 / COMPRESSIBILITY / GASTEMP / arc[3] / DENSITY if arc[4]: # active scip.addCons(flow[arc]**2 + coef * pressurediff[arc] <= 0.0, "pressureloss_%s_%s"%(nodes[arc[0]][0],nodes[arc[1]][0])) else: scip.addCons(flow[arc]*abs(flow[arc]) - coef * pressurediff[arc] == 0.0, "pressureloss_%s_%s"%(nodes[arc[0]][0],nodes[arc[1]][0])) scip.setRealParam('limits/time', 5) scip.optimize() if scip.getStatus() == 'timelimit': pytest.skip() assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-9 def test_quad_coeffs(): """test coefficient access method for quadratic constraints""" scip = Model() x = scip.addVar() y = scip.addVar() z = scip.addVar() c = scip.addCons(2*x*y + 0.5*x**2 + 4*z >= 10) assert c.isQuadratic() bilinterms, quadterms, linterms = scip.getTermsQuadratic(c) assert bilinterms[0][0].name == x.name assert bilinterms[0][1].name == y.name assert bilinterms[0][2] == 2 assert quadterms[0][0].name == x.name assert quadterms[0][1] == 0.5 assert linterms[0][0].name == z.name assert linterms[0][1] == 4
11,399
38.721254
154
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_pricer.py
from pyscipopt import Model, Pricer, SCIP_RESULT, SCIP_PARAMSETTING, quicksum class CutPricer(Pricer): # The reduced cost function for the variable pricer def pricerredcost(self): # Retrieving the dual solutions dualSolutions = [] for i, c in enumerate(self.data['cons']): dualSolutions.append(self.model.getDualMultiplier(c)) # Building a MIP to solve the subproblem subMIP = Model("CuttingStock-Sub") # Turning off presolve subMIP.setPresolve(SCIP_PARAMSETTING.OFF) # Setting the verbosity level to 0 subMIP.hideOutput() cutWidthVars = [] varNames = [] varBaseName = "CutWidth" # Variables for the subMIP for i in range(len(dualSolutions)): varNames.append(varBaseName + "_" + str(i)) cutWidthVars.append(subMIP.addVar(varNames[i], vtype = "I", obj = -1.0 * dualSolutions[i])) # Adding the knapsack constraint knapsackCons = subMIP.addCons( quicksum(w*v for (w,v) in zip(self.data['widths'], cutWidthVars)) <= self.data['rollLength']) # Solving the subMIP to generate the most negative reduced cost pattern subMIP.optimize() objval = 1 + subMIP.getObjVal() # Adding the column to the master problem if objval < -1e-08: currentNumVar = len(self.data['var']) # Creating new var; must set pricedVar to True newVar = self.model.addVar("NewPattern_" + str(currentNumVar), vtype = "C", obj = 1.0, pricedVar = True) # Adding the new variable to the constraints of the master problem newPattern = [] for i, c in enumerate(self.data['cons']): coeff = round(subMIP.getVal(cutWidthVars[i])) self.model.addConsCoeff(c, newVar, coeff) newPattern.append(coeff) # Storing the new variable in the pricer data. self.data['patterns'].append(newPattern) self.data['var'].append(newVar) return {'result':SCIP_RESULT.SUCCESS} # The initialisation function for the variable pricer to retrieve the transformed constraints of the problem def pricerinit(self): for i, c in enumerate(self.data['cons']): self.data['cons'][i] = self.model.getTransformedCons(c) def test_cuttingstock(): # create solver instance s = Model("CuttingStock") s.setPresolve(0) # creating a pricer pricer = CutPricer() s.includePricer(pricer, "CuttingStockPricer", "Pricer to identify new cutting stock patterns") # item widths widths = [14, 31, 36, 45] # width demand demand = [211, 395, 610, 97] # roll length rollLength = 100 assert len(widths) == len(demand) # adding the initial variables cutPatternVars = [] varNames = [] varBaseName = "Pattern" patterns = [] initialCoeffs = [] for i in range(len(widths)): varNames.append(varBaseName + "_" + str(i)) cutPatternVars.append(s.addVar(varNames[i], obj = 1.0)) # adding a linear constraint for the knapsack constraint demandCons = [] for i in range(len(widths)): numWidthsPerRoll = float(int(rollLength/widths[i])) demandCons.append(s.addCons(numWidthsPerRoll*cutPatternVars[i] >= demand[i], separate = False, modifiable = True)) newPattern = [0]*len(widths) newPattern[i] = numWidthsPerRoll patterns.append(newPattern) # Setting the pricer_data for use in the init and redcost functions pricer.data = {} pricer.data['var'] = cutPatternVars pricer.data['cons'] = demandCons pricer.data['widths'] = widths pricer.data['demand'] = demand pricer.data['rollLength'] = rollLength pricer.data['patterns'] = patterns # solve problem s.optimize() # print original data printWidths = '\t'.join(str(e) for e in widths) print('\nInput Data') print('==========') print('Roll Length:', rollLength) print('Widths:\t', printWidths) print('Demand:\t', '\t'.join(str(e) for e in demand)) # print solution widthOutput = [0]*len(widths) print('\nResult') print('======') print('\t\tSol Value', '\tWidths\t', printWidths) for i in range(len(pricer.data['var'])): rollUsage = 0 solValue = round(s.getVal(pricer.data['var'][i])) if solValue > 0: outline = 'Pattern_' + str(i) + ':\t' + str(solValue) + '\t\tCuts:\t ' for j in range(len(widths)): rollUsage += pricer.data['patterns'][i][j]*widths[j] widthOutput[j] += pricer.data['patterns'][i][j]*solValue outline += str(pricer.data['patterns'][i][j]) + '\t' outline += 'Usage:' + str(rollUsage) print(outline) print('\t\t\tTotal Output:\t', '\t'.join(str(e) for e in widthOutput)) assert s.getObjVal() == 452.25 if __name__ == '__main__': test_cuttingstock()
5,049
32.892617
116
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_quadcons.py
from pyscipopt import Model def test_niceqp(): s = Model() x = s.addVar("x") y = s.addVar("y") s.addCons(x >= 2) s.addCons(x*x <= y) s.setObjective(y, sense='minimize') s.optimize() assert round(s.getVal(x)) == 2.0 assert round(s.getVal(y)) == 4.0 def test_niceqcqp(): s = Model() x = s.addVar("x") y = s.addVar("y") s.addCons(x*x + y*y <= 2) s.setObjective(x + y, sense='maximize') s.optimize() assert round(s.getVal(x)) == 1.0 assert round(s.getVal(y)) == 1.0 if __name__ == "__main__": test_niceqp() test_niceqcqp()
604
17.333333
43
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_quickprod.py
from pyscipopt import Model, quickprod from pyscipopt.scip import CONST from operator import mul import functools def test_quickprod_model(): m = Model("quickprod") x = m.addVar("x") y = m.addVar("y") z = m.addVar("z") c = 2.3 q = quickprod([x,y,z,c]) == 0.0 s = functools.reduce(mul,[x,y,z,c],1) == 0.0 assert(q.expr.terms == s.expr.terms) def test_quickprod(): empty = quickprod(1 for i in []) assert len(empty.terms) == 1 assert CONST in empty.terms def test_largequadratic(): # inspired from performance issue on # http://stackoverflow.com/questions/38434300 m = Model("dense_quadratic") dim = 20 x = [m.addVar("x_%d" % i) for i in range(dim)] expr = quickprod((i+j+1)*x[i]*x[j] for i in range(dim) for j in range(dim)) cons = expr <= 1.0 # upper triangle, diagonal assert cons.expr.degree() == 2*dim*dim m.addCons(cons) # TODO: what can we test beyond the lack of crashes? if __name__ == "__main__": test_quickprod() test_quickprod_model() test_largequadratic()
1,147
25.697674
63
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_quicksum.py
from pyscipopt import Model, quicksum from pyscipopt.scip import CONST def test_quicksum_model(): m = Model("quicksum") x = m.addVar("x") y = m.addVar("y") z = m.addVar("z") c = 2.3 q = quicksum([x,y,z,c]) == 0.0 s = sum([x,y,z,c]) == 0.0 assert(q.expr.terms == s.expr.terms) def test_quicksum(): empty = quicksum(1 for i in []) assert len(empty.terms) == 1 assert CONST in empty.terms def test_largequadratic(): # inspired from performance issue on # http://stackoverflow.com/questions/38434300 m = Model("dense_quadratic") dim = 200 x = [m.addVar("x_%d" % i) for i in range(dim)] expr = quicksum((i+j+1)*x[i]*x[j] for i in range(dim) for j in range(dim)) cons = expr <= 1.0 # upper triangle, diagonal assert len(cons.expr.terms) == dim * (dim-1) / 2 + dim m.addCons(cons) # TODO: what can we test beyond the lack of crashes? if __name__ == "__main__": test_quicksum() test_quicksum_model() test_largequadratic()
1,099
25.829268
63
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_relax.py
from pyscipopt import Model from pyscipopt.scip import Relax calls = [] class SoncRelax(Relax): def relaxexec(self): calls.append('relaxexec') def test_relax(): m = Model() m.hideOutput() #include relaxator m.includeRelax(SoncRelax(),'testrelaxator','Test that relaxator gets included') #add Variables x0 = m.addVar(vtype = "C", name = "x0") x1 = m.addVar(vtype = "C", name = "x1") x2 = m.addVar(vtype = "C", name = "x2") #addCons m.addCons(x0 >= 2) m.addCons(x0**2 <= x1) m.addCons(x1 * x2 >= x0) m.setObjective(x1 + x0) m.optimize() print(m.getVal(x0)) assert 'relaxexec' in calls assert len(calls) == 1 if __name__ == "__main__": test_relax()
767
20.333333
83
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_short.py
from pyscipopt import Model import pytest import os # This test requires a directory link in tests/ to check/ in the main SCIP directory. testset = [] primalsolutions = {} dualsolutions = {} tolerance = 1e-5 infinity = 1e20 testsetpath = 'check/testset/short.test' solufilepath = 'check/testset/short.solu' if not all(os.path.isfile(fn) for fn in [testsetpath, solufilepath]): if pytest.__version__ < "3.0.0": pytest.skip("Files for testset `short` not found (symlink missing?)") else: pytestmark = pytest.mark.skip else: with open(testsetpath, 'r') as f: for line in f.readlines(): testset.append('check/' + line.rstrip('\n')) with open(solufilepath, 'r') as f: for line in f.readlines(): if len(line.split()) == 2: [s, name] = line.split() else: [s, name, value] = line.split() if s == '=opt=': primalsolutions[name] = float(value) dualsolutions[name] = float(value) elif s == '=inf=': primalsolutions[name] = infinity dualsolutions[name] = infinity elif s == '=best=': primalsolutions[name] = float(value) elif s == '=best dual=': dualsolutions[name] = float(value) # status =unkn= needs no data def relGE(v1, v2, tol = tolerance): if v1 is None or v2 is None: return True else: reltol = tol * max(abs(v1), abs(v2), 1.0) return (v1 - v2) >= -reltol def relLE(v1, v2, tol = tolerance): if v1 is None or v2 is None: return True else: reltol = tol * max(abs(v1), abs(v2), 1.0) return (v1 - v2) <= reltol @pytest.mark.parametrize('instance', testset) def test_instance(instance): s = Model() s.hideOutput() s.readProblem(instance) s.optimize() name = os.path.split(instance)[1] if name.rsplit('.',1)[1].lower() == 'gz': name = name.rsplit('.',2)[0] else: name = name.rsplit('.',1)[0] # we do not need the solution status primalbound = s.getObjVal() dualbound = s.getDualbound() # get solution data from solu file primalsolu = primalsolutions.get(name, None) dualsolu = dualsolutions.get(name, None) if s.getObjectiveSense() == 'minimize': assert relGE(primalbound, dualsolu) assert relLE(dualbound, primalsolu) else: if( primalsolu == infinity ): primalsolu = -infinity if( dualsolu == infinity ): dualsolu = -infinity assert relLE(primalbound, dualsolu) assert relGE(dualbound, primalsolu)
2,667
28.644444
85
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_tsp.py
from pyscipopt import Model, Conshdlr, quicksum, SCIP_RESULT import pytest itertools = pytest.importorskip("itertools") networkx = pytest.importorskip("networkx") EPS = 1.e-6 # subtour elimination constraint handler class TSPconshdlr(Conshdlr): def __init__(self, variables): self.variables = variables # find subtours in the graph induced by the edges {i,j} for which x[i,j] is positive # at the given solution; when solution is None, then the LP solution is used def find_subtours(self, solution = None): edges = [] x = self.variables for (i, j) in x: if self.model.getSolVal(solution, x[i, j]) > EPS: edges.append((i, j)) G = networkx.Graph() G.add_edges_from(edges) components = list(networkx.connected_components(G)) if len(components) == 1: return [] else: return components # checks whether solution is feasible, ie, if there are no subtours; # since the checkpriority is < 0, we are only called if the integrality # constraint handler didn't find infeasibility, so solution is integral def conscheck(self, constraints, solution, check_integrality, check_lp_rows, print_reason, completely, **results): if self.find_subtours(solution): return {"result": SCIP_RESULT.INFEASIBLE} else: return {"result": SCIP_RESULT.FEASIBLE} # enforces LP solution def consenfolp(self, constraints, n_useful_conss, sol_infeasible): subtours = self.find_subtours() if subtours: x = self.variables for subset in subtours: self.model.addCons(quicksum(x[i, j] for(i, j) in pairs(subset)) <= len(subset) - 1) print("cut: len(%s) <= %s" % (subset, len(subset) - 1)) return {"result": SCIP_RESULT.CONSADDED} else: return {"result": SCIP_RESULT.FEASIBLE} def conslock(self, constraint, locktype, nlockspos, nlocksneg): pass # builds tsp model; adds variables, degree constraint and the subtour elimination constaint handler def create_tsp(vertices, distance): model = Model("TSP") x = {} # binary variable to select edges for (i, j) in pairs(vertices): x[i, j] = model.addVar(vtype = "B", name = "x(%s,%s)" % (i, j)) for i in vertices: model.addCons(quicksum(x[j, i] for j in vertices if j < i) + quicksum(x[i, j] for j in vertices if j > i) == 2, "Degree(%s)" % i) conshdlr = TSPconshdlr(x) model.includeConshdlr(conshdlr, "TSP", "TSP subtour eliminator", chckpriority = -10, needscons = False) model.setBoolParam("misc/allowdualreds", False) model.setObjective(quicksum(distance[i, j] * x[i, j] for (i, j) in pairs(vertices)), "minimize") return model, x def solve_tsp(vertices, distance): model, x = create_tsp(vertices, distance) model.optimize() edges = [] for (i, j) in x: if model.getVal(x[i, j]) > EPS: edges.append((i, j)) return model.getObjVal(), edges # returns all undirected edges between vertices def pairs(vertices): return itertools.combinations(vertices, 2) def test_main(): vertices = [1, 2, 3, 4, 5, 6] distance = {(u, v):1 for (u, v) in pairs(vertices)} for u in vertices[:3]: for v in vertices[3:]: distance[u, v] = 10 objective_value, edges = solve_tsp(vertices, distance) print("Optimal tour:", edges) print("Optimal cost:", objective_value) if __name__ == "__main__": test_main()
3,707
30.159664
99
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/test_variablebounds.py
from pyscipopt import Model m = Model() x0 = m.addVar(lb=-5, ub=8) r1 = m.addVar() r2 = m.addVar() y0 = m.addVar(lb=3) t = m.addVar(lb=None) z = m.addVar() m.chgVarLbGlobal(x0, -2) m.chgVarUbGlobal(x0, 4) infeas, tightened = m.tightenVarLb(x0, -5) assert not infeas assert not tightened infeas, tightened = m.tightenVarLbGlobal(x0, -1) assert not infeas assert tightened infeas, tightened = m.tightenVarUb(x0, 3) assert not infeas assert tightened infeas, tightened = m.tightenVarUbGlobal(x0, 9) assert not infeas assert not tightened infeas, fixed = m.fixVar(z, 7) assert not infeas assert fixed assert m.delVar(z) m.addCons(r1 >= x0) m.addCons(r2 >= -x0) m.addCons(y0 == r1 +r2) m.setObjective(t) m.addCons(t >= r1 * (r1 - x0) + r2 * (r2 + x0)) m.optimize() print("x0", m.getVal(x0)) print("r1", m.getVal(r1)) print("r2", m.getVal(r2)) print("y0", m.getVal(y0)) print("t", m.getVal(t))
899
17.367347
48
py
PB-DFS
PB-DFS-master/PySCIPOpt/tests/util.py
from pyscipopt.scip import Model, is_memory_freed def is_optimized_mode(): s = Model() return is_memory_freed()
123
14.5
49
py
PB-DFS
PB-DFS-master/TRIG-GCN/config.py
import argparse parser = argparse.ArgumentParser() parser.add_argument( 'problem', choices=['mis', 'ca', 'ds', 'vc'], ) parser.add_argument('--learning_rate', default=0.01) parser.add_argument('--epochs', default=200) parser.add_argument('--hidden1', default=64) parser.add_argument('--dropout', default=0) parser.add_argument('--weight_decay', default=5e-4) parser.add_argument('--early_stopping', default=10) parser.add_argument('--max_degree', default=1) parser.add_argument('--num_layers', default=20) args = parser.parse_args()
544
29.277778
52
py
PB-DFS
PB-DFS-master/TRIG-GCN/inits.py
import tensorflow as tf import numpy as np def uniform(shape, scale=0.05, name=None): """Uniform init.""" initial = tf.random.uniform(shape, minval=-scale, maxval=scale, dtype=tf.float32) return tf.Variable(initial, name=name) def glorot(shape, name=None): """Glorot & Bengio (AISTATS 2010) init.""" init_range = np.sqrt(6.0/(shape[0]+shape[1])) initial = tf.random.uniform(shape, minval=-init_range, maxval=init_range, dtype=tf.float32) return tf.Variable(initial, name=name) def zeros(shape, name=None): """All zeros.""" initial = tf.zeros(shape, dtype=tf.float32) return tf.Variable(initial, name=name) def ones(shape, name=None): """All ones.""" initial = tf.ones(shape, dtype=tf.float32) return tf.Variable(initial, name=name)
791
28.333333
95
py
PB-DFS
PB-DFS-master/TRIG-GCN/layers.py
from inits import * import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from config import args keras.backend.set_floatx('float32') import sys, os # global unique layer ID dictionary for layer name assignment _LAYER_UIDS = {} def get_layer_uid(layer_name=''): """Helper function, assigns unique layer IDs.""" if layer_name not in _LAYER_UIDS: _LAYER_UIDS[layer_name] = 1 return 1 else: _LAYER_UIDS[layer_name] += 1 return _LAYER_UIDS[layer_name] def sparse_dropout(x, rate, noise_shape): """ Dropout for sparse tensors. """ random_tensor = 1 - rate random_tensor += tf.random.uniform(noise_shape) dropout_mask = tf.cast(tf.floor(random_tensor), dtype=tf.bool) pre_out = tf.sparse.retain(x, dropout_mask) return pre_out * (1./(1 - rate)) def dot(x, y, sparse=False): """ Wrapper for tf.matmul (sparse vs dense). """ if sparse: res = tf.sparse.sparse_dense_matmul(x, y) else: res = tf.matmul(x, y) return res class Dense(layers.Layer): """Dense layer.""" def __init__(self, input_dim, output_dim, wp='dense', act=tf.nn.relu, bias=True, **kwargs): super(Dense, self).__init__(**kwargs) self.act = act self.bias = bias self.wp = wp self.vars={} self.vars[f'{self.wp}_weights'] = self.add_weight( f'{self.wp}_weights', [input_dim, output_dim]) if self.bias: self.vars[f'{self.wp}_bias'] = self.add_weight( f'{self.wp}_bias', [output_dim]) def call(self, inputs): x = inputs # transform output = dot(x, self.vars[f'{self.wp}_weights'], sparse=False) # bias if self.bias: output += self.vars[f'{self.wp}_bias'] return self.act(output) class Attention(layers.Layer): def __init__(self, input_dim, act=tf.nn.softmax, wp='attn_weights', **kwargs): super(Attention, self).__init__(**kwargs) self.vars={} self.wp=wp self.input_dim = input_dim self.act = act self.vars[self.wp] = self.add_weight(self.wp, [input_dim, 1]) def call(self, input): logits = dot(input, self.vars[self.wp], sparse=False) norms = self.act(logits, axis=0) return norms class GraphConvolution(layers.Layer): """ Graph convolution layer. """ def __init__(self, attn_dict, act=tf.nn.relu, wp='TRI_GCN', **kwargs): super(GraphConvolution, self).__init__(**kwargs) self.vars={} self.wp = wp self.args = args self.weight_dim = args.hidden1*2 self.act = act self.attn_dict = attn_dict self.vars[f'{self.wp}_vc_weights'] = self.add_weight( f'{self.wp}_vc_weights', [self.weight_dim, args.hidden1]) self.vars[f'{self.wp}_cv_weights'] = self.add_weight( f'{self.wp}_cv_weights', [self.weight_dim, args.hidden1]) self.vars[f'{self.wp}_co_weights'] = self.add_weight( f'{self.wp}_co_weights', [self.weight_dim, args.hidden1]) self.vars[f'{self.wp}_oc_weights'] = self.add_weight( f'{self.wp}_oc_weights', [self.weight_dim, args.hidden1]) self.vars[f'{self.wp}_vo_weights'] = self.add_weight( f'{self.wp}_vo_weights', [self.weight_dim, args.hidden1]) self.vars[f'{self.wp}_ov_weights'] = self.add_weight( f'{self.wp}_ov_weights', [self.weight_dim, args.hidden1]) def call(self, inputs): zero = tf.constant(0, dtype=tf.float32) col_hidden, row_hidden, obj_hidden, cv_supp, vc_supp, vo_supp, co_supp = inputs ncols = col_hidden.shape[0] nrows = row_hidden.shape[0] if args.dropout != 0: col_hidden = tf.nn.dropout(col_hidden, 1-args.dropout) row_hidden = tf.nn.dropout(row_hidden, 1-args.dropout) obj_hidden = tf.nn.dropout(obj_hidden, 1-args.dropout) # convolve v -> o attn_coefs = self.attn_dict['attn_vo'](tf.concat([col_hidden, vo_supp, tf.broadcast_to(input=obj_hidden, shape=[ncols, args.hidden1])], axis=1)) # v_o_out: (?, 1).T (?, 64) -> (1, 64) v_o_out = dot(tf.transpose(attn_coefs), col_hidden) # obj_hidden: (1, 128) (128, 64) -> (1, 64) obj_hidden = self.act(dot( tf.concat([obj_hidden, v_o_out], axis=1), self.vars[f'{self.wp}_vo_weights'])) # convolve v,o -> c row_hidden_next = [] for i in tf.range(nrows): neighbor_cols_mask = tf.not_equal(cv_supp[0, i, :], zero) attn_coefs = self.attn_dict['attn_cv'](tf.concat([ tf.boolean_mask(col_hidden, neighbor_cols_mask, axis=0), tf.transpose(tf.boolean_mask(cv_supp[:, i, :], neighbor_cols_mask, axis=1)), tf.broadcast_to(row_hidden[i], [tf.reduce_sum(tf.cast(neighbor_cols_mask, dtype=tf.float32)), args.hidden1])], axis=1)) # v_out: (?, 1).T (?, 64) -> (1, 64) v_out = dot(tf.transpose(attn_coefs), tf.boolean_mask(col_hidden, neighbor_cols_mask, axis=0)) # o_c_out: (1, 64)) o_c_out = self.act( dot( tf.concat([obj_hidden, tf.expand_dims(row_hidden[i], 0)], axis=1), self.vars[f'{self.wp}_oc_weights'])) row_hidden_next.append(self.act(dot(tf.concat([o_c_out, v_out], axis=1), self.vars[f'{self.wp}_vc_weights']))) row_hidden_next = tf.squeeze(tf.stack(row_hidden_next)) # convolve c -> o attn_coefs = self.attn_dict['attn_co'](tf.concat([row_hidden_next, co_supp, tf.broadcast_to(obj_hidden, [nrows, args.hidden1])], axis=1)) c_o_out = dot(tf.transpose(attn_coefs), row_hidden_next) obj_hidden = self.act(dot(tf.concat([obj_hidden, c_o_out], axis=1), self.vars[f'{self.wp}_co_weights'])) # convolve c,o -> v col_hidden_next = [] for i in tf.range(ncols): neighbor_rows_mask = tf.not_equal(vc_supp[0,i,:], zero) attn_coefs = self.attn_dict['attn_vc'](tf.concat([ tf.boolean_mask(row_hidden_next, neighbor_rows_mask, axis=0), tf.transpose(tf.boolean_mask(vc_supp[:, i, :], neighbor_rows_mask, axis=1)), tf.broadcast_to(col_hidden[i], [tf.reduce_sum(tf.cast(neighbor_rows_mask, dtype=tf.float32)), args.hidden1])], axis=1)) c_out = dot(tf.transpose(attn_coefs), tf.boolean_mask(row_hidden_next, neighbor_rows_mask, axis=0)) o_v_out = self.act( dot( tf.concat([obj_hidden, tf.expand_dims(col_hidden[i], 0)], axis=1), self.vars[f'{self.wp}_ov_weights'])) col_hidden_next.append(self.act(dot(tf.concat([o_v_out, c_out], axis=1), self.vars[f'{self.wp}_cv_weights']))) col_hidden_next = tf.squeeze(tf.stack(col_hidden_next)) return col_hidden_next, row_hidden_next, obj_hidden, cv_supp, vc_supp, vo_supp, co_supp
7,122
41.147929
152
py
PB-DFS
PB-DFS-master/TRIG-GCN/metrics.py
import tensorflow as tf def masked_softmax_cross_entropy(preds, labels, mask): """ Softmax cross-entropy loss with masking. """ loss = tf.nn.softmax_cross_entropy_with_logits(logits=preds, labels=labels) mask = tf.cast(mask, dtype=tf.float32) mask /= tf.reduce_mean(mask) loss *= mask return tf.reduce_mean(loss) def masked_accuracy(preds, labels, mask): """ Accuracy with masking. """ correct_prediction = tf.equal(tf.argmax(preds, 1), tf.argmax(labels, 1)) accuracy_all = tf.cast(correct_prediction, tf.float32) mask = tf.cast(mask, dtype=tf.float32) mask /= tf.reduce_mean(mask) accuracy_all *= mask return tf.reduce_mean(accuracy_all)
711
27.48
79
py
PB-DFS
PB-DFS-master/TRIG-GCN/models.py
import tensorflow as tf from tensorflow import keras from layers import * from metrics import * from config import args class GCN(keras.Model): def __init__(self, output_dim, **kwargs): super(GCN, self).__init__(**kwargs) self.output_dim = output_dim self.col_feats_dim = 57 self.row_feats_dim = 26 # projection layers self.col_embedding = Dense(input_dim=self.col_feats_dim, output_dim=args.hidden1, act=tf.nn.relu, wp='col_emb') self.row_embedding = Dense(input_dim=self.row_feats_dim, output_dim=args.hidden1, act=tf.nn.relu, wp='row_emb') # attention layers self.attn_dim = args.hidden1*2+2 self.attn_vc = Attention(self.attn_dim, wp='attn_vc') self.attn_cv = Attention(self.attn_dim, wp='attn_cv') self.attn_vo = Attention(self.attn_dim, wp='attn_vo') self.attn_co = Attention(self.attn_dim, wp='attn_co') self.attn_dict = { 'attn_vc': self.attn_vc, 'attn_cv': self.attn_cv, 'attn_vo': self.attn_vo, 'attn_co': self.attn_co, } # tri-conv layers self.conv = GraphConvolution(self.attn_dict, wp=f'tri_conv_0') # 2 fully connected layers at the end of the gcn self.out1 = Dense(input_dim=args.hidden1*2, output_dim=32, act=tf.nn.relu,wp='out1') self.out2 = Dense(input_dim=32, output_dim=2, act=lambda x: x, wp='out2') def call(self, inputs): col_feats, row_feats, obj_hidden, cv_supp, vc_supp, vo_supp, co_supp, label, mask = inputs col_hidden_t0 = self.col_embedding(col_feats) row_hidden = self.row_embedding(row_feats) input = col_hidden_t0, row_hidden, obj_hidden, cv_supp, vc_supp, vo_supp, co_supp output = self.conv(input) col_hidden_tn = output[0] col_logits = self.out2(self.out1(tf.concat([col_hidden_t0, col_hidden_tn], axis=1))) # Weight decay loss loss = tf.zeros([]) for var in self.conv.trainable_variables: loss += args.weight_decay * tf.nn.l2_loss(var) # Cross entropy error loss += masked_softmax_cross_entropy(col_logits, label, mask) acc = masked_accuracy(col_logits, label, mask) return loss, acc def predict(self, inputs): col_feats, row_feats, obj_hidden, cv_supp, vc_supp, vo_supp, co_supp, label, mask = inputs col_hidden_t0 = self.col_embedding(col_feats) row_hidden = self.row_embedding(row_feats) input = col_hidden_t0, row_hidden, obj_hidden, cv_supp, vc_supp, vo_supp, co_supp output = self.conv(input) col_hidden_tn = output[0] col_logits = self.out2(self.out1(tf.concat([col_hidden_t0, col_hidden_tn], axis=1))) return tf.nn.softmax(col_logits)
3,032
37.884615
98
py
PB-DFS
PB-DFS-master/TRIG-GCN/test.py
import time, sys, os from utils import * from models import GCN from config import args import scipy.io as sio import numpy as np from copy import deepcopy import scipy.sparse as sp import sklearn.metrics as metrics from os.path import expanduser import gzip import pickle import pathlib import tensorflow as tf; os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' print('tf version:', tf.__version__) assert tf.__version__.startswith('2.') if __name__ == '__main__': filedir = os.path.dirname(__file__) model_dir = f'{filedir}/../trained_models/{args.problem}/TRIG-GCN' model = GCN( output_dim=2) model.load_weights(f'{model_dir}/model.ckpt') ####### data ####### for data_dir in ['test_small', 'test_medium']: data_path = f'{filedir}/../datasets/{args.problem}/{data_dir}' data_files = list(pathlib.Path(data_path).glob('sample_*.pkl')) data_files = [str(data_file) for data_file in data_files][:100] os.makedirs(f'{filedir}/../ret_model', exist_ok=True) logfile = f'{filedir}/../ret_model/{args.problem}_{data_dir}_TRIG_GCN.txt' nsamples = len(data_files) log(f'test dataset: <{data_path}>, number of instances: {nsamples}', logfile) log(f'log write to: <{logfile}>', logfile) t1 = time.time() ct=0 yss = [] yhss = [] ncands = [] for idd in range(nsamples): ct+=1 data = read_data(data_files[idd]) col_state, row_state, cv, vo, co, ys = read_data(data_files[idd]) obj_state = np.zeros((1, args.hidden1), dtype=np.float32) mask = np.ones((col_state.shape[0], ), dtype=int) ncols = col_state.shape[0]; nrows = row_state.shape[0] supp_cv = np.reshape( np.stack(preprocess_adj_lp_dense(cv)), (-1, nrows, ncols)) supp_vc = np.reshape( np.stack(preprocess_adj_lp_dense(cv.T)), (-1, ncols, nrows)) supp_vo = np.reshape( np.stack(preprocess_adj_lp_dense(vo)), (-1, 2)) supp_co = np.reshape( np.stack(preprocess_adj_lp_dense(co)), (-1, 2)) input = [col_state, row_state, obj_state, supp_cv, supp_vc, supp_vo, supp_co, ys, mask] probs = model.predict(input) # calcuate precision recall f1 y_pred = probs[:,1] y_true = ys[:,1] ncand = len(y_true) yss.append(y_true); yhss.append(y_pred); ncands.append(ncand) t2 = time.time() log(f'time per instance: {(t2-t1)/nsamples}', logfile=logfile) yss = np.concatenate(yss, axis=None) yhss = np.concatenate(yhss, axis=None) ncands = np.concatenate(ncands, axis=None) line, stats = calc_classification_metrics(yss, yhss, ncands) log(line, logfile) line, stats = calc_classification_metrics_top(yss, yhss, ncands) log(line, logfile) sys.stdout.flush()
2,959
34.662651
99
py
PB-DFS
PB-DFS-master/TRIG-GCN/train.py
import time, sys, os from utils import * from models import GCN from config import args import scipy.io as sio import numpy as np from copy import deepcopy import scipy.sparse as sp import sklearn.metrics as metrics from os.path import expanduser import gzip import pickle import pathlib import tensorflow as tf; from tensorflow.keras import optimizers os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' print('tf version:', tf.__version__) assert tf.__version__.startswith('2.') def log(line, f=None, stdout=True): if stdout: print(line) sys.stdout.flush() if f is not None: f.write(f'{line}\n') f.flush() # set random seed seed = 123 np.random.seed(seed) tf.random.set_seed(seed) if __name__ == '__main__': filedir = os.path.dirname(__file__) save_model_to = f'{filedir}/../trained_models/{args.problem}/TRIG-GCN' os.makedirs(save_model_to, exist_ok=True) ####### model ####### col_dim = 57; row_dim = 26; model = GCN( output_dim=2) ####### data ####### data_path = f'{filedir}/../datasets/{args.problem}/train' data_files = list(pathlib.Path(data_path).glob('sample_*.pkl')) data_files = [str(data_file) for data_file in data_files][:500] ####### Train model ####### log_file=open(f"{save_model_to}/score.txt",'w+') samples_per_epoch = len(data_files) samples_per_log = samples_per_epoch // 20 print(f'dataset size: {len(data_files)}, samples_per_log: {samples_per_log}') best_loss = 1e9 optimizer = optimizers.Adam(lr=1e-2) for epoch in range(args.epochs): ct = 0 t1 = time.time() all_loss = [] all_acc = [] for idd in range(samples_per_epoch): ct += 1 t2 = time.time() col_state, row_state, cv, vo, co, label = read_data(data_files[idd]) obj_state = np.zeros((1, args.hidden1), dtype=np.float32) mask = np.ones((col_state.shape[0], ), dtype=int) ncols = col_state.shape[0]; nrows = row_state.shape[0] supp_cv = np.reshape( np.stack(preprocess_adj_lp_dense(cv)), (-1, nrows, ncols)) supp_vc = np.reshape( np.stack(preprocess_adj_lp_dense(cv.T)), (-1, ncols, nrows)) supp_vo = np.reshape( np.stack(preprocess_adj_lp_dense(vo)), (-1, 2)) supp_co = np.reshape( np.stack(preprocess_adj_lp_dense(co)), (-1, 2)) input = [col_state, row_state, obj_state, supp_cv, supp_vc, supp_vo, supp_co, label, mask] with tf.GradientTape() as tape: loss, acc = model(input) grads = tape.gradient(loss, model.trainable_variables) optimizer.apply_gradients(zip(grads, model.trainable_variables)) all_loss.append(loss) all_acc.append(acc) if ct % samples_per_log == 0: line = '{} {} loss={:.4f} acc={:.4f} time_sample={:.1f}'.format( epoch + 1, ct, np.mean(all_loss[-samples_per_log:]), np.mean(all_acc[-samples_per_log:]), time.time() - t2) log(line, log_file) loss_cur_epoch = np.mean(all_loss) line = '[{} finished!] loss={:.4f} acc={:.4f} time_epoch={:.1f}'.format( epoch + 1, loss_cur_epoch, np.mean(all_acc), time.time() - t1) log(line, log_file) if loss_cur_epoch < best_loss: log(f'best model currently, save to {save_model_to}', log_file) model.save_weights(f'{save_model_to}/model.ckpt') best_loss = loss_cur_epoch sys.stdout.flush() log_file.flush(); log_file.close() print("Optimization Finished!")
3,691
33.504673
102
py
PB-DFS
PB-DFS-master/TRIG-GCN/utils.py
import numpy as np import pickle import networkx as nx import scipy.sparse as sp from scipy.sparse.linalg.eigen.arpack import eigsh, eigs import sys import datetime import scipy.io as sio import sklearn.metrics as sk_metrics import gzip import math def parse_index_file(filename): """Parse index file.""" index = [] for line in open(filename): index.append(int(line.strip())) return index def sample_mask(idx, l): """Create mask.""" mask = np.zeros(l) mask[idx] = 1 return np.array(mask, dtype=np.bool) def sparse_to_tuple(sparse_mx): """Convert sparse matrix to tuple representation.""" def to_tuple(mx): if not sp.isspmatrix_coo(mx): mx = mx.tocoo() coords = np.vstack((mx.row, mx.col)).transpose() values = mx.data shape = mx.shape return coords, values, shape if isinstance(sparse_mx, list): for i in range(len(sparse_mx)): sparse_mx[i] = to_tuple(sparse_mx[i]) else: sparse_mx = to_tuple(sparse_mx) return sparse_mx def preprocess_features(features): """Row-normalize feature matrix and convert to tuple representation""" rowsum = np.array(features.sum(1)) r_inv = np.power(rowsum, -1).flatten() r_inv[np.isinf(r_inv)] = 0. r_mat_inv = sp.diags(r_inv) features = r_mat_inv.dot(features) # features = features/features.shape[1] return sparse_to_tuple(features) def normalize_adj(adj): """Symmetrically normalize adjacency matrix.""" adj = sp.coo_matrix(adj) rowsum = np.array(adj.sum(1)) with np.errstate(divide='ignore'): d_inv_sqrt = np.power(rowsum, -0.5).flatten() d_inv_sqrt[np.isinf(d_inv_sqrt)] = 0. d_mat_inv_sqrt = sp.diags(d_inv_sqrt) return adj.dot(d_mat_inv_sqrt).transpose().dot(d_mat_inv_sqrt).tocoo() def preprocess_adj(adj): """Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation.""" # adj_normalized = normalize_adj(adj) adj_normalized = normalize_adj(adj + sp.eye(adj.shape[0])) # adj_normalized = sp.coo_matrix(adj) return sparse_to_tuple(adj_normalized) def preprocess_adj_lp_sparse(adj): """Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation.""" # adj_normalized = normalize_adj(adj) adj_normalized = normalize_adj(adj + sp.eye(adj.shape[0])) # adj_normalized = sp.coo_matrix(adj) t_k = [adj, adj_normalized] return sparse_to_tuple(t_k) def preprocess_adj_lp_dense(adj): def normalize(input): input_min = np.min(input, axis=0, keepdims=True) input_max = np.max(input, axis=0, keepdims=True) input_delta = input_max - input_min input_delta[input_delta==0] = 1 input = (input - input_min)/input_delta return input t_k = [adj, normalize(adj)] return t_k def simple_polynomials(adj, k): """Calculate polynomials up to order k. Return a list of sparse matrices (tuple representation).""" # print("Calculating polynomials up to order {}...".format(k)) adj_normalized = normalize_adj(adj) laplacian = sp.eye(adj.shape[0]) - adj_normalized t_k = list() t_k.append(sp.eye(adj.shape[0])) t_k.append(laplacian) for i in range(2, k+1): t_new = t_k[-1]*laplacian t_k.append(t_new) return sparse_to_tuple(t_k) def simple_polynomials_to_dense(adj, k): """Calculate polynomials up to order k. Return a list of sparse matrices (tuple representation).""" adj_normalized = normalize_adj(adj) laplacian = sp.eye(adj.shape[0]) - adj_normalized t_k = list() t_k.append(sp.eye(adj.shape[0])) t_k.append(laplacian) for i in range(2, k+1): t_new = t_k[-1]*laplacian t_k.append(t_new) for i in range(len(t_k)): t_k[i] = t_k[i].toarray() return t_k def log(line, logfile=None): line = f'[{datetime.datetime.now()}] {line}' if line is not None else "\n\n\n\n" print(line) if logfile is not None: with open(logfile, mode='a') as f: print(line, file=f) sys.stdout.flush() def read_data(lp_path): def normalize(input): input_min = np.min(input, axis=0, keepdims=True) input_max = np.max(input, axis=0, keepdims=True) input_delta = input_max - input_min input_delta[input_delta==0] = 1 input = (input - input_min)/input_delta input[np.isnan(input)] = 0 return input with gzip.open(lp_path, 'rb') as f: sample = pickle.load(f) state, label_cols, cand_cols, _ = sample['data'] col_state, row_state, cv, vo, co = state label_cols = np.squeeze(label_cols) cand_cols = np.squeeze(cand_cols) ys = np.expand_dims(np.isin(cand_cols, label_cols), axis=1) ys = np.concatenate([1-ys, ys],axis=1) col_state = normalize(np.nan_to_num(col_state[cand_cols])).astype(np.float32) row_state = normalize(np.nan_to_num(row_state)).astype(np.float32) cv = np.take(cv, cand_cols, axis=1) vo = vo[cand_cols] return col_state, row_state, cv, vo, co, ys def calc_classification_metrics_top(y_true, y_pred, ncands=None, top_percentages=[0.80, 0.90 ,0.95, 1], threshold=0.5): def calc_single(y_true_single, y_pred_single): test_yhats_roundings = (y_pred_single > threshold).astype(int) acc = np.sum(y_true_single == test_yhats_roundings) / len(y_true_single) precision, recall, f1_score, _ = sk_metrics.precision_recall_fscore_support( y_true_single, test_yhats_roundings, labels=[0,1]) return acc, f1_score[0], f1_score[1], precision[0], precision[1] if ncands is None: ret = {} y_pred_confidence = np.where( y_pred < threshold, y_pred, 1 - y_pred) sortedargs = np.argsort(y_pred_confidence) for cur_percentage in top_percentages: num_vars_choosen = int(len(y_true)*cur_percentage) sortedargs_cur_percentage = sortedargs[:num_vars_choosen] stats = calc_single(y_true[sortedargs_cur_percentage], y_pred[sortedargs_cur_percentage]) ret[cur_percentage] = [[stats[i]] for i in range(len(stats))] else: ncands = np.insert(ncands, 0,0) slices = np.cumsum(ncands) mean_stats = {key: [] for key in top_percentages} for i in range(len(slices)-1): begin = slices[i]; end = slices[i+1] y_true_sinlge = y_true[begin:end]; y_pred_single = y_pred[begin:end] y_pred_confidence = np.where( y_pred_single < threshold, y_pred_single, 1 - y_pred_single) sortedargs = np.argsort(y_pred_confidence) for cur_percentage in top_percentages: num_vars_choosen = int(len(y_true_sinlge)*cur_percentage) # print(num_vars_choosen, len(y_true)) sortedargs_cur_percentage = sortedargs[:num_vars_choosen] # print(len(sortedargs_cur_percentage), len(sortedargs)) stats = calc_single(y_true_sinlge[sortedargs_cur_percentage], y_pred_single[sortedargs_cur_percentage]) mean_stats[cur_percentage].append(stats) ret = {key: [] for key in top_percentages} for cur_percentage in top_percentages: for stat in zip(*mean_stats[cur_percentage]): ret[cur_percentage].append((np.mean(stat) * 100, np.std(stat) * 100)) line = "" for p in top_percentages: line += f'percentage vars: {p} mean - acc: {ret[p][0][0]:0.2f}, f1_0: {ret[p][1][0]:0.2f}, f1_1: {ret[p][2][0]:0.2f}, p_0: {ret[p][3][0]:0.2f}, p1: {ret[p][4][0]:0.2f}\n' line += f'percentage vars: {p} std - acc: {ret[p][0][1]:0.2f}, f1_0: {ret[p][1][1]:0.2f}, f1_1: {ret[p][2][1]:0.2f}, p_0: {ret[p][3][1]:0.2f}, p1: {ret[p][4][1]:0.2f}\n\n' return line, ret def calc_classification_metrics(y_true, y_pred, ncands=None, threshold=0.5): def calc_single(y_true_single, y_pred_single): test_yhats_roundings = (y_pred_single > threshold).astype(int) acc = np.sum(y_true_single == test_yhats_roundings) / len(y_true_single) precision, recall, f1_score, _ = sk_metrics.precision_recall_fscore_support( y_true_single, test_yhats_roundings, labels=[0,1]) avg_precision = sk_metrics.average_precision_score(y_true_single, y_pred_single) return acc, np.nan_to_num(avg_precision), precision[0], recall[0], f1_score[0], precision[1], recall[1], f1_score[1] if ncands is None: mean_stats = calc_single(y_true, y_pred) mean_stats = [[mean_stats[i]] for i in range(len(mean_stats))] else: ncands = np.insert(ncands, 0,0) slices = np.cumsum(ncands) metricss = []; APs = [] for i in range(len(slices)-1): begin = slices[i]; end = slices[i+1] metrics = calc_single(y_true[begin:end], y_pred[begin:end]) metricss.append(metrics) APs.append(str(float(metrics[1]))) mean_stats = [] for stat in zip(*metricss): mean_stats.append(np.mean(stat) * 100) line = f'acc: {mean_stats[0]:0.2f}, ap: {mean_stats[1]:0.2f}\ \np_0: {mean_stats[2]:0.2f}, r_0: {mean_stats[3]:0.2f}, f1_0: {mean_stats[4]:0.2f},\ \np_1: {mean_stats[5]:0.2f}, r_1: {mean_stats[6]:0.2f}, f1_1: {mean_stats[7]:0.2f}' line += f"\n APs: {','.join(APs)}" return line, mean_stats
9,448
37.884774
179
py
PB-DFS
PB-DFS-master/data_generator/utils.py
import numpy as np import pyscipopt as scip def init_scip_params(model, seed, heuristics=False, presolving=False, separating=False, conflict=True): seed = seed % 2147483648 # SCIP seed range # set up randomization model.setBoolParam('randomization/permutevars', False) model.setIntParam('randomization/permutationseed', seed) model.setIntParam('randomization/randomseedshift', seed) # separation only at root node model.setIntParam('separating/maxrounds', 0) # if asked, disable presolving if not presolving: model.setIntParam('presolving/maxrounds', 0) model.setIntParam('presolving/maxrestarts', 0) # if asked, disable separating (cuts) if not separating: model.setIntParam('separating/maxroundsroot', 0) # if asked, disable conflict analysis (more cuts) if not conflict: model.setBoolParam('conflict/enable', False) # if asked, disable primal heuristics if not heuristics: model.setHeuristics(scip.SCIP_PARAMSETTING.OFF) def extract_ding_variable_features(model): """ Extract features following Khalil et al. (2016) Learning to Branch in Mixed Integer Programming. Parameters ---------- model : pyscipopt.scip.Model The current model. candidates : list of pyscipopt.scip.Variable's A list of variables for which to compute the variable features. root_buffer : dict A buffer to avoid re-extracting redundant root node information (None to deactivate buffering). Returns ------- variable_features : 2D np.ndarray The features associated with the candidate variables. """ col_state = model.getDingStateCols() col_feature_names = sorted(col_state) for index, name in enumerate(col_feature_names): if name == 'col_coefs': break col_state = np.stack([col_state[feature_name] for feature_name in col_feature_names], axis=1) row_state = model.getDingStateRows() row_feature_names = sorted(row_state) row_state = np.stack([row_state[feature_name] for feature_name in row_feature_names], axis=1) vc, vo, co = model.getDingStateLPgraph() return (col_state, row_state, vc, vo, co), index
2,228
32.268657
103
py
PB-DFS
PB-DFS-master/data_generator/ca/gen_inst_ca.py
import os, sys import argparse import numpy as np import scipy.sparse import scipy.io as sio from itertools import combinations from os.path import expanduser from os import path import re from functools import cmp_to_key import random import gurobipy as gp from gurobipy import * def generate_ca(random, filename, n_items=100, n_bids=500, min_value=1, max_value=20, value_deviation=0.5, add_item_prob=0.9, max_n_sub_bids=5, additivity=0.2, budget_factor=1.5, resale_factor=0.5, integers=False, warnings=False): """ Generate a Combinatorial Auction problem following the 'arbitrary' scheme found in section 4.3. of Kevin Leyton-Brown, Mark Pearson, and Yoav Shoham. (2000). Towards a universal test suite for combinatorial auction algorithms. Proceedings of ACM Conference on Electronic Commerce (EC-00) 66-76. Saves it as a CPLEX LP file. Parameters ---------- random : numpy.random.RandomState A random number generator. filename : str Path to the file to save. n_items : int The number of items. n_bids : int The number of bids. min_value : int The minimum resale value for an item. max_value : int The maximum resale value for an item. value_deviation : int The deviation allowed for each bidder's private value of an item, relative from max_value. add_item_prob : float in [0, 1] The probability of adding a new item to an existing bundle. max_n_sub_bids : int The maximum number of substitutable bids per bidder (+1 gives the maximum number of bids per bidder). additivity : float Additivity parameter for bundle prices. Note that additivity < 0 gives sub-additive bids, while additivity > 0 gives super-additive bids. budget_factor : float The budget factor for each bidder, relative to their initial bid's price. resale_factor : float The resale factor for each bidder, relative to their initial bid's resale value. integers : logical Should bid's prices be integral ? warnings : logical Should warnings be printed ? """ assert min_value >= 0 and max_value >= min_value assert add_item_prob >= 0 and add_item_prob <= 1 def choose_next_item(bundle_mask, interests, compats, add_item_prob, random): n_items = len(interests) prob = (1 - bundle_mask) * interests * compats[bundle_mask, :].mean(axis=0) prob /= prob.sum() return random.choice(n_items, p=prob) # common item values (resale price) values = min_value + (max_value - min_value) * random.rand(n_items) # item compatibilities compats = np.triu(random.rand(n_items, n_items), k=1) compats = compats + compats.transpose() compats = compats / compats.sum(1) bids = [] n_dummy_items = 0 # create bids, one bidder at a time while len(bids) < n_bids: # bidder item values (buy price) and interests private_interests = random.rand(n_items) private_values = values + max_value * value_deviation * (2 * private_interests - 1) # substitutable bids of this bidder bidder_bids = {} # generate initial bundle, choose first item according to bidder interests prob = private_interests / private_interests.sum() item = random.choice(n_items, p=prob) bundle_mask = np.full(n_items, 0) bundle_mask[item] = 1 # add additional items, according to bidder interests and item compatibilities while random.rand() < add_item_prob: # stop when bundle full (no item left) if bundle_mask.sum() == n_items: break item = choose_next_item(bundle_mask, private_interests, compats, add_item_prob, random) bundle_mask[item] = 1 bundle = np.nonzero(bundle_mask)[0] # compute bundle price with value additivity price = private_values[bundle].sum() + np.power(len(bundle), 1 + additivity) if integers: price = int(price) # drop negativaly priced bundles if price < 0: if warnings: print("warning: negatively priced bundle avoided") continue # bid on initial bundle bidder_bids[frozenset(bundle)] = price # generate candidates substitutable bundles sub_candidates = [] for item in bundle: # at least one item must be shared with initial bundle bundle_mask = np.full(n_items, 0) bundle_mask[item] = 1 # add additional items, according to bidder interests and item compatibilities while bundle_mask.sum() < len(bundle): item = choose_next_item(bundle_mask, private_interests, compats, add_item_prob, random) bundle_mask[item] = 1 sub_bundle = np.nonzero(bundle_mask)[0] # compute bundle price with value additivity sub_price = private_values[sub_bundle].sum() + np.power(len(sub_bundle), 1 + additivity) if integers: sub_price = int(sub_price) sub_candidates.append((sub_bundle, sub_price)) # filter valid candidates, higher priced candidates first budget = budget_factor * price min_resale_value = resale_factor * values[bundle].sum() for bundle, price in [ sub_candidates[i] for i in np.argsort([-price for bundle, price in sub_candidates])]: if len(bidder_bids) >= max_n_sub_bids + 1 or len(bids) + len(bidder_bids) >= n_bids: break if price < 0: if warnings: print("warning: negatively priced substitutable bundle avoided") continue if price > budget: if warnings: print("warning: over priced substitutable bundle avoided") continue if values[bundle].sum() < min_resale_value: if warnings: print("warning: substitutable bundle below min resale value avoided") continue if frozenset(bundle) in bidder_bids: if warnings: print("warning: duplicated substitutable bundle avoided") continue bidder_bids[frozenset(bundle)] = price # add XOR constraint if needed (dummy item) if len(bidder_bids) > 2: dummy_item = [n_items + n_dummy_items] n_dummy_items += 1 else: dummy_item = [] # place bids for bundle, price in bidder_bids.items(): bids.append((list(bundle) + dummy_item, price)) # generate the LP file with open(filename, 'w') as file: bids_per_item = [[] for item in range(n_items + n_dummy_items)] file.write("maximize\nOBJ:") for i, bid in enumerate(bids): bundle, price = bid file.write(f" +{price} x{i+1}") for item in bundle: bids_per_item[item].append(i) file.write("\n\nsubject to\n") ctr=1 for item_bids in bids_per_item: if item_bids: file.write(f"C{ctr}:") ctr+=1 for i in item_bids: file.write(f" +1 x{i+1}") file.write(f" <= 1\n") file.write("\nbinary\n") for i in range(len(bids)): file.write(f" x{i+1}") def solve_single(lp_path, sol_path, time_limit=200): print(f'process lp: {lp_path}') model = gp.read(lp_path) model.setParam('TimeLimit', time_limit) # set a time limit model.setParam('OutputFlag', 0) # disable logging model.optimize() if model.status != GRB.OPTIMAL: print(f'problem is too hard to solve within {time_limit}, skipping!') return print(f'problem is solved with {round(model.runtime, 1)} seconds') with open( sol_path, 'w+') as f: # f.write('Obj: %f\n' % model.objVal) for v in model.getVars(): if int(v.x) == 1 and v.varName[0] == 'x' : f.write(f'{v.varName[1:]}\n') def solve_ca(lp_path, time_limit=200): sol_file_path = f'{lp_path[:-2]}sol' if os.path.exists(sol_file_path): print(f'{lp_path} has been processed, skipping!') return solve_single(lp_path, sol_file_path, time_limit=time_limit) sys.stdout.flush() def gen_ca(data_dir, ninst, nitems, nbids, nitems_upper=None, nbids_upper=None, solve=True): os.makedirs(data_dir, exist_ok=True) for i in range(ninst): nitems = nitems if nitems_upper is None else random.randint(nitems, nitems_upper+1) nbids = nbids if nbids_upper is None else random.randint(nbids, nbids_upper+1) rng = np.random.RandomState(i) lp_path = os.path.join(data_dir, f'{i}.lp') print(f'generate {lp_path}') generate_ca(rng, lp_path, nitems, nbids) if solve: sol_path = solve_ca(lp_path) if __name__ == '__main__': home = expanduser("~") # data_dir = os.path.join(home, f'storage1/instances/ca/train_100-500-1.5') # gen_ca(data_dir, 500, 100, 500, nitems_upper=150, nbids_upper=750, solve=True) data_dir = os.path.join(home, f'storage1/instances/ca/time_100-500') gen_ca(data_dir, 30, 100, 500, solve=False) data_dir = os.path.join(home, f'storage1/instances/ca/time_200-1000') gen_ca(data_dir, 30, 200, 1000, solve=False) data_dir = os.path.join(home, f'storage1/instances/ca/time_300-1500') gen_ca(data_dir, 30, 300, 1500, solve=False) data_dir = os.path.join(home, f'storage1/instances/ca/time_400-2000') gen_ca(data_dir, 30, 400, 2000, solve=False) data_dir = os.path.join(home, f'storage1/instances/ca/time_500-2500') gen_ca(data_dir, 30, 500, 2500, solve=False)
9,967
36.473684
145
py
PB-DFS
PB-DFS-master/data_generator/ca/make_sample_ca.py
import os import sys import os sys.path.append( f'{os.path.dirname(os.path.realpath(__file__))}/../') import argparse import multiprocessing as mp import pickle import glob import numpy as np import shutil import gzip from os.path import expanduser import pyscipopt as scip import utils def read_sol_file(filepath): sol = set() with open(filepath, 'r') as f: lines = f.readlines() for line in lines: var_name = line.strip() sol.add(var_name) sol.add(f't_x{var_name}') return sol class SamplingAgent(scip.Branchrule): def __init__(self, sol, write_to): self.sol = sol self.write_to = write_to def branchexeclp(self, allowaddcons): if self.model.getNNodes() == 1: ys = [] cands = [] cands_dict = self.model.getMapping() name_index_mapping = {} for lp_col_idx, name in cands_dict.items(): cands.append(lp_col_idx) if name in self.sol: ys.append(lp_col_idx) name_index_mapping[name] = lp_col_idx state_ding, obj_coef_idx = utils.extract_ding_variable_features(self.model) data = [state_ding, ys, cands, obj_coef_idx] with gzip.open(self.write_to, 'wb') as f: pickle.dump({ 'data': data, 'mapping': name_index_mapping, }, f) print(f'write {self.write_to}\n') # end the scip solving process self.model.interruptSolve() else: self.model.interruptSolve() # result = self.model.executeBranchRule('relpscost', False) return {"result": scip.SCIP_RESULT.DIDNOTRUN} def collect_samples(data_dir): require_sol = 'eval' not in data_dir and 'time' not in data_dir def collect_single(id, sol_path=None): sample_file = os.path.join(data_dir, f'sample_{id}.pkl') if os.path.exists(sample_file): print(f"skipping {sample_file}") sys.stdout.flush() return m = scip.Model() m.setIntParam('display/verblevel', 0) m.readProblem(os.path.join(data_dir, f'{id}.lp')) utils.init_scip_params(m, presolving=False, seed=0) print(f"begin collect {os.path.join(data_dir, f'sample_{id}.pkl')}") sys.stdout.flush() branchrule = SamplingAgent( sol = read_sol_file(sol_path) if require_sol else set(), write_to=os.path.join(data_dir, f'sample_{id}.pkl')) m.includeBranchrule( branchrule=branchrule, name="Sampling branching rule", desc="", priority=666666, maxdepth=-1, maxbounddist=1) m.optimize() m.freeProb() if require_sol: # construct training and test data, must have .sol for each .lp ids = []; sols = [] for i in range(0, 3000): sol_filepath = os.path.join(data_dir, f'{i}.sol') if os.path.exists(sol_filepath): ids.append(i) sols.append(sol_filepath) for cur_id, cur_sol_path in zip(ids, sols): collect_single(cur_id, cur_sol_path) else: # construct training and test data, for all .lp files for i in range(0, 30): collect_single(i, None) def remove_broken_sample(data_dir): for i in range(0, 3000): sample_file = os.path.join(data_dir, f'sample_{i}.pkl') if os.path.exists(sample_file): try: with gzip.open(sample_file, 'rb') as f: sample = pickle.load(f) except: print(f'<{sample_file}> is broken. removing...') os.remove(sample_file) if __name__ == '__main__': parser = argparse.ArgumentParser() home = expanduser("~") # data_dir = f'{home}/storage1/instances/ca/train_100-500-1.5' # remove_broken_sample(data_dir) # collect_samples(data_dir) # data_dir = f'{home}/storage1/instances/ca/eval_300-1500' # remove_broken_sample(data_dir) # collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ca/time_100-500' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ca/time_200-1000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ca/time_300-1500' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ca/time_400-2000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ca/time_500-2500' collect_samples(data_dir)
4,648
31.739437
91
py
PB-DFS
PB-DFS-master/data_generator/ds/gen_inst_ds.py
import os, sys import argparse import numpy as np import scipy.sparse import scipy.io as sio from itertools import combinations from os.path import expanduser from os import path import re from functools import cmp_to_key import random import gurobipy as gp from gurobipy import * class Graph: """ Container for a graph. Parameters ---------- number_of_nodes : int The number of nodes in the graph. edges : set of tuples (int, int) The edges of the graph, where the integers refer to the nodes. degrees : numpy array of integers The degrees of the nodes in the graph. neighbors : dictionary of type {int: set of ints} The neighbors of each node in the graph. """ def __init__(self, number_of_nodes, edges, degrees, neighbors): self.number_of_nodes = number_of_nodes self.edges = edges self.degrees = degrees self.neighbors = neighbors def __len__(self): """ The number of nodes in the graph. """ return self.number_of_nodes @staticmethod def barabasi_albert(number_of_nodes, affinity, random): """ Generate a Barabási-Albert random graph with a given edge probability. Parameters ---------- number_of_nodes : int The number of nodes in the graph. affinity : integer >= 1 The number of nodes each new node will be attached to, in the sampling scheme. random : numpy.random.RandomState A random number generator. Returns ------- Graph The generated graph. """ assert affinity >= 1 and affinity < number_of_nodes edges = set() degrees = np.zeros(number_of_nodes, dtype=int) neighbors = {node: set() for node in range(number_of_nodes)} for new_node in range(affinity, number_of_nodes): # first node is connected to all previous ones (star-shape) if new_node == affinity: neighborhood = np.arange(new_node) # remaining nodes are picked stochastically else: neighbor_prob = degrees[:new_node] / (2*len(edges)) neighborhood = random.choice(new_node, affinity, replace=False, p=neighbor_prob) for node in neighborhood: edges.add((node, new_node)) degrees[node] += 1 degrees[new_node] += 1 neighbors[node].add(new_node) neighbors[new_node].add(node) graph = Graph(number_of_nodes, edges, degrees, neighbors) return graph def generate_ds(graph, filename): """ Generate a Maximum Independent Set (also known as Maximum Stable Set) instance in CPLEX LP format from a previously generated graph. Parameters ---------- graph : Graph The graph from which to build the independent set problem. filename : str Path to the file to save. """ with open(filename, 'w') as lp_file: lp_file.write("minimize\nOBJ:" + "".join([f" + 1 x{node+1}" for node in range(len(graph))]) + "\n") lp_file.write("\nsubject to\n") for count, node in enumerate(range(len(graph))): neighbors = graph.neighbors[node] cons = f"+1 x{node+1}" + "".join([f" +1 x{j+1}" for j in neighbors]) lp_file.write(f"C{count+1}: {cons} >= 1\n") lp_file.write("\nbinary\n" + " ".join([f"x{node+1}" for node in range(len(graph))]) + "\n") def solve_single(lp_path, sol_path, time_limit=500): print(f'process lp: {lp_path}') model = gp.read(lp_path) model.setParam('TimeLimit', time_limit) # set a time limit model.setParam('OutputFlag', 0) # disable logging model.optimize() if model.status != GRB.OPTIMAL: print(f'problem is too hard to solve within {time_limit}, skipping!') return print(f'problem is solved with {round(model.runtime, 1)} seconds') with open( sol_path, 'w+') as f: # f.write('Obj: %f\n' % model.objVal) for v in model.getVars(): if int(v.x) == 1 and v.varName[0] == 'x' : f.write(f'{v.varName[1:]}\n') def solve_ds(lp_path, time_limit=200): sol_file_path = f'{lp_path[:-2]}sol' if os.path.exists(sol_file_path): print(f'{lp_path} has been processed, skipping!') return solve_single(lp_path, sol_file_path, time_limit=time_limit) sys.stdout.flush() def gen_ds(data_dir, ninst, scale_lower, scale_upper=None, solve=True): os.makedirs(data_dir, exist_ok=True) affinity = 4 for i in range(ninst): nnodes = scale_lower if scale_upper is None else random.randint(scale_lower, scale_upper+1) graph = Graph.barabasi_albert(nnodes, affinity, np.random.RandomState(i)) lp_path = os.path.join(data_dir, f'{i}.lp') generate_ds(graph, lp_path) if solve: sol_path = solve_ds(lp_path) if __name__ == '__main__': home = expanduser("~") # data_dir = os.path.join(home, f'storage1/instances/ds/train_500-1000') # gen_ds(data_dir, 500, 500, 1000, solve=True) # data_dir = os.path.join(home, f'storage1/instances/ds/time_1000') # gen_ds(data_dir, 30, 1000, solve=False) # data_dir = os.path.join(home, f'storage1/instances/ds/time_3000') # gen_ds(data_dir, 30, 3000, solve=False) # data_dir = os.path.join(home, f'storage1/instances/ds/time_5000') # gen_ds(data_dir, 30, 5000, solve=False) # data_dir = os.path.join(home, f'storage1/instances/ds/time_7000') # gen_ds(data_dir, 30, 7000, solve=False) # data_dir = os.path.join(home, f'storage1/instances/ds/time_9000') # gen_ds(data_dir, 30, 9000, solve=False)
5,785
33.035294
107
py
PB-DFS
PB-DFS-master/data_generator/ds/make_sample_ds.py
import os import sys import os sys.path.append( f'{os.path.dirname(os.path.realpath(__file__))}/../') import argparse import multiprocessing as mp import pickle import glob import numpy as np import shutil import gzip from os.path import expanduser import pyscipopt as scip import utils def read_sol_file(filepath): sol = set() with open(filepath, 'r') as f: lines = f.readlines() for line in lines: var_name = line.strip() sol.add(var_name) sol.add(f't_x{var_name}') return sol class SamplingAgent(scip.Branchrule): def __init__(self, sol, write_to): self.sol = sol self.write_to = write_to def branchexeclp(self, allowaddcons): if self.model.getNNodes() == 1: ys = [] cands = [] cands_dict = self.model.getMapping() name_index_mapping = {} for lp_col_idx, name in cands_dict.items(): cands.append(lp_col_idx) if name in self.sol: ys.append(lp_col_idx) name_index_mapping[name] = lp_col_idx state_ding, obj_coef_idx = utils.extract_ding_variable_features(self.model) data = [state_ding, ys, cands, obj_coef_idx] with gzip.open(self.write_to, 'wb') as f: pickle.dump({ 'data': data, 'mapping': name_index_mapping, }, f) print(f'write {self.write_to}\n') # end the scip solving process self.model.interruptSolve() else: self.model.interruptSolve() # result = self.model.executeBranchRule('relpscost', False) return {"result": scip.SCIP_RESULT.DIDNOTRUN} def collect_samples(data_dir): require_sol = 'eval' not in data_dir and 'time' not in data_dir def collect_single(id, sol_path=None): sample_file = os.path.join(data_dir, f'sample_{id}.pkl') if os.path.exists(sample_file): print(f"skipping {sample_file}") sys.stdout.flush() return m = scip.Model() m.setIntParam('display/verblevel', 0) m.readProblem(os.path.join(data_dir, f'{id}.lp')) utils.init_scip_params(m, presolving=False, seed=0) print(f"begin collect {os.path.join(data_dir, f'sample_{id}.pkl')}") sys.stdout.flush() branchrule = SamplingAgent( sol = read_sol_file(sol_path) if require_sol else set(), write_to=os.path.join(data_dir, f'sample_{id}.pkl')) m.includeBranchrule( branchrule=branchrule, name="Sampling branching rule", desc="", priority=666666, maxdepth=-1, maxbounddist=1) m.optimize() m.freeProb() if require_sol: # construct training and test data, must have .sol for each .lp ids = []; sols = [] for i in range(0, 3000): sol_filepath = os.path.join(data_dir, f'{i}.sol') if os.path.exists(sol_filepath): ids.append(i) sols.append(sol_filepath) for cur_id, cur_sol_path in zip(ids, sols): collect_single(cur_id, cur_sol_path) else: # construct training and test data, for all .lp files for i in range(0, 30): collect_single(i, None) def remove_broken_sample(data_dir): for i in range(0, 3000): sample_file = os.path.join(data_dir, f'sample_{i}.pkl') if os.path.exists(sample_file): try: with gzip.open(sample_file, 'rb') as f: sample = pickle.load(f) except: print(f'<{sample_file}> is broken. removing...') os.remove(sample_file) if __name__ == '__main__': parser = argparse.ArgumentParser() home = expanduser("~") # data_dir = f'{home}/storage1/instances/ds/train_500-1000' # remove_broken_sample(data_dir) # collect_samples(data_dir) # data_dir = f'{home}/storage1/instances/ds/test_1000' # remove_broken_sample(data_dir) # collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ds/time_1000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ds/time_3000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ds/time_5000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ds/time_7000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/ds/time_9000' collect_samples(data_dir)
4,623
31.335664
91
py
PB-DFS
PB-DFS-master/data_generator/mis/gen_inst_mis.py
import os, sys import argparse import numpy as np import scipy.sparse import scipy.io as sio from itertools import combinations from os.path import expanduser from os import path import re from functools import cmp_to_key import random class Graph: """ Container for a graph. Parameters ---------- number_of_nodes : int The number of nodes in the graph. edges : set of tuples (int, int) The edges of the graph, where the integers refer to the nodes. degrees : numpy array of integers The degrees of the nodes in the graph. neighbors : dictionary of type {int: set of ints} The neighbors of each node in the graph. """ def __init__(self, number_of_nodes, edges, degrees, neighbors): self.number_of_nodes = number_of_nodes self.edges = edges self.degrees = degrees self.neighbors = neighbors def __len__(self): """ The number of nodes in the graph. """ return self.number_of_nodes def greedy_clique_partition(self): """ Partition the graph into cliques using a greedy algorithm. Returns ------- list of sets The resulting clique partition. """ cliques = [] leftover_nodes = (-self.degrees).argsort().tolist() while leftover_nodes: clique_center, leftover_nodes = leftover_nodes[0], leftover_nodes[1:] clique = {clique_center} neighbors = self.neighbors[clique_center].intersection(leftover_nodes) densest_neighbors = sorted(neighbors, key=lambda x: -self.degrees[x]) for neighbor in densest_neighbors: # Can you add it to the clique, and maintain cliqueness? if all([neighbor in self.neighbors[clique_node] for clique_node in clique]): clique.add(neighbor) cliques.append(clique) leftover_nodes = [node for node in leftover_nodes if node not in clique] return cliques @staticmethod def barabasi_albert(number_of_nodes, affinity, random): """ Generate a Barabási-Albert random graph with a given edge probability. Parameters ---------- number_of_nodes : int The number of nodes in the graph. affinity : integer >= 1 The number of nodes each new node will be attached to, in the sampling scheme. random : numpy.random.RandomState A random number generator. Returns ------- Graph The generated graph. """ assert affinity >= 1 and affinity < number_of_nodes edges = set() degrees = np.zeros(number_of_nodes, dtype=int) neighbors = {node: set() for node in range(number_of_nodes)} for new_node in range(affinity, number_of_nodes): # first node is connected to all previous ones (star-shape) if new_node == affinity: neighborhood = np.arange(new_node) # remaining nodes are picked stochastically else: neighbor_prob = degrees[:new_node] / (2*len(edges)) neighborhood = random.choice(new_node, affinity, replace=False, p=neighbor_prob) for node in neighborhood: edges.add((node, new_node)) degrees[node] += 1 degrees[new_node] += 1 neighbors[node].add(new_node) neighbors[new_node].add(node) graph = Graph(number_of_nodes, edges, degrees, neighbors) return graph def generate_indset(graph, filename): """ Generate a Maximum Independent Set (also known as Maximum Stable Set) instance in CPLEX LP format from a previously generated graph. Parameters ---------- graph : Graph The graph from which to build the independent set problem. filename : str Path to the file to save. """ cliques = graph.greedy_clique_partition() inequalities = set(graph.edges) for clique in cliques: clique = tuple(sorted(clique)) for edge in combinations(clique, 2): inequalities.remove(edge) if len(clique) > 1: inequalities.add(clique) # Put trivial inequalities for nodes that didn't appear # in the constraints, otherwise SCIP will complain used_nodes = set() for group in inequalities: used_nodes.update(group) for node in range(10): if node not in used_nodes: inequalities.add((node,)) with open(filename, 'w') as lp_file: lp_file.write("maximize\nOBJ:" + "".join([f" + 1 x{node+1}" for node in range(len(graph))]) + "\n") lp_file.write("\nsubject to\n") for count, group in enumerate(inequalities): lp_file.write(f"C{count+1}:" + "".join([f" + x{node+1}" for node in sorted(group)]) + " <= 1\n") lp_file.write("\nbinary\n" + " ".join([f"x{node+1}" for node in range(len(graph))]) + "\n") # mis graphs index from 1 def lp2mis(inst_name): writeto = inst_name[:-2]+'mis' # read problem with open(inst_name, 'r') as f: lines = f.readlines() lines = [line.strip() for line in lines] nnodes = int(lines[-1].split(' ')[-1][1:]) nconss = int(lines[-4].split(':')[0][1:]) conss = lines[4:-3] assert(len(conss) == nconss) print(f"\ncurrent graph: {inst_name}, {nnodes}, {nconss}") lines = [] for cons in conss: nodes = cons[:-5].split('+')[1:] nodes = [node.strip()[1:] for node in nodes] for i in range(len(nodes)): for j in range(i+1, len(nodes)): lines.append(f'e {nodes[i]} {nodes[j]}\n') nedges = len(lines) with open(writeto, 'w+') as f: f.write(f'p edge {nnodes} {nedges}\n') for line in lines: f.write(line) return writeto # snap graphs index from 0 def mis2snap(fpath): writeto = fpath[:-3]+'snap' with open(fpath, 'r') as f: lines = f.readlines() lines = [line.strip() for line in lines] nnodes = int(lines[0].split(' ')[2]) nedges = int(lines[0].split(' ')[3]) lines = lines[1:] # sort def compare(line1, line2): from1, to1 = line1[2:].split(" ") from1, to1 = int (from1), int(to1) from2, to2 = line2[2:].split(" ") from2, to2 = int(from2), int(to2) if from1 != from2: return from1 - from2 else: return to1 - to2 print(f"\ncurrent graph: {fpath}, {nnodes}, {nedges}") with open(writeto, 'w+') as f: f.write('# Undirected graph (each unordered pair of nodes is saved once)\n') f.write('# Undirected Erdos-Renyi random graph.\n') f.write(f'# Nodes: {nnodes} Edges: {nedges}\n') f.write(f'# NodeId NodeId\n') numlines = len(lines) for idx, line in enumerate(sorted(lines, key=cmp_to_key(compare))): node1, node2 = line[2:].split(' ') node1, node2 = int(node1), int(node2) if idx + 1 == numlines: f.write(f'{node1-1} {node2-1}') else: f.write(f'{node1-1} {node2-1}\n') return writeto # metis graphs index from 1 def mis2metis(mis_path): writeto = mis_path[:-3]+'metis' def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): return [ atoi(c) for c in re.split('(\d+)', text) ] number_nodes = 0 number_edges = 0 edges_counted = 0 adjacency = [] with open(mis_path) as f: for line in f: args = line.strip().split() if args[0] == 'p': number_nodes = args[2] number_edges = args[3] adjacency = [[] for _ in range(0, int(number_nodes) + 1)] elif args[0] == 'e': source = int(args[1]) target = int(args[2]) edge_added = False if not target in adjacency[source]: adjacency[source].append(target) edge_added = True if not source in adjacency[target]: adjacency[target].append(source) edge_added = True if edge_added: edges_counted += 1 else: print ("Could not read line.\n") adjacency[0].append(number_nodes) # adjacency[0].append(number_edges) adjacency[0].append(str(edges_counted)) with open(writeto, 'w') as f: node = 0 for neighbors in adjacency: if node != 0: neighbors.sort() if not neighbors: f.write(' ') else: tmp = [str(i) for i in neighbors] f.write(' '.join(tmp)) f.write('\n') node += 1 return writeto def solve_mis(metis_path): writeto = f'{metis_path[:-5]}sol' os.system(f'./redumis {metis_path} --output={writeto}') with open(writeto, 'r') as f: sol_content = f.readlines() sol_content = [line.strip() for line in sol_content] sol_arr = [] for idx, sol_val in enumerate(sol_content): if int(sol_val) == 1: sol_arr.append(idx+1) with open(writeto, 'w') as f: for opt_sol_idx in sol_arr: f.write(f'{opt_sol_idx}\n') return writeto # should be snap graph def save_adj(graph_path, writeto): with open(graph_path, 'r') as f: graph_content = f.readlines() graph_content = [line.strip() for line in graph_content] nnodes = int(graph_content[2].split(' ')[2]) graph_content = graph_content[4:] adj_mat = np.zeros((nnodes,nnodes)) for edge in graph_content: ver1, ver2 = edge.split(' ') ver1, ver2 = int(ver1), int(ver2) adj_mat[ver1, ver2] = 1 adj_mat[ver2, ver1] = 1 dic = { 'adj':adj_mat, } sio.savemat(writeto, dic) def gen_mis(data_dir, ninst, scale_lower, scale_upper=None, solve=True): os.makedirs(data_dir, exist_ok=True) affinity = 4 for i in range(ninst): nnodes = scale_lower if scale_upper is None else random.randint(scale_lower, scale_upper+1) graph = Graph.barabasi_albert(nnodes, affinity, np.random.RandomState(i)) lp_path = os.path.join(data_dir, f'{i}.lp') generate_indset(graph, lp_path) mis_path = lp2mis(lp_path); snap_path = mis2snap(mis_path) metis_path = mis2metis(mis_path) save_adj(snap_path, f'{lp_path[:-2]}adj') # solve metis if solve: sol_path = solve_mis(metis_path) os.remove(snap_path); os.remove(metis_path) if __name__ == '__main__': home = expanduser("~") data_dir = os.path.join(home, f'storage1/instances/mis/test_2000') gen_mis(data_dir, 50, 2000, solve=False)
11,085
31.702065
108
py
PB-DFS
PB-DFS-master/data_generator/mis/make_sample_mis.py
import os import sys import os sys.path.append( f'{os.path.dirname(os.path.realpath(__file__))}/../') import argparse import multiprocessing as mp import pickle import glob import numpy as np import shutil import gzip from os.path import expanduser import pyscipopt as scip import utils def read_sol_file(filepath): sol = set() with open(filepath, 'r') as f: lines = f.readlines() for line in lines: var_name = line.strip() sol.add(var_name) sol.add(f't_x{var_name}') return sol class SamplingAgent(scip.Branchrule): def __init__(self, sol, write_to): self.sol = sol self.write_to = write_to def branchexeclp(self, allowaddcons): if self.model.getNNodes() == 1: ys = [] cands = [] cands_dict = self.model.getMapping() name_index_mapping = {} for lp_col_idx, name in cands_dict.items(): cands.append(lp_col_idx) if name in self.sol: ys.append(lp_col_idx) name_index_mapping[name] = lp_col_idx state_ding, obj_coef_idx = utils.extract_ding_variable_features(self.model) data = [state_ding, ys, cands, obj_coef_idx] with gzip.open(self.write_to, 'wb') as f: pickle.dump({ 'data': data, 'mapping': name_index_mapping, }, f) print(f'write {self.write_to}\n') # end the scip solving process self.model.interruptSolve() else: self.model.interruptSolve() # result = self.model.executeBranchRule('relpscost', False) return {"result": scip.SCIP_RESULT.DIDNOTRUN} def collect_samples(data_dir): require_sol = 'eval' not in data_dir and 'time' not in data_dir def collect_single(id, sol_path=None): sample_file = os.path.join(data_dir, f'sample_{id}.pkl') if os.path.exists(sample_file): print(f"skipping {sample_file}") sys.stdout.flush() return m = scip.Model() m.setIntParam('display/verblevel', 0) m.readProblem(os.path.join(data_dir, f'{id}.lp')) utils.init_scip_params(m, presolving=False, seed=0) print(f"begin collect {os.path.join(data_dir, f'sample_{id}.pkl')}") sys.stdout.flush() branchrule = SamplingAgent( sol = read_sol_file(sol_path) if require_sol else set(), write_to=os.path.join(data_dir, f'sample_{id}.pkl')) m.includeBranchrule( branchrule=branchrule, name="Sampling branching rule", desc="", priority=666666, maxdepth=-1, maxbounddist=1) m.optimize() m.freeProb() if require_sol: # construct training and test data, must have .sol for each .lp ids = []; sols = [] for i in range(0, 3000): sol_filepath = os.path.join(data_dir, f'{i}.sol') if os.path.exists(sol_filepath): ids.append(i) sols.append(sol_filepath) for cur_id, cur_sol_path in zip(ids, sols): collect_single(cur_id, cur_sol_path) else: # construct training and test data, for all .lp files for i in range(0, 30): collect_single(i, None) def remove_broken_sample(data_dir): for i in range(0, 3000): sample_file = os.path.join(data_dir, f'sample_{i}.pkl') if os.path.exists(sample_file): try: with gzip.open(sample_file, 'rb') as f: sample = pickle.load(f) except: print(f'<{sample_file}> is broken. removing...') os.remove(sample_file) if __name__ == '__main__': parser = argparse.ArgumentParser() home = expanduser("~") data_dir = f'{home}/storage1/instances/mis/time_1000' remove_broken_sample(data_dir) collect_samples(data_dir) data_dir = f'{home}/storage1/instances/mis/time_3000' remove_broken_sample(data_dir) collect_samples(data_dir) data_dir = f'{home}/storage1/instances/mis/time_5000' remove_broken_sample(data_dir) collect_samples(data_dir) data_dir = f'{home}/storage1/instances/mis/time_7000' remove_broken_sample(data_dir) collect_samples(data_dir) data_dir = f'{home}/storage1/instances/mis/time_9000' remove_broken_sample(data_dir) collect_samples(data_dir)
4,541
31.212766
91
py
PB-DFS
PB-DFS-master/data_generator/vc/gen_inst_vc.py
import os, sys import argparse import numpy as np import scipy.sparse import scipy.io as sio from itertools import combinations from os.path import expanduser from os import path import re from functools import cmp_to_key import random import gurobipy as gp from gurobipy import * class Graph: """ Container for a graph. Parameters ---------- number_of_nodes : int The number of nodes in the graph. edges : set of tuples (int, int) The edges of the graph, where the integers refer to the nodes. degrees : numpy array of integers The degrees of the nodes in the graph. neighbors : dictionary of type {int: set of ints} The neighbors of each node in the graph. """ def __init__(self, number_of_nodes, edges, degrees, neighbors): self.number_of_nodes = number_of_nodes self.edges = edges self.degrees = degrees self.neighbors = neighbors def __len__(self): """ The number of nodes in the graph. """ return self.number_of_nodes @staticmethod def barabasi_albert(number_of_nodes, affinity, random): """ Generate a Barabási-Albert random graph with a given edge probability. Parameters ---------- number_of_nodes : int The number of nodes in the graph. affinity : integer >= 1 The number of nodes each new node will be attached to, in the sampling scheme. random : numpy.random.RandomState A random number generator. Returns ------- Graph The generated graph. """ assert affinity >= 1 and affinity < number_of_nodes edges = set() degrees = np.zeros(number_of_nodes, dtype=int) neighbors = {node: set() for node in range(number_of_nodes)} for new_node in range(affinity, number_of_nodes): # first node is connected to all previous ones (star-shape) if new_node == affinity: neighborhood = np.arange(new_node) # remaining nodes are picked stochastically else: neighbor_prob = degrees[:new_node] / (2*len(edges)) neighborhood = random.choice(new_node, affinity, replace=False, p=neighbor_prob) for node in neighborhood: edges.add((node, new_node)) degrees[node] += 1 degrees[new_node] += 1 neighbors[node].add(new_node) neighbors[new_node].add(node) graph = Graph(number_of_nodes, edges, degrees, neighbors) return graph def generate_vc(graph, filename): """ Generate a Maximum Independent Set (also known as Maximum Stable Set) instance in CPLEX LP format from a previously generated graph. Parameters ---------- graph : Graph The graph from which to build the independent set problem. filename : str Path to the file to save. """ with open(filename, 'w') as lp_file: lp_file.write("minimize\nOBJ:" + "".join([f" + 1 x{node+1}" for node in range(len(graph))]) + "\n") lp_file.write("\nsubject to\n") for count, (n1, n2) in enumerate(sorted(list(graph.edges))): lp_file.write(f"C{count+1}:" + f"x{n1+1} + x{n2+1} >= 1\n") lp_file.write("\nbinary\n" + " ".join([f"x{node+1}" for node in range(len(graph))]) + "\n") def solve_single(lp_path, sol_path, time_limit=500): print(f'process lp: {lp_path}') model = gp.read(lp_path) model.setParam('TimeLimit', time_limit) # set a time limit model.setParam('OutputFlag', 0) # disable logging model.optimize() if model.status != GRB.OPTIMAL: print(f'problem is too hard to solve within {time_limit}, skipping!') return print(f'problem is solved with {round(model.runtime, 1)} seconds') with open( sol_path, 'w+') as f: # f.write('Obj: %f\n' % model.objVal) for v in model.getVars(): if int(v.x) == 1 and v.varName[0] == 'x' : f.write(f'{v.varName[1:]}\n') def solve_vc(lp_path, time_limit=200): sol_file_path = f'{lp_path[:-2]}sol' if os.path.exists(sol_file_path): print(f'{lp_path} has been processed, skipping!') return solve_single(lp_path, sol_file_path, time_limit=time_limit) sys.stdout.flush() def gen_vc(data_dir, ninst, scale_lower, scale_upper=None, solve=True): os.makedirs(data_dir, exist_ok=True) affinity = 4 for i in range(ninst): nnodes = scale_lower if scale_upper is None else random.randint(scale_lower, scale_upper+1) graph = Graph.barabasi_albert(nnodes, affinity, np.random.RandomState(i)) lp_path = os.path.join(data_dir, f'{i}.lp') generate_vc(graph, lp_path) if solve: sol_path = solve_vc(lp_path) if __name__ == '__main__': home = expanduser("~") # data_dir = os.path.join(home, f'storage1/instances/vc/train_500-1000') # gen_vc(data_dir, 1000, 500, 1000, solve=True) data_dir = os.path.join(home, f'storage1/instances/vc/time_1000') gen_vc(data_dir, 30, 1000, solve=False) data_dir = os.path.join(home, f'storage1/instances/vc/time_3000') gen_vc(data_dir, 30, 3000, solve=False) data_dir = os.path.join(home, f'storage1/instances/vc/time_5000') gen_vc(data_dir, 30, 5000, solve=False) data_dir = os.path.join(home, f'storage1/instances/vc/time_7000') gen_vc(data_dir, 30, 7000, solve=False) data_dir = os.path.join(home, f'storage1/instances/vc/time_9000') gen_vc(data_dir, 30, 9000, solve=False)
5,666
32.934132
107
py
PB-DFS
PB-DFS-master/data_generator/vc/make_sample_vc.py
import os import sys import os sys.path.append( f'{os.path.dirname(os.path.realpath(__file__))}/../') import argparse import multiprocessing as mp import pickle import glob import numpy as np import shutil import gzip from os.path import expanduser import pyscipopt as scip import utils def read_sol_file(filepath): sol = set() with open(filepath, 'r') as f: lines = f.readlines() for line in lines: var_name = line.strip() sol.add(var_name) sol.add(f't_x{var_name}') return sol class SamplingAgent(scip.Branchrule): def __init__(self, sol, write_to): self.sol = sol self.write_to = write_to def branchexeclp(self, allowaddcons): if self.model.getNNodes() == 1: ys = [] cands = [] cands_dict = self.model.getMapping() name_index_mapping = {} for lp_col_idx, name in cands_dict.items(): cands.append(lp_col_idx) if name in self.sol: ys.append(lp_col_idx) name_index_mapping[name] = lp_col_idx state_ding, obj_coef_idx = utils.extract_ding_variable_features(self.model) data = [state_ding, ys, cands, obj_coef_idx] with gzip.open(self.write_to, 'wb') as f: pickle.dump({ 'data': data, 'mapping': name_index_mapping, }, f) print(f'write {self.write_to}\n') # end the scip solving process self.model.interruptSolve() else: self.model.interruptSolve() # result = self.model.executeBranchRule('relpscost', False) return {"result": scip.SCIP_RESULT.DIDNOTRUN} def collect_samples(data_dir): require_sol = 'eval' not in data_dir and 'time' not in data_dir def collect_single(id, sol_path=None): sample_file = os.path.join(data_dir, f'sample_{id}.pkl') if os.path.exists(sample_file): print(f"skipping {sample_file}") sys.stdout.flush() return m = scip.Model() m.setIntParam('display/verblevel', 0) m.readProblem(os.path.join(data_dir, f'{id}.lp')) utils.init_scip_params(m, presolving=False, seed=0) print(f"begin collect {os.path.join(data_dir, f'sample_{id}.pkl')}") sys.stdout.flush() branchrule = SamplingAgent( sol = read_sol_file(sol_path) if require_sol else set(), write_to=os.path.join(data_dir, f'sample_{id}.pkl')) m.includeBranchrule( branchrule=branchrule, name="Sampling branching rule", desc="", priority=666666, maxdepth=-1, maxbounddist=1) m.optimize() m.freeProb() if require_sol: # construct training and test data, must have .sol for each .lp ids = []; sols = [] for i in range(0, 3000): sol_filepath = os.path.join(data_dir, f'{i}.sol') if os.path.exists(sol_filepath): ids.append(i) sols.append(sol_filepath) for cur_id, cur_sol_path in zip(ids, sols): collect_single(cur_id, cur_sol_path) else: # construct training and test data, for all .lp files for i in range(0, 30): collect_single(i, None) def remove_broken_sample(data_dir): for i in range(0, 3000): sample_file = os.path.join(data_dir, f'sample_{i}.pkl') if os.path.exists(sample_file): try: with gzip.open(sample_file, 'rb') as f: sample = pickle.load(f) except: print(f'<{sample_file}> is broken. removing...') os.remove(sample_file) if __name__ == '__main__': parser = argparse.ArgumentParser() home = expanduser("~") data_dir = f'{home}/storage1/instances/vc/time_1000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/vc/time_3000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/vc/time_5000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/vc/time_7000' collect_samples(data_dir) data_dir = f'{home}/storage1/instances/vc/time_9000' collect_samples(data_dir)
4,361
31.073529
91
py
PB-DFS
PB-DFS-master/src/branching_ml_dfs.cpp
#include "branching_ml_dfs.hpp" #include "utils.hpp" #include <boost/algorithm/string.hpp> #include <math.h> /** branching rule data */ struct SCIP_BranchruleData { scip::ObjBranchrule *objbranchrule; /**< branching rule object */ SCIP_Bool deleteobject; /**< should the branching rule object be deleted when branching rule is freed? */ }; COML::Branching_dfs::Branching_dfs( // ---------------------------------------------- SCIP parameters -------------------------------------------- SCIP *scip, /**< SCIP data structure */ const char *name, /**< name of branching rule */ const char *desc, /**< description of branching rule */ int priority, /**< priority of the branching rule */ int maxdepth, /**< maximal depth level, up to which this branching rule should be used (or -1) */ double maxbounddist /**< maximal relative distance from current node's dual bound to primal bound * compared to best node's dual bound for applying branching rule * (0.0: only on current best node, 1.0: on all nodes) */ // ---------------------------------------------- ml parameters -------------------------------------------- ) : ObjBranchrule(scip, name, desc, priority, maxdepth, maxbounddist){}; SCIP_DECL_BRANCHEXECLP(COML::Branching_dfs::scip_execlp) { SCIP_BRANCHRULEDATA *branchruledata; SCIP_VAR **tmplpcands; SCIP_VAR **lpcands; double *tmplpcandsfrac; double *lpcandsfrac; double bestdown; double bestup; double provedbound; SCIP_Bool bestdownvalid; SCIP_Bool bestupvalid; int npriolpcands; double *tmplpcandssol; double *lpcandssol; double bestscore; int nlpcands; int bestcand = -1; assert(branchrule != NULL); assert(strcmp(SCIPbranchruleGetName(branchrule), this->scip_name_) == 0); assert(scip != NULL); assert(scip == this->scip_); assert(result != NULL); branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); *result = SCIP_DIDNOTRUN; SCIP_CALL(SCIPgetLPBranchCands(scip, &tmplpcands, &tmplpcandssol, &tmplpcandsfrac, &nlpcands, &npriolpcands, NULL)); assert(nlpcands > 0); assert(npriolpcands > 0); SCIP_CALL(SCIPduplicateBufferArray(scip, &lpcands, tmplpcands, nlpcands)); SCIP_CALL(SCIPduplicateBufferArray(scip, &lpcandssol, tmplpcandssol, nlpcands)); SCIP_CALL(SCIPduplicateBufferArray(scip, &lpcandsfrac, tmplpcandsfrac, nlpcands)); SCIP_NODE* focus_node = SCIPgetFocusNode(scip); long long cur_node_id = SCIPnodeGetNumber(focus_node); if (nlpcands == 1) { bestcand = 0; } else { double cands_ml_score[nlpcands]; const char* var_name; int var_idx; char var_short_name[10]; int prefix_remove = gconf.prefix_size_remove + 2; if (gconf.policy==Policy::ML_DFS_HEUR_SCORE1_GCN || gconf.policy==Policy::ML_DFS_HEUR_SCORE1_LR || gconf.policy == Policy::SCIP_DEF_PBDFS) { for (int i = 0; i < nlpcands; i++) { var_name = SCIPvarGetName(lpcands[i]); strcpy(var_short_name, var_name + prefix_remove); if (gconf.var_mapper.find(var_short_name) == gconf.var_mapper.end()) { cands_ml_score[i] = 0; } else { var_idx = gconf.var_mapper[var_short_name]; cands_ml_score[i] = gconf.ml_scores1[var_idx]; } } } // else if (gconf.policy==Policy::ML_DFS_HEUR_SCORE3_GCN) // { // for (int i = 0; i < nlpcands; i++) // { // var_name = SCIPvarGetName(lpcands[i]); // strcpy(var_short_name, var_name + prefix_remove); // if (gconf.var_mapper.find(var_short_name) == gconf.var_mapper.end()) // { // cands_ml_score[i] = 0; // } // else // { // var_idx = gconf.var_mapper[var_short_name]; // cands_ml_score[i] = 1-gconf.ml_scores1[var_idx]; // } // } // } else if (gconf.policy==Policy::ML_DFS_HEUR_SCORE2_GCN || gconf.policy==Policy::ML_DFS_HEUR_SCORE2_LR) { for (int i = 0; i < nlpcands; i++) { var_name = SCIPvarGetName(lpcands[i]); strcpy(var_short_name, var_name + prefix_remove); if (gconf.var_mapper.find(var_short_name) == gconf.var_mapper.end()) { cands_ml_score[i] = 0; } else { var_idx = gconf.var_mapper[var_short_name]; cands_ml_score[i] = gconf.ml_scores2[var_idx]; } } } bestcand = COML::calc_argmax(cands_ml_score, nlpcands); // printf("bestcand: %d, bestcand score: %f\n", bestcand, cands_ml_score[bestcand]); } assert(*result == SCIP_DIDNOTRUN); if (0 > bestcand || bestcand >= nlpcands) printf("bestcand: %d, nlpcands: %d\n", bestcand, nlpcands); assert(0 <= bestcand && bestcand < nlpcands); SCIP_NODE *downchild; SCIP_NODE *upchild; SCIP_CALL(SCIPbranchVar(this->scip_, lpcands[bestcand], &downchild, NULL, &upchild)); if (downchild == NULL && upchild == NULL) *result = SCIP_CUTOFF; else *result = SCIP_BRANCHED; return SCIP_OKAY; }; /* * Callback methods of SCIP * -------------------------------------------------------------------------------------------------------------- */ extern "C" { /** copy method for branchrule plugins (called when SCIP copies plugins) */ static SCIP_DECL_BRANCHCOPY(branchCopyBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; assert(scip != NULL); branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); assert(branchruledata->objbranchrule->scip_ != scip); if (branchruledata->objbranchrule->iscloneable()) { scip::ObjBranchrule *newobjbranchrule; newobjbranchrule = dynamic_cast<scip::ObjBranchrule *>(branchruledata->objbranchrule->clone(scip)); /* call include method of branchrule object */ SCIP_CALL(COML::SCIPincludeObjBranchrule_MLDFS(scip, newobjbranchrule, TRUE)); } return SCIP_OKAY; } /** destructor of branching rule to free user data (called when SCIP is exiting) */ static SCIP_DECL_BRANCHFREE(branchFreeBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); assert(branchruledata->objbranchrule->scip_ == scip); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_free(scip, branchrule)); /* free branchrule object */ if (branchruledata->deleteobject) delete branchruledata->objbranchrule; /* free branchrule data */ delete branchruledata; SCIPbranchruleSetData(branchrule, NULL); /*lint !e64*/ return SCIP_OKAY; } /** initialization method of branching rule (called after problem was transformed) */ static SCIP_DECL_BRANCHINIT(branchInitBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); assert(branchruledata->objbranchrule->scip_ == scip); return SCIP_OKAY; } /** deinitialization method of branching rule (called before transformed problem is freed) */ static SCIP_DECL_BRANCHEXIT(branchExitBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_exit(scip, branchrule)); return SCIP_OKAY; } /** solving process initialization method of branching rule (called when branch and bound process is about to begin) */ static SCIP_DECL_BRANCHINITSOL(branchInitsolBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); return SCIP_OKAY; } /** solving process deinitialization method of branching rule (called before branch and bound process data is freed) */ static SCIP_DECL_BRANCHEXITSOL(branchExitsolBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_exitsol(scip, branchrule)); return SCIP_OKAY; } /** branching execution method for fractional LP solutions */ static SCIP_DECL_BRANCHEXECLP(branchExeclpBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata = NULL; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_execlp(scip, branchrule, allowaddcons, result)); return SCIP_OKAY; } /** branching execution method for external candidates */ static SCIP_DECL_BRANCHEXECEXT(branchExecextBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_execext(scip, branchrule, allowaddcons, result)); return SCIP_OKAY; } /** branching execution method for not completely fixed pseudo solutions */ static SCIP_DECL_BRANCHEXECPS(branchExecpsBranchingMLDFS) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_execps(scip, branchrule, allowaddcons, result)); return SCIP_OKAY; } } /** creates the branching rule for the given branching rule object and includes it in SCIP */ SCIP_RETCODE COML::SCIPincludeObjBranchrule_MLDFS( SCIP *scip, /**< SCIP data structure */ scip::ObjBranchrule *objbranchrule, /**< branching rule object */ SCIP_Bool deleteobject /**< should the branching rule object be deleted when branching rule is freed? */ ) { SCIP_BRANCHRULEDATA *branchruledata; assert(scip != NULL); assert(objbranchrule != NULL); /* create branching rule data */ branchruledata = new SCIP_BRANCHRULEDATA; branchruledata->objbranchrule = objbranchrule; branchruledata->deleteobject = deleteobject; /* include branching rule */ SCIP_CALL(SCIPincludeBranchrule(scip, objbranchrule->scip_name_, objbranchrule->scip_desc_, objbranchrule->scip_priority_, objbranchrule->scip_maxdepth_, objbranchrule->scip_maxbounddist_, branchCopyBranchingMLDFS, branchFreeBranchingMLDFS, branchInitBranchingMLDFS, branchExitBranchingMLDFS, branchInitsolBranchingMLDFS, branchExitsolBranchingMLDFS, branchExeclpBranchingMLDFS, branchExecextBranchingMLDFS, branchExecpsBranchingMLDFS, branchruledata)); /*lint !e429*/ return SCIP_OKAY; /*lint !e429*/ }
12,352
35.547337
168
cpp
PB-DFS
PB-DFS-master/src/branching_ml_dfs.hpp
#ifndef __SCIP_BRANCH_ML_DFS__ #define __SCIP_BRANCH_ML_DFS__ #include <vector> #include <utility> #include <cassert> #include <unordered_map> #include <chrono> #include <random> #include <stdio.h> #include <algorithm> #include <ctime> #include <string> #include <scip/scip.h> #include <objscip/objscip.h> #include <scip/struct_var.h> #include <scip/type_stat.h> #include <scip/struct_stat.h> #include <scip/type_scip.h> #include <scip/struct_scip.h> #include <scip/struct_tree.h> #include <scip/tree.h> #include <scip/struct_var.h> #include <scip/var.h> #include "global_config.hpp" #include <scip/scip_mem.h> #include <scip/set.h> #include <scip/struct_mem.h> #include <scip/visual.h> #include <scip/cons_linear.h> #include <scip/type_cons.h> #include <scip/struct_cons.h> #include <scip/struct_nodesel.h> namespace COML{ SCIP_RETCODE SCIPincludeObjBranchrule_MLDFS( SCIP *scip, /**< SCIP data structure */ scip::ObjBranchrule *objbranchrule, /**< branching rule object */ SCIP_Bool deleteobject /**< should the branching rule object be deleted when branching rule is freed? */ ); class Branching_dfs : public scip::ObjBranchrule { public: int num_vars; Branching_dfs( // ---------------------------------------------- SCIP parameters -------------------------------------------- SCIP* scip, /**< SCIP data structure */ const char* name, /**< name of branching rule */ const char* desc, /**< description of branching rule */ int priority, /**< priority of the branching rule */ int maxdepth, /**< maximal depth level, up to which this branching rule should be used (or -1) */ SCIP_Real maxbounddist /**< maximal relative distance from current node's dual bound to primal bound * compared to best node's dual bound for applying branching rule * (0.0: only on current best node, 1.0: on all nodes) */ // ---------------------------------------------- ml parameters -------------------------------------------- ); ~Branching_dfs() {}; /** branching execution method for fractional LP solutions * * @see SCIP_DECL_BRANCHEXECLP(x) in @ref type_branch.h */ SCIP_DECL_BRANCHEXECLP(scip_execlp) override; }; } #endif
2,515
34.942857
139
hpp
PB-DFS
PB-DFS-master/src/branching_policy.cpp
#include "branching_policy.hpp" #include "utils.hpp" #define DEFAULT_REEVALAGE 10LL #define DEFAULT_MAXPROPROUNDS -2 #define DEFAULT_PROBINGBOUNDS TRUE #define SIMPLEX_ITERATION_LIMIT 500 #define DEFAULT_MAXLOOKAHEAD 9 /**< maximal number of further variables evaluated without better score */ #define DEFAULT_INITCAND 30 /**< maximal number of candidates initialized with strong branching per node */ /** branching rule data */ struct SCIP_BranchruleData { scip::ObjBranchrule *objbranchrule; /**< branching rule object */ SCIP_Bool deleteobject; /**< should the branching rule object be deleted when branching rule is freed? */ }; static SCIP_RETCODE printNodeRootPath( SCIP *scip, /**< SCIP data structure */ SCIP_NODE *node, /**< node data */ FILE *file /**< output file (or NULL for standard output) */ ); /* * actual methods that matters * -------------------------------------------------------------------------------------------------------------- */ /** * called back from SCIP every branching decision * * arguments: * SCIP* scip; * SCIP_BRANCHRULE *branchrule; * unsigned int allowaddcons; * SCIP_RESULT *result; * */ /** * if current node depth less than the strong branching depth, * we perform strong branching and update variable statistics. * otherwise we train the model and let the model select branching variables. * */ COML::Branching::Branching( // ---------------------------------------------- SCIP parameters -------------------------------------------- SCIP *scip, /**< SCIP data structure */ const char *name, /**< name of branching rule */ const char *desc, /**< description of branching rule */ int priority, /**< priority of the branching rule */ int maxdepth, /**< maximal depth level, up to which this branching rule should be used (or -1) */ double maxbounddist /**< maximal relative distance from current node's dual bound to primal bound * compared to best node's dual bound for applying branching rule * (0.0: only on current best node, 1.0: on all nodes) */ // ---------------------------------------------- ml parameters -------------------------------------------- ) : ObjBranchrule(scip, name, desc, priority, maxdepth, maxbounddist){}; SCIP_DECL_BRANCHINIT(COML::Branching::scip_init) { int num_vars; int num_binary_vars; int num_integral_vars; int num_implicit_integral_vars; int num_coutinous_vars; SCIPgetVarsData(scip, NULL, &num_vars, &num_binary_vars, &num_integral_vars, &num_implicit_integral_vars, &num_coutinous_vars); printf("statistics of the transformed problem: \ num_vars: %d, num_binary_vars: %d, num_integral_vars: %d, \ num_implicit_integral_vars: %d, num_coutinous_vars: %d \n", num_vars, num_binary_vars, num_integral_vars, num_implicit_integral_vars, num_coutinous_vars); return SCIP_OKAY; } void COML::Branching::record_solving_curves(SCIP* scip) { // record primal info for curve plot SCIP_SOL* sol = SCIPgetBestSol(scip); double time = SCIPgetSolvingTime(scip); if(sol != NULL) { SCIP_HEUR* h = SCIPsolGetHeur(sol); double obj = SCIPgetSolOrigObj(scip, sol); if (gconf.objs.empty()) { gconf.objs.push_back(obj); gconf.time.push_back(SCIPsolGetTime(sol)); gconf.first_sol_heur = h == NULL ? "none":SCIPheurGetName(h); printf("first solution: %f %fs\n", obj, time); if (h!=NULL) printf("heuristic: %s\n", SCIPheurGetName(h)); else printf("heuristic is None\n"); }else if ( (gconf.optimization_type == Optimization_Type::Maximization && obj > gconf.objs[gconf.objs.size()-1] + SCIPsetEpsilon(scip->set)) || (gconf.optimization_type == Optimization_Type::Minimization && obj < gconf.objs[gconf.objs.size()-1] - SCIPsetEpsilon(scip->set)) ){ gconf.objs.push_back(obj); gconf.time.push_back(time); printf("better solution: %f %fs\n", obj, time); if (h!=NULL) printf("heuristic: %s\n", SCIPheurGetName(h)); else printf("heuristic is None\n"); } } // record dual info for curve plot double dualbound = SCIPgetDualbound(scip); if (gconf.dual_bounds.empty()) { gconf.dual_bounds.push_back(dualbound); gconf.dual_time.push_back(time); }else if ( (gconf.optimization_type == Optimization_Type::Maximization && dualbound < gconf.dual_bounds[gconf.dual_bounds.size()-1] - SCIPsetEpsilon(scip->set)) || (gconf.optimization_type == Optimization_Type::Minimization && dualbound > gconf.dual_bounds[gconf.dual_bounds.size()-1] + SCIPsetEpsilon(scip->set)) ){ gconf.dual_bounds.push_back(dualbound); gconf.dual_time.push_back(time); } // record gap info for curve plot double optgap = SCIPgetGap(scip); if (gconf.gaps.empty()){ gconf.gaps.push_back(optgap); gconf.gap_time.push_back(time); }else if (optgap < gconf.gaps[gconf.gaps.size()-1] - SCIPsetEpsilon(scip->set)){ gconf.gaps.push_back(optgap); gconf.gap_time.push_back(time); } } SCIP_DECL_BRANCHEXECLP(COML::Branching::scip_execlp) { if (gconf.record_solving_info) record_solving_curves(scip); SCIP_BRANCHRULEDATA *branchruledata; SCIP_VAR **tmplpcands; SCIP_VAR **lpcands; double *tmplpcandsfrac; double *lpcandsfrac; double bestdown; double bestup; double provedbound; SCIP_Bool bestdownvalid; SCIP_Bool bestupvalid; int npriolpcands; double *tmplpcandssol; double *lpcandssol; double bestscore; int nlpcands; int bestcand = -1; assert(branchrule != NULL); assert(strcmp(SCIPbranchruleGetName(branchrule), this->scip_name_) == 0); assert(scip != NULL); assert(scip == this->scip_); assert(result != NULL); branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); *result = SCIP_DIDNOTRUN; SCIP_CALL(SCIPgetLPBranchCands(scip, &tmplpcands, &tmplpcandssol, &tmplpcandsfrac, &nlpcands, &npriolpcands, NULL)); assert(nlpcands > 0); assert(npriolpcands > 0); SCIP_CALL(SCIPduplicateBufferArray(scip, &lpcands, tmplpcands, nlpcands)); SCIP_CALL(SCIPduplicateBufferArray(scip, &lpcandssol, tmplpcandssol, nlpcands)); SCIP_CALL(SCIPduplicateBufferArray(scip, &lpcandsfrac, tmplpcandsfrac, nlpcands)); SCIP_NODE* focus_node = SCIPgetFocusNode(scip); long long cur_node_id = SCIPnodeGetNumber(focus_node); long long nnodes = SCIPgetNNodes(scip) - 1; int nnodeLeft = SCIPgetNNodesLeft(scip); // printf("cur_node_id: %lld\n", cur_node_id); // printf("global_cut off bound: %f\n\n", SCIPgetCutoffbound(scip_)); // printf("is dual node: %d\n", gconf.is_dual_node(cur_node_id)); if (gconf.policy == Policy::ML_DING) { if (cur_node_id == 1) { SCIP_NODE* left_child_ptr; SCIP_NODE* right_child_ptr; gconf.create_children_by_ml_local_cuts(scip, &left_child_ptr, &right_child_ptr, false); (*result) = SCIP_BRANCHED; } else { SCIPexecRelpscostBranching(scip, lpcands, lpcandssol, lpcandsfrac, nlpcands, TRUE, result); } }else if (gconf.policy == Policy::ML_DFS_EXACT_SCORE1_GCN || gconf.policy == Policy::ML_DFS_EXACT_SCORE2_GCN || gconf.policy == Policy::ML_DFS_EXACT_SCORE3_GCN){ double cands_ml_score[nlpcands]; const char* var_name; int var_idx; char var_short_name[10]; int prefix_remove = gconf.prefix_size_remove; if (gconf.policy==Policy::ML_DFS_EXACT_SCORE1_GCN) { for (int i = 0; i < nlpcands; i++) { var_name = SCIPvarGetName(lpcands[i]); strcpy(var_short_name, var_name + prefix_remove); if (gconf.var_mapper.find(var_short_name) == gconf.var_mapper.end()) { cands_ml_score[i] = 0; } else { var_idx = gconf.var_mapper[var_short_name]; cands_ml_score[i] = gconf.ml_scores1[var_idx]; } } } else if (gconf.policy==Policy::ML_DFS_EXACT_SCORE3_GCN) { for (int i = 0; i < nlpcands; i++) { var_name = SCIPvarGetName(lpcands[i]); strcpy(var_short_name, var_name + prefix_remove); if (gconf.var_mapper.find(var_short_name) == gconf.var_mapper.end()) { cands_ml_score[i] = 0; } else { var_idx = gconf.var_mapper[var_short_name]; cands_ml_score[i] = 1-gconf.ml_scores1[var_idx]; } } } else if (gconf.policy==Policy::ML_DFS_EXACT_SCORE2_GCN ) { for (int i = 0; i < nlpcands; i++) { var_name = SCIPvarGetName(lpcands[i]); strcpy(var_short_name, var_name + prefix_remove); if (gconf.var_mapper.find(var_short_name) == gconf.var_mapper.end()) { cands_ml_score[i] = 0; } else { var_idx = gconf.var_mapper[var_short_name]; cands_ml_score[i] = gconf.ml_scores2[var_idx]; } } } bestcand = COML::calc_argmax(cands_ml_score, nlpcands); // printf("bestcand: %d, bestcand score: %f\n", bestcand, cands_ml_score[bestcand]); assert(*result == SCIP_DIDNOTRUN); if (0 > bestcand || bestcand >= nlpcands) printf("bestcand: %d, nlpcands: %d\n", bestcand, nlpcands); assert(0 <= bestcand && bestcand < nlpcands); SCIP_NODE *downchild; SCIP_NODE *upchild; SCIP_CALL(SCIPbranchVar(this->scip_, lpcands[bestcand], &downchild, NULL, &upchild)); if (downchild == NULL && upchild == NULL) *result = SCIP_CUTOFF; else *result = SCIP_BRANCHED; } else { SCIPexecRelpscostBranching(scip, lpcands, lpcandssol, lpcandsfrac, nlpcands, TRUE, result); } // printf("result code: %d\n", *result); SCIPfreeBufferArray(scip, &lpcandsfrac); SCIPfreeBufferArray(scip, &lpcandssol); SCIPfreeBufferArray(scip, &lpcands); return SCIP_OKAY; } COML::Branching::~Branching() { } /* * Callback methods of SCIP * -------------------------------------------------------------------------------------------------------------- */ extern "C" { static SCIP_DECL_BRANCHCOPY(branchCopyDynamicBranching); static SCIP_DECL_BRANCHFREE(branchFreeDynamicBranching); static SCIP_DECL_BRANCHINIT(branchInitDynamicBranching); static SCIP_DECL_BRANCHEXIT(branchExitDynamicBranching); static SCIP_DECL_BRANCHINITSOL(branchInitsolDynamicBranching); static SCIP_DECL_BRANCHEXITSOL(branchExitsolDynamicBranching); static SCIP_DECL_BRANCHEXECLP(branchExeclpDynamicBranching); static SCIP_DECL_BRANCHEXECEXT(branchExecextDynamicBranching); static SCIP_DECL_BRANCHEXECPS(branchExecpsDynamicBranching); } /** creates the branching rule for the given branching rule object and includes it in SCIP */ SCIP_RETCODE COML::SCIPincludeObjBranchrule_DB( SCIP *scip, /**< SCIP data structure */ scip::ObjBranchrule *objbranchrule, /**< branching rule object */ SCIP_Bool deleteobject /**< should the branching rule object be deleted when branching rule is freed? */ ) { SCIP_BRANCHRULEDATA *branchruledata; assert(scip != NULL); assert(objbranchrule != NULL); /* create branching rule data */ branchruledata = new SCIP_BRANCHRULEDATA; branchruledata->objbranchrule = objbranchrule; branchruledata->deleteobject = deleteobject; /* include branching rule */ SCIP_CALL(SCIPincludeBranchrule(scip, objbranchrule->scip_name_, objbranchrule->scip_desc_, objbranchrule->scip_priority_, objbranchrule->scip_maxdepth_, objbranchrule->scip_maxbounddist_, branchCopyDynamicBranching, branchFreeDynamicBranching, branchInitDynamicBranching, branchExitDynamicBranching, branchInitsolDynamicBranching, branchExitsolDynamicBranching, branchExeclpDynamicBranching, branchExecextDynamicBranching, branchExecpsDynamicBranching, branchruledata)); /*lint !e429*/ return SCIP_OKAY; /*lint !e429*/ } extern "C" { /** copy method for branchrule plugins (called when SCIP copies plugins) */ static SCIP_DECL_BRANCHCOPY(branchCopyDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; assert(scip != NULL); branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); assert(branchruledata->objbranchrule->scip_ != scip); if (branchruledata->objbranchrule->iscloneable()) { scip::ObjBranchrule *newobjbranchrule; newobjbranchrule = dynamic_cast<scip::ObjBranchrule *>(branchruledata->objbranchrule->clone(scip)); /* call include method of branchrule object */ SCIP_CALL(COML::SCIPincludeObjBranchrule_DB(scip, newobjbranchrule, TRUE)); } return SCIP_OKAY; } /** destructor of branching rule to free user data (called when SCIP is exiting) */ static SCIP_DECL_BRANCHFREE(branchFreeDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); assert(branchruledata->objbranchrule->scip_ == scip); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_free(scip, branchrule)); /* free branchrule object */ if (branchruledata->deleteobject) delete branchruledata->objbranchrule; /* free branchrule data */ delete branchruledata; SCIPbranchruleSetData(branchrule, NULL); /*lint !e64*/ return SCIP_OKAY; } /** initialization method of branching rule (called after problem was transformed) */ static SCIP_DECL_BRANCHINIT(branchInitDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); assert(branchruledata->objbranchrule->scip_ == scip); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_init(scip, branchrule)); return SCIP_OKAY; } /** deinitialization method of branching rule (called before transformed problem is freed) */ static SCIP_DECL_BRANCHEXIT(branchExitDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_exit(scip, branchrule)); return SCIP_OKAY; } /** solving process initialization method of branching rule (called when branch and bound process is about to begin) */ static SCIP_DECL_BRANCHINITSOL(branchInitsolDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_initsol(scip, branchrule)); return SCIP_OKAY; } /** solving process deinitialization method of branching rule (called before branch and bound process data is freed) */ static SCIP_DECL_BRANCHEXITSOL(branchExitsolDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_exitsol(scip, branchrule)); return SCIP_OKAY; } /** branching execution method for fractional LP solutions */ static SCIP_DECL_BRANCHEXECLP(branchExeclpDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_execlp(scip, branchrule, allowaddcons, result)); return SCIP_OKAY; } /** branching execution method for external candidates */ static SCIP_DECL_BRANCHEXECEXT(branchExecextDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_execext(scip, branchrule, allowaddcons, result)); return SCIP_OKAY; } /** branching execution method for not completely fixed pseudo solutions */ static SCIP_DECL_BRANCHEXECPS(branchExecpsDynamicBranching) { /*lint --e{715}*/ SCIP_BRANCHRULEDATA *branchruledata; branchruledata = SCIPbranchruleGetData(branchrule); assert(branchruledata != NULL); assert(branchruledata->objbranchrule != NULL); /* call virtual method of branchrule object */ SCIP_CALL(branchruledata->objbranchrule->scip_execps(scip, branchrule, allowaddcons, result)); return SCIP_OKAY; } } /* * Callback methods of branching rule * -------------------------------------------------------------------------------------------------------------- */ static SCIP_RETCODE printNodeRootPath( SCIP *scip, /**< SCIP data structure */ SCIP_NODE *node, /**< node data */ FILE *file /**< output file (or NULL for standard output) */ ) { SCIP_VAR **branchvars; /* array of variables on which the branchings has been performed in all ancestors */ double *branchbounds; /* array of bounds which the branchings in all ancestors set */ SCIP_BOUNDTYPE *boundtypes; /* array of boundtypes which the branchings in all ancestors set */ int *nodeswitches; /* marks, where in the arrays the branching decisions of the next node on the path start * branchings performed at the parent of node always start at position 0. For single variable branching, * nodeswitches[i] = i holds */ int nbranchvars; /* number of variables on which branchings have been performed in all ancestors * if this is larger than the array size, arrays should be reallocated and method should be called again */ int branchvarssize; /* available slots in arrays */ int nnodes; /* number of nodes in the nodeswitch array */ int nodeswitchsize; /* available slots in node switch array */ branchvarssize = SCIPnodeGetDepth(node); nodeswitchsize = branchvarssize; /* memory allocation */ SCIP_CALL(SCIPallocBufferArray(scip, &branchvars, branchvarssize)); SCIP_CALL(SCIPallocBufferArray(scip, &branchbounds, branchvarssize)); SCIP_CALL(SCIPallocBufferArray(scip, &boundtypes, branchvarssize)); SCIP_CALL(SCIPallocBufferArray(scip, &nodeswitches, nodeswitchsize)); SCIPnodeGetAncestorBranchingPath(node, branchvars, branchbounds, boundtypes, &nbranchvars, branchvarssize, nodeswitches, &nnodes, nodeswitchsize); /* if the arrays were to small, we have to reallocate them and recall SCIPnodeGetAncestorBranchingPath */ if (nbranchvars > branchvarssize || nnodes > nodeswitchsize) { branchvarssize = nbranchvars; nodeswitchsize = nnodes; /* memory reallocation */ SCIP_CALL(SCIPreallocBufferArray(scip, &branchvars, branchvarssize)); SCIP_CALL(SCIPreallocBufferArray(scip, &branchbounds, branchvarssize)); SCIP_CALL(SCIPreallocBufferArray(scip, &boundtypes, branchvarssize)); SCIP_CALL(SCIPreallocBufferArray(scip, &nodeswitches, nodeswitchsize)); SCIPnodeGetAncestorBranchingPath(node, branchvars, branchbounds, boundtypes, &nbranchvars, branchvarssize, nodeswitches, &nnodes, nodeswitchsize); assert(nbranchvars == branchvarssize); } /* we only want to create output, if branchings were performed */ if (nbranchvars >= 1) { int i; int j; /* print all nodes, starting from the root, which is last in the arrays */ for (j = nnodes - 1; j >= 0; --j) { int end; if (j == nnodes - 1) end = nbranchvars; else end = nodeswitches[j + 1]; for (i = nodeswitches[j]; i < end; ++i) { if (i > nodeswitches[j]) printf(" AND "); printf("<%s> %s %.1f", SCIPvarGetName(branchvars[i]), boundtypes[i] == SCIP_BOUNDTYPE_LOWER ? ">=" : "<=", branchbounds[i]); } printf("\n"); if (j > 0) { if (nodeswitches[j] - nodeswitches[j - 1] != 1) printf(" |\n |\n"); else if (boundtypes[i - 1] == SCIP_BOUNDTYPE_LOWER) printf("\\ \n \\\n"); else printf(" /\n/ \n"); } } } /* free all local memory */ SCIPfreeBufferArray(scip, &nodeswitches); SCIPfreeBufferArray(scip, &boundtypes); SCIPfreeBufferArray(scip, &branchbounds); SCIPfreeBufferArray(scip, &branchvars); return SCIP_OKAY; }
22,522
36.475874
180
cpp
PB-DFS
PB-DFS-master/src/branching_policy.hpp
#ifndef __SCIP_BRANCH_DYNAMIC_H__ #define __SCIP_BRANCH_DYNAMIC_H__ #include <vector> #include <utility> #include <cassert> #include <unordered_map> #include <chrono> #include <random> #include <stdio.h> #include <algorithm> #include <ctime> #include <string> #include <scip/scip.h> #include <objscip/objscip.h> #include <scip/struct_var.h> #include <scip/type_stat.h> #include <scip/struct_stat.h> #include <scip/type_scip.h> #include <scip/struct_scip.h> #include <scip/struct_tree.h> #include <scip/tree.h> #include <scip/struct_var.h> #include <scip/var.h> #include "global_config.hpp" #include <scip/scip_mem.h> #include <scip/set.h> #include <scip/struct_mem.h> #include <scip/visual.h> #include <scip/cons_linear.h> #include <scip/type_cons.h> #include <scip/struct_cons.h> #include <scip/struct_nodesel.h> #include <boost/algorithm/string.hpp> #include <math.h> #include <scip/branch_relpscost.h> namespace COML{ SCIP_RETCODE SCIPincludeObjBranchrule_DB( SCIP* scip, /**< SCIP data structure */ scip::ObjBranchrule* objbranchrule, /**< branching rule object */ SCIP_Bool deleteobject /**< should the branching rule object be deleted when branching rule is freed? */ ); class Branching : public scip::ObjBranchrule { public: int num_vars; Branching( // ---------------------------------------------- SCIP parameters -------------------------------------------- SCIP* scip, /**< SCIP data structure */ const char* name, /**< name of branching rule */ const char* desc, /**< description of branching rule */ int priority, /**< priority of the branching rule */ int maxdepth, /**< maximal depth level, up to which this branching rule should be used (or -1) */ SCIP_Real maxbounddist /**< maximal relative distance from current node's dual bound to primal bound * compared to best node's dual bound for applying branching rule * (0.0: only on current best node, 1.0: on all nodes) */ // ---------------------------------------------- ml parameters -------------------------------------------- ); ~Branching(); void record_solving_curves(SCIP* scip); /** branching execution method for fractional LP solutions * * @see SCIP_DECL_BRANCHEXECLP(x) in @ref type_branch.h */ SCIP_DECL_BRANCHEXECLP(scip_execlp) override; SCIP_DECL_BRANCHINIT(scip_init) override; }; } #endif
2,717
32.555556
139
hpp
PB-DFS
PB-DFS-master/src/global_config.cpp
#include "global_config.hpp" #include "utils.hpp" #include <time.h> #include <unistd.h> #include <sys/types.h> #include <pwd.h> #include <scip/struct_scip.h> #include <scip/struct_tree.h> #include <scip/struct_set.h> #include <scip/struct_mem.h> #include <scip/set.h> #include <scip/tree.h> #include <scip/cons_linear.h> COML::Global_config::Global_config() : solving_stats_logger(NULL), optimization_type(Optimization_Type::Maximization), seed(0), cutoff(0), split_id(0), objs(), time(), ml_scores1(), ml_scores2(), dual_bounds(), dual_time(), gaps(), gap_time(), prefix_size_remove(3) {} void COML::Global_config::init(Policy policy, int prob_type, double cutoff_time, int split_id) { const char *homedir; if ((homedir = getenv("HOME")) == NULL) homedir = getpwuid(getuid())->pw_dir; this->home_dir = homedir; this->start_time_clock = currentDateTime(); this->split_id = split_id; this->cutoff = cutoff_time; this->policy = policy; this->prob = prob_type; int _cutoff = cutoff_time; std::string pname; if (policy == Policy::SCIP_AGG) pname = "scip_agg"; else if (policy == Policy::SCIP_DEF) pname = "scip_def"; else if (policy == Policy::SCIP_DEF_PBDFS) pname = "scip_def_pbdfs"; else if (policy == Policy::ML_DING) pname = "ml_split"; else if (policy == Policy::ML_DFS_HEUR_SCORE1_GCN) { if (this->cutoff <= 100) pname = "pbdfs1_gcn_" + std::to_string(_cutoff); else pname = "pbdfs1_gcn"; } else if (policy == Policy::ML_DFS_HEUR_SCORE2_GCN){ if (this->cutoff <= 100) pname = "pbdfs2_gcn_" + std::to_string(_cutoff); else pname = "pbdfs2_gcn"; } else if (policy == Policy::ML_DFS_HEUR_SCORE1_LR){ if (this->cutoff <= 100) pname = "pbdfs1_lr_" + std::to_string(_cutoff); else pname = "pbdfs1_lr"; } else if (policy == Policy::ML_DFS_EXACT_SCORE1_GCN) { if (this->cutoff <= 100) pname = "pb_dfs1_gcn_exact_" + std::to_string(_cutoff); else pname = "pb_dfs1_gcn_exact"; } else if (policy == Policy::ML_DFS_EXACT_SCORE2_GCN){ if (this->cutoff <= 100) pname = "pb_dfs2_gcn_exact_" + std::to_string(_cutoff); else pname = "pb_dfs2_gcn_exact"; } else if (policy == Policy::ML_DFS_EXACT_SCORE3_GCN){ if (this->cutoff <= 100) pname = "pb_dfs3_gcn_exact_" + std::to_string(_cutoff); else pname = "pb_dfs3_gcn_exact"; } else if (policy == Policy::ML_DFS_HEUR_SCORE2_LR){ if (this->cutoff <= 100) pname = "pbdfs2_lr_" + std::to_string(_cutoff); else pname = "pbdfs2_lr"; } else if (policy == Policy::SCIP_HEUR_ALL_ROUNDING) pname = "heur_all_rounding"; else if (policy == Policy::SCIP_HEUR_ALL_DIVING) pname = "heur_all_diving"; else if (policy == Policy::SCIP_HEUR_FEASPUMP) pname = "heur_feaspump"; else if (policy == Policy::SCIP_HEUR_RENS) pname = "heur_rens"; else throw std::runtime_error("unrecognized policy!\n"); switch (prob_type) { case 0: this->prob_str = "mis"; this->optimization_type = Maximization; break; case 1: this->prob_str = "sc"; this->optimization_type = Minimization; break; case 2: this->prob_str = "tsp"; this->optimization_type = Minimization; break; case 3: this->prob_str = "vrp"; this->optimization_type = Minimization; break; case 4: this->prob_str = "vc"; this->optimization_type = Minimization; break; case 5: this->prob_str = "ds"; this->optimization_type = Minimization; break; case 6: this->prob_str = "ca"; this->optimization_type = Maximization; break; default: throw std::runtime_error("unrecognized problem type!\n"); } this->DATA_BASE_DIR = ("./datasets/" + prob_str + "/"); this->LOG_DIR = "./ret_solver/" + prob_str + "/" + pname + "/"; COML::create_dir("./ret_solver/"); COML::create_dir("./ret_solver/" + prob_str); COML::create_dir(this->LOG_DIR); std::string info( "problem type: " + prob_str + "\nevaluation policy: " + pname + "\ndata read from: " + DATA_BASE_DIR + "\nlog write to: " + this->LOG_DIR + "\n\n"); printf("%s\n", info.c_str()); std::string tmp; tmp = LOG_DIR + "solving_stats_" + std::to_string(this->split_id) + ".csv"; this->solving_stats_logger = new std::ofstream(tmp); (*solving_stats_logger) << "instance_id,status,opt_gap,best_sol_obj,best_sol_time,best_sol_heur,best_heur_sol_obj,best_heur_sol_time,heur_ncalls,heur_tot_time\n"; (*solving_stats_logger).flush(); } int comparator_decending1(const std::pair<std::string, double> &l, const std::pair<std::string, double> &r) { return l.second > r.second; } void COML::Global_config::cleanup() { objs.clear(); time.clear(); dual_bounds.clear(); dual_time.clear(); gaps.clear(); gap_time.clear(); first_sol_heur = "none"; this->ml_scores1.clear(); this->ml_scores2.clear(); this->var_mapper.clear(); } void COML::Global_config::setup(int nvars, double* ml_scores1, double* ml_scores2, int seed) { this->seed = seed; this->nprobvars = nvars; for (int i = 0; i < nprobvars; i++){ this->ml_scores1.push_back(ml_scores1[i]); this->ml_scores2.push_back(ml_scores2[i]); } } COML::Global_config::~Global_config() { if (solving_stats_logger != NULL) { solving_stats_logger->flush(); solving_stats_logger->close(); delete solving_stats_logger; } } SCIP_RETCODE COML::Global_config::create_children_by_ml_local_cuts(SCIP* scip, SCIP_NODE** left_child_ptr, SCIP_NODE** right_child_ptr, bool left_child_only) { int nfixed_vars; int rhs; switch (this->prob) { case 0: // mis prob case 4: // vc prob case 6: nfixed_vars = this->nprobvars * 0.9; rhs = 10; break; case 1: // sc case 5: // ds nfixed_vars = this->nprobvars * 0.9; rhs = 0; break; default: throw std::runtime_error("problem not specify fixing vars\n"); break; } /* create mapping between var names and var */ SCIP_VAR* var; SCIP_VAR* var1; SCIP_VAR* var2; int i; int j; int var_idx; std::string var_name; std::string var_name1; std::string var_name2; std::string prefix; std::vector<std::string> result; SCIP_VAR** vars = SCIPgetVars(scip); int nvars = SCIPgetNVars(scip); printf("fixing variables: %d/%d\n", nfixed_vars, nvars); std::unordered_map<std::string, SCIP_VAR*> dict; for (i = 0; i < nvars; i++){ dict[SCIPvarGetName(vars[i])] = vars[i]; } // create var prefix var_name = SCIPvarGetName(vars[0]); prefix = var_name.substr(0, this->prefix_size_remove); SCIP_VAR* fixed_vars[nfixed_vars]; double fixed_var_coefs[nfixed_vars]; int subtract_to_rhs = 0; std::vector<std::pair<std::string, double>> name_score; for (i = 0; i < this->ml_scores2.size(); i++) { std::pair<std::string, double> p; p.first = this->orderednames[i]; p.second = this->ml_scores2[i]; name_score.push_back(p); } std::sort(name_score.begin(), name_score.end(), comparator_decending1); for (i = 0, j = 0; j < nfixed_vars; i++) { var_name = name_score[i].first; var_idx = this->var_mapper[var_name]; if (dict.find( prefix + var_name ) != dict.end()){ var = dict[prefix + var_name]; var_idx = this->var_mapper[var_name]; fixed_vars[j] = var; if (this->ml_scores1[var_idx] > 0.5) { subtract_to_rhs+=1; fixed_var_coefs[j] = - 1.; } else { fixed_var_coefs[j] = 1.; } j++; } } rhs = rhs - subtract_to_rhs; printf("creating children by ml split!\n"); SCIP_NODE* focusnode = SCIPgetFocusNode(scip); /* left */ SCIP_NODE* left_child; SCIP_CONS* cons_left; SCIP_CALL( SCIPnodeCreateChild(&left_child, scip->mem->probmem, scip->set, scip->stat, scip->tree, 1, SCIPnodeGetEstimate(focusnode))); SCIPcreateConsLinear(scip, &cons_left, "cons_left_cut", nfixed_vars, fixed_vars, fixed_var_coefs, - SCIPsetInfinity(scip->set), rhs, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE); SCIPaddConsNode(scip, left_child, cons_left, NULL); SCIPreleaseCons(scip, &cons_left); *left_child_ptr = left_child; // left child should be the new focus subtree root if (left_child_only) return SCIP_OKAY; /* right */ SCIP_NODE* right_child; SCIP_CONS* cons_right; SCIP_CALL( SCIPnodeCreateChild(&right_child, scip->mem->probmem, scip->set, scip->stat, scip->tree, 0, SCIPnodeGetEstimate(focusnode))); SCIPcreateConsLinear(scip, &cons_right, "cons_left_cut", nfixed_vars, fixed_vars, fixed_var_coefs, rhs+1 , SCIPsetInfinity(scip->set), TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE); SCIPaddConsNode(scip, right_child, cons_right, NULL); SCIPreleaseCons(scip, &cons_right); *right_child_ptr = right_child; } COML::Global_config gconf;
9,444
33.345455
166
cpp
PB-DFS
PB-DFS-master/src/global_config.hpp
#ifndef __global__conf__ #define __global__conf__ #include <cstdlib> #include <string> #include <pwd.h> #include <unistd.h> #include <fstream> #include <vector> #include <unordered_map> #include <unordered_set> #include <queue> #include <boost/algorithm/string.hpp> #include <scip/type_retcode.h> #include <scip/scip.h> namespace COML{ typedef enum Optimization_Type { Maximization, Minimization } Optimization_Type; typedef enum Policy { // exact SCIP_DEF_PBDFS, SCIP_DEF, SCIP_AGG, ML_DING, ML_DFS_HEUR_SCORE1_GCN, ML_DFS_HEUR_SCORE2_GCN, ML_DFS_HEUR_SCORE1_LR, ML_DFS_HEUR_SCORE2_LR, SCIP_HEUR_FEASPUMP, SCIP_HEUR_RENS, SCIP_HEUR_ALL_ROUNDING, SCIP_HEUR_ALL_DIVING, ML_DFS_EXACT_SCORE1_GCN, ML_DFS_EXACT_SCORE2_GCN, ML_DFS_EXACT_SCORE3_GCN, STATS, } Policy; typedef struct Global_config { Global_config(); ~Global_config(); public: std::string prob_str; Optimization_Type optimization_type; int split_id; std::string prob_lp_path; int prefix_size_remove; int nprobvars; int prob; std::unordered_map<std::string, int> var_mapper; std::vector<std::string> orderednames; std::vector<double> ml_scores1; // fn = p std::vector<double> ml_scores2; // fn = max(1-p, p) Policy policy; std::string cur_prob; double cutoff; std::string start_time_clock; std::string home_dir; std::string DATA_BASE_DIR; std::string LOG_DIR; std::ofstream* solving_stats_logger; bool record_solving_info = true; std::string first_sol_heur; // recorded information during solving std::vector<double> objs; std::vector<double> time; std::vector<double> dual_bounds; std::vector<double> dual_time; std::vector<double> gaps; std::vector<double> gap_time; void init(Policy policy, int prob_type, double cutoff_time, int split_id); void setup(int nnodes, double* ml_scores1, double* ml_scores2, int seed); void cleanup(); // must be used at the end SCIP_RETCODE create_children_by_ml_local_cuts(SCIP* scip, SCIP_NODE** left_child_ptr, SCIP_NODE** right_child_ptr, bool left_child_only); // --- scip param variables --- int seed; }Global_config; } extern COML::Global_config gconf; #endif
2,328
23.260417
111
hpp
PB-DFS
PB-DFS-master/src/heur_ml_subscip.cpp
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ /* */ /* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum */ /* fuer Informationstechnik Berlin */ /* */ /* SCIP is distributed under the terms of the ZIB Academic License. */ /* */ /* You should have received a copy of the ZIB Academic License */ /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /**@file heur_MLdfs.c * @brief Local branching heuristic according to Fischetti and Lodi * @author Timo Berthold * @author Marc Pfetsch */ /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ #include <blockmemshell/memory.h> #include <scip/cons_linear.h> #include <scip/heuristics.h> #include "heur_ml_subscip.hpp" #include <scip/pub_event.h> #include <scip/pub_heur.h> #include <scip/pub_message.h> #include <scip/pub_misc.h> #include <scip/pub_sol.h> #include <scip/pub_var.h> #include <scip/scip_branch.h> #include <scip/scip_cons.h> #include <scip/scip_copy.h> #include <scip/scip_event.h> #include <scip/scip_general.h> #include <scip/scip_heur.h> #include <scip/scip_mem.h> #include <scip/scip_message.h> #include <scip/scip_nodesel.h> #include <scip/scip_numerics.h> #include <scip/scip_param.h> #include <scip/scip_prob.h> #include <scip/scip_sol.h> #include <scip/scip_solve.h> #include <scip/scip_solvingstats.h> #include <string.h> #include "branching_ml_dfs.hpp" #include "nodesel_ml_dfs.hpp" #define HEUR_NAME "mldfs" #define HEUR_DESC "local branching heuristic by Fischetti and Lodi" #define HEUR_DISPCHAR 'L' #define HEUR_PRIORITY -1000000 #define HEUR_FREQ 100 #define HEUR_FREQOFS 0 #define HEUR_MAXDEPTH -1 #define HEUR_TIMING SCIP_HEURTIMING_BEFOREPRESOL #define HEUR_USESSUBSCIP TRUE /**< does the heuristic use a secondary SCIP instance? */ #define DEFAULT_NEIGHBORHOODSIZE 18 /* radius of the incumbents neighborhood to be searched */ #define DEFAULT_NODESOFS 1000 /* number of nodes added to the contingent of the total nodes */ #define DEFAULT_MAXNODES 10000 /* maximum number of nodes to regard in the subproblem */ #define DEFAULT_MINIMPROVE 0.01 /* factor by which MLdfs should at least improve the incumbent */ #define DEFAULT_MINNODES 1000 /* minimum number of nodes required to start the subproblem */ #define DEFAULT_NODESQUOT 0.05 /* contingent of sub problem nodes in relation to original nodes */ #define DEFAULT_LPLIMFAC 1.5 /* factor by which the limit on the number of LP depends on the node limit */ #define DEFAULT_NWAITINGNODES 200 /* number of nodes without incumbent change that heuristic should wait */ #define DEFAULT_USELPROWS FALSE /* should subproblem be created out of the rows in the LP rows, * otherwise, the copy constructors of the constraints handlers are used */ #define DEFAULT_COPYCUTS TRUE /* if DEFAULT_USELPROWS is FALSE, then should all active cuts from the cutpool * of the original scip be copied to constraints of the subscip */ #define DEFAULT_BESTSOLLIMIT 3 /* limit on number of improving incumbent solutions in sub-CIP */ #define DEFAULT_USEUCT FALSE /* should uct node selection be used at the beginning of the search? */ /* event handler properties */ #define EVENTHDLR_NAME "MLdfs" #define EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic" #define EXECUTE 0 #define WAITFORNEWSOL 1 /* * Data structures */ /** primal heuristic data */ struct SCIP_HeurData { int nwaitingnodes; /**< number of nodes without incumbent change that heuristic should wait */ int nodesofs; /**< number of nodes added to the contingent of the total nodes */ int minnodes; /**< minimum number of nodes required to start the subproblem */ int maxnodes; /**< maximum number of nodes to regard in the subproblem */ SCIP_Longint usednodes; /**< amount of nodes local branching used during all calls */ SCIP_Real nodesquot; /**< contingent of sub problem nodes in relation to original nodes */ SCIP_Real minimprove; /**< factor by which MLdfs should at least improve the incumbent */ SCIP_Real nodelimit; /**< the nodelimit employed in the current sub-SCIP, for the event handler*/ SCIP_Real lplimfac; /**< factor by which the limit on the number of LP depends on the node limit */ int neighborhoodsize; /**< radius of the incumbent's neighborhood to be searched */ int callstatus; /**< current status of MLdfs heuristic */ SCIP_SOL* lastsol; /**< the last incumbent MLdfs used as reference point */ int curneighborhoodsize;/**< current neighborhoodsize */ int curminnodes; /**< current minimal number of nodes required to start the subproblem */ int emptyneighborhoodsize;/**< size of neighborhood that was proven to be empty */ SCIP_Bool uselprows; /**< should subproblem be created out of the rows in the LP rows? */ SCIP_Bool copycuts; /**< if uselprows == FALSE, should all active cuts from cutpool be copied * to constraints in subproblem? */ int bestsollimit; /**< limit on number of improving incumbent solutions in sub-CIP */ SCIP_Bool useuct; /**< should uct node selection be used at the beginning of the search? */ }; /** creates a new solution for the original problem by copying the solution of the subproblem */ static SCIP_RETCODE createNewSol( SCIP* scip, /**< SCIP data structure of the original problem */ SCIP* subscip, /**< SCIP data structure of the subproblem */ SCIP_VAR** subvars, /**< the variables of the subproblem */ SCIP_HEUR* heur, /**< the MLdfs heuristic */ SCIP_SOL* subsol, /**< solution of the subproblem */ SCIP_Bool* success /**< pointer to store, whether new solution was found */ ) { SCIP_VAR** vars; int nvars; SCIP_SOL* newsol; SCIP_Real* subsolvals; assert( scip != NULL ); assert( subscip != NULL ); assert( subvars != NULL ); assert( subsol != NULL ); /* copy the solution */ SCIP_CALL( SCIPgetVarsData(scip, &vars, &nvars, NULL, NULL, NULL, NULL) ); /* sub-SCIP may have more variables than the number of active (transformed) variables in the main SCIP * since constraint copying may have required the copy of variables that are fixed in the main SCIP */ assert(nvars <= SCIPgetNOrigVars(subscip)); SCIP_CALL( SCIPallocBufferArray(scip, &subsolvals, nvars) ); /* copy the solution */ SCIP_CALL( SCIPgetSolVals(subscip, subsol, nvars, subvars, subsolvals) ); /* create new solution for the original problem */ SCIP_CALL( SCIPcreateSol(scip, &newsol, heur) ); SCIP_CALL( SCIPsetSolVals(scip, newsol, nvars, vars, subsolvals) ); SCIP_CALL( SCIPtrySolFree(scip, &newsol, FALSE, FALSE, TRUE, TRUE, TRUE, success) ); SCIPfreeBufferArray(scip, &subsolvals); return SCIP_OKAY; } /* ---------------- Callback methods of event handler ---------------- */ /* exec the event handler * * we interrupt the solution process */ static SCIP_DECL_EVENTEXEC(eventExecMLdfs) { SCIP_HEURDATA* heurdata; assert(eventhdlr != NULL); assert(eventdata != NULL); assert(strcmp(SCIPeventhdlrGetName(eventhdlr), EVENTHDLR_NAME) == 0); assert(event != NULL); assert(SCIPeventGetType(event) & SCIP_EVENTTYPE_LPSOLVED); heurdata = (SCIP_HEURDATA*)eventdata; assert(heurdata != NULL); /* interrupt solution process of sub-SCIP */ if( SCIPgetNLPs(scip) > heurdata->lplimfac * heurdata->nodelimit ) { SCIPdebugMsg(scip, "interrupt after %" SCIP_LONGINT_FORMAT " LPs\n",SCIPgetNLPs(scip)); SCIP_CALL( SCIPinterruptSolve(scip) ); } return SCIP_OKAY; } /* * Callback methods of primal heuristic */ /** copy method for primal heuristic plugins (called when SCIP copies plugins) */ static SCIP_DECL_HEURCOPY(heurCopyMLdfs) { /*lint --e{715}*/ assert(scip != NULL); assert(heur != NULL); assert(strcmp(SCIPheurGetName(heur), HEUR_NAME) == 0); /* call inclusion method of primal heuristic */ SCIP_CALL( SCIPincludeHeurMLdfs(scip) ); return SCIP_OKAY; } /** destructor of primal heuristic to free user data (called when SCIP is exiting) */ static SCIP_DECL_HEURFREE(heurFreeMLdfs) { /*lint --e{715}*/ SCIP_HEURDATA* heurdata; assert( heur != NULL ); assert( scip != NULL ); /* get heuristic data */ heurdata = SCIPheurGetData(heur); assert( heurdata != NULL ); /* free heuristic data */ SCIPfreeBlockMemory(scip, &heurdata); SCIPheurSetData(heur, NULL); return SCIP_OKAY; } /** initialization method of primal heuristic (called after problem was transformed) */ static SCIP_DECL_HEURINIT(heurInitMLdfs) { /*lint --e{715}*/ SCIP_HEURDATA* heurdata; assert( heur != NULL ); assert( scip != NULL ); /* get heuristic's data */ heurdata = SCIPheurGetData(heur); assert( heurdata != NULL ); /* with a little abuse we initialize the heurdata as if MLdfs would have finished its last step regularly */ heurdata->callstatus = WAITFORNEWSOL; heurdata->lastsol = NULL; heurdata->usednodes = 0; heurdata->curneighborhoodsize = heurdata->neighborhoodsize; heurdata->curminnodes = heurdata->minnodes; heurdata->emptyneighborhoodsize = 0; return SCIP_OKAY; } /** execution method of primal heuristic */ static SCIP_DECL_HEUREXEC(heurExecMLdfs) { /*lint --e{715}*/ SCIP_VAR** subvars; /* subproblem's variables */ SCIP_EVENTHDLR* eventhdlr; /* event handler for LP events */ SCIP_HEURDATA* heurdata; SCIP_HASHMAP* varmapfw; /* mapping of SCIP variables to sub-SCIP variables */ SCIP_VAR** vars; SCIP_Real cutoff; /* objective cutoff for the subproblem */ SCIP_Real upperbound; int nvars; int i; SCIP_Bool success; SCIP* subscip; SCIP_CALL( SCIPcreate(&subscip) ); printf("exe ml dfs heuristic\n"); /* get the data of the variables and the best solution */ SCIP_CALL( SCIPgetVarsData(scip, &vars, &nvars, NULL, NULL, NULL, NULL) ); /* create the variable mapping hash map */ SCIP_CALL( SCIPhashmapCreate(&varmapfw, SCIPblkmem(subscip), nvars) ); success = FALSE; SCIPcopy(scip, subscip, varmapfw, NULL, "df", FALSE, FALSE, FALSE, 0, NULL); SCIP_CALL( SCIPallocBufferArray(scip, &subvars, nvars) ); for (i = 0; i < nvars; ++i) subvars[i] = (SCIP_VAR*) SCIPhashmapGetImage(varmapfw, vars[i]); assert(scip != NULL); assert(subscip != NULL); SCIP_CALL( SCIPsetIntParam(subscip, "display/verblevel", 0) ); SCIP_CALL( SCIPsetBoolParam(subscip, "timing/statistictiming", FALSE) ); /* speed up the heuristic */ SCIPsetIntParam(subscip, "presolving/maxrounds", 0); SCIPsetIntParam(subscip, "separating/maxrounds", 0); SCIPsetIntParam(subscip, "presolving/maxrestarts", 0); SCIPsetIntParam(subscip, "separating/maxroundsroot", 0); SCIPsetHeuristics(subscip, SCIP_PARAMSETTING_OFF, TRUE); SCIP_CALL( SCIPsetSubscipsOff(subscip, TRUE) ); /* set termination condition */ // SCIPsetRealParam(subscip, "limits/time", 5); SCIPsetIntParam(subscip, "limits/solutions", 1); COML::Branching_dfs* branching_policy = new COML::Branching_dfs( subscip, "", "", 66666667, -1, 1); COML::SCIPincludeObjBranchrule_MLDFS(subscip, branching_policy, false); COML::Nodesel_ML_DFS* nodesel_policy = new COML::Nodesel_ML_DFS(subscip, "", "", 66666667, 66666667); SCIPincludeObjNodesel_MLDFS(subscip, nodesel_policy, false); SCIP_CALL( SCIPtransformProb(subscip) ); SCIP_CALL_ABORT( SCIPsolve(subscip) ); printf("endsolve\n"); if( SCIPgetNSols(subscip) > 0 ) { SCIP_SOL** subsols; int nsubsols; /* check, whether a solution was found; * due to numerics, it might happen that not all solutions are feasible -> try all solutions until one was accepted */ nsubsols = SCIPgetNSols(subscip); subsols = SCIPgetSols(subscip); success = FALSE; for( i = 0; i < nsubsols; ++i ) { SCIP_CALL( createNewSol(scip, subscip, subvars, heur, subsols[i], &success) ); if( success ) { *result = SCIP_FOUNDSOL; } } } else { printf("heuristic did not find any feasible solution\n"); } /* free subproblem */ SCIPfreeBufferArray(scip, &subvars); SCIP_CALL( SCIPfree(&subscip) ); return SCIP_OKAY; } /* * primal heuristic specific interface methods */ /** creates the MLdfs primal heuristic and includes it in SCIP */ SCIP_RETCODE SCIPincludeHeurMLdfs( SCIP* scip /**< SCIP data structure */ ) { SCIP_HEURDATA* heurdata; SCIP_HEUR* heur; /* create MLdfs primal heuristic data */ SCIP_CALL( SCIPallocBlockMemory(scip, &heurdata) ); /* include primal heuristic */ SCIP_CALL( SCIPincludeHeurBasic(scip, &heur, HEUR_NAME, HEUR_DESC, HEUR_DISPCHAR, HEUR_PRIORITY, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_TIMING, HEUR_USESSUBSCIP, heurExecMLdfs, heurdata) ); assert(heur != NULL); /* set non-NULL pointers to callback methods */ SCIP_CALL( SCIPsetHeurCopy(scip, heur, heurCopyMLdfs) ); SCIP_CALL( SCIPsetHeurFree(scip, heur, heurFreeMLdfs) ); SCIP_CALL( SCIPsetHeurInit(scip, heur, heurInitMLdfs) ); return SCIP_OKAY; }
15,415
40
124
cpp
PB-DFS
PB-DFS-master/src/heur_ml_subscip.hpp
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ /* */ /* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum */ /* fuer Informationstechnik Berlin */ /* */ /* SCIP is distributed under the terms of the ZIB Academic License. */ /* */ /* You should have received a copy of the ZIB Academic License */ /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /**@file heur_localbranching.h * @ingroup PRIMALHEURISTICS * @brief Local branching heuristic according to Fischetti and Lodi * @author Timo Berthold */ /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ #ifndef __SCIP_HEUR_MLSUBSCIP_H__ #define __SCIP_HEUR_MLSUBSCIP_H__ #include <scip/def.h> #include <scip/type_retcode.h> #include <scip/type_scip.h> /** creates local branching primal heuristic and includes it in SCIP * * @ingroup PrimalHeuristicIncludes */ SCIP_RETCODE SCIPincludeHeurMLdfs( SCIP* scip /**< SCIP data structure */ ); #endif
1,795
41.761905
123
hpp
PB-DFS
PB-DFS-master/src/main.cpp
#include "preprocessor.hpp" #include <iostream> #include <time.h> #include <sys/time.h> #include "global_config.hpp" #include "scip_solver.hpp" double get_wall_time(){ struct timeval time; if (gettimeofday(&time,NULL)){ return 0; } return (double)time.tv_sec + (double)time.tv_usec * .000001; } void exit_and_help(){ std::cout << "Usage: ./MIS [options] datafile" << std::endl; std::cout << "options: " << std::endl; std::cout << "-p : set the problem type" << std::endl; std::cout << "-0 - mis problem" << std::endl; std::cout << "-1 - sc problem" << std::endl; std::cout << "-2 - tsp problem" << std::endl; std::cout << "-3 - vrp problem" << std::endl; std::cout << "-4 - vc problem" << std::endl; std::cout << "-5 - ds problem" << std::endl; std::cout << "-6 - ca problem" << std::endl; std::cout << "-d : set the test dataset split" << std::endl; std::cout << "total 3 splits: 0..2" << std::endl; std::cout << "-b : set branching method to solve the problem (default 0)" << std::endl; std::cout << "0 .. 6" << std::endl; exit(1); } int main(int argc, char* argv[]) { using namespace COML; double param_cutoff = 1000; //cutoff time in seconds. int param_prob_type = 0; int branching_policy = 0; int split_id = 0; int span = 10; // parse options (parameters) for(int i = 1; i < argc; ++i){ if(argv[i][0] != '-'){ break; } if(++i >= argc){ exit_and_help(); } switch(argv[i-1][1]){ case 't': param_cutoff = std::stod(argv[i]); break; case 'h': branching_policy = std::atoi(argv[i]); break; case 'p': param_prob_type = std::atoi(argv[i]); break; case 'd': split_id = std::atoi(argv[i]); break; default: std::cout << "Unknown option: " << argv[i-1][1] << std::endl; exit_and_help(); } } Policy p; switch (branching_policy) { case 0: p = Policy::SCIP_DEF; break; case 1: p = Policy::SCIP_AGG; break; case 2: p = Policy::ML_DING; break; case 3: p = Policy::ML_DFS_HEUR_SCORE1_GCN; break; case 4: p = Policy::ML_DFS_HEUR_SCORE2_GCN; break; case 5: p = Policy::ML_DFS_HEUR_SCORE1_LR; break; case 6: p = Policy::ML_DFS_HEUR_SCORE2_LR; break; case 7: p = Policy::SCIP_HEUR_FEASPUMP; break; case 8: p = Policy::SCIP_HEUR_RENS; break; case 9: p = Policy::SCIP_HEUR_ALL_ROUNDING; break; case 10: p = Policy::SCIP_HEUR_ALL_DIVING; break; case 11: p = Policy::ML_DFS_EXACT_SCORE1_GCN; break; case 12: p = Policy::ML_DFS_EXACT_SCORE2_GCN; break; case 13: p = Policy::ML_DFS_EXACT_SCORE3_GCN; break; case 14: p = Policy::SCIP_DEF_PBDFS; break; default: throw std::runtime_error("unknown branching_policy\n"); } gconf.init(p, param_prob_type, param_cutoff, split_id); // specify testing & training graphs; optimal solutions for the training graphs must be provided. std::vector<std::string> test_files; for (int i = 0; i < 30; i++){ test_files.push_back("eval_large/" + std::to_string(i)); } for (auto test_file : test_files) { gconf.cur_prob = test_file; Preprocessor preprocessor_ptr; int nvars; if (branching_policy == 2 || branching_policy == 3 || branching_policy == 4 || branching_policy == 5 || branching_policy == 6 || branching_policy == 11 || branching_policy == 12 || branching_policy == 13 || branching_policy == 14) { preprocessor_ptr.load_prob_map_gcn(gconf.var_mapper, branching_policy); // get ml scores for each node const std::vector<double>& predicted_real_values = preprocessor_ptr.predicted_real_value; nvars = predicted_real_values.size(); double ml_scores1[nvars]; double ml_scores2[nvars]; for (auto i = 0u; i < nvars; ++i){ ml_scores1[i] = predicted_real_values[i]; // (scoring fn: p) ml_scores2[i] = predicted_real_values[i]; // (scoring fn: max(p, 1-p)) if (ml_scores2[i] < 0.5) ml_scores2[i] = 1 - ml_scores2[i]; } gconf.setup(nvars, ml_scores1, ml_scores2, 0); }else gconf.setup(0, NULL, NULL, 0); COML::SCIP_Solver solver; solver.solve(); double obj = solver.finalize(); gconf.cleanup(); } return 0; }
4,615
32.208633
108
cpp
PB-DFS
PB-DFS-master/src/nodesel_ml_dfs.cpp
#include <cassert> #include "nodesel_ml_dfs.hpp" #include "global_config.hpp" #include <scip/type_var.h> #include <scip/struct_var.h> #include <scip/type_tree.h> #include <scip/struct_tree.h> #include <scip/type_lp.h> /** node selector data */ struct SCIP_NodeselData { scip::ObjNodesel* objnodesel; /**< node selector object */ SCIP_Bool deleteobject; /**< should the node selector object be deleted when node selector is freed? */ }; SCIP_DECL_NODESELSELECT(COML::Nodesel_ML_DFS::scip_select) { assert(nodesel != NULL); assert(strcmp(SCIPnodeselGetName(nodesel), scip_name_) == 0); assert(scip != NULL); assert(selnode != NULL); *selnode = SCIPgetBestNode(scip); return SCIP_OKAY; }; SCIP_DECL_NODESELCOMP(COML::Nodesel_ML_DFS::scip_comp) { int depth1; int depth2; assert(nodesel != NULL); assert(strcmp(SCIPnodeselGetName(nodesel), scip_name_) == 0); assert(scip != NULL); depth1 = SCIPnodeGetDepth(node1); depth2 = SCIPnodeGetDepth(node2); if( depth1 > depth2 ) return -1; else if( depth1 < depth2 ) return +1; else { unsigned int node1_bd_type = node1->domchg->domchgbound.boundchgs[0].boundtype; unsigned int node2_bd_type = node2->domchg->domchgbound.boundchgs[0].boundtype; if (gconf.policy==Policy::ML_DFS_HEUR_SCORE1_GCN || gconf.policy==Policy::ML_DFS_EXACT_SCORE1_GCN || gconf.policy==Policy::ML_DFS_HEUR_SCORE1_LR || gconf.policy == Policy::SCIP_DEF_PBDFS) { if (node1_bd_type == SCIP_BOUNDTYPE_LOWER) return -1; else if(node2_bd_type == SCIP_BOUNDTYPE_LOWER) return +1; else return 0; } else if (gconf.policy==Policy::ML_DFS_EXACT_SCORE3_GCN) { if (node1_bd_type == SCIP_BOUNDTYPE_LOWER) return +1; else if(node2_bd_type == SCIP_BOUNDTYPE_LOWER) return -1; else return 0; } else if (gconf.policy==Policy::ML_DFS_HEUR_SCORE2_GCN || gconf.policy==Policy::ML_DFS_EXACT_SCORE2_GCN || gconf.policy==Policy::ML_DFS_HEUR_SCORE2_LR) { const char* var_name; int var_idx; char var_short_name[10]; int prefix_remove; if (gconf.policy==Policy::ML_DFS_EXACT_SCORE2_GCN) prefix_remove = gconf.prefix_size_remove; else prefix_remove = gconf.prefix_size_remove + 2; var_name = SCIPvarGetName(node1->domchg->domchgbound.boundchgs[0].var); strcpy(var_short_name, var_name + prefix_remove); var_idx = gconf.var_mapper[var_short_name]; if (gconf.ml_scores1[var_idx] > 0.5) { if (node1_bd_type == SCIP_BOUNDTYPE_LOWER) return -1; else if(node2_bd_type == SCIP_BOUNDTYPE_LOWER) return +1; else return 0; } else { if (node1_bd_type == SCIP_BOUNDTYPE_LOWER) return +1; else if(node2_bd_type == SCIP_BOUNDTYPE_LOWER) return -1; } } } }; /* * Callback methods of node selector */ extern "C" { /** copy method for node selector plugins (called when SCIP copies plugins) */ static SCIP_DECL_NODESELCOPY(nodeselCopyObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; assert(scip != NULL); nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); assert(nodeseldata->objnodesel->scip_ != scip); if( nodeseldata->objnodesel->iscloneable() ) { scip::ObjNodesel* newobjnodesel; newobjnodesel = dynamic_cast<scip::ObjNodesel*> (nodeseldata->objnodesel->clone(scip)); /* call include method of node selector object */ SCIP_CALL( SCIPincludeObjNodesel(scip, newobjnodesel, TRUE) ); } return SCIP_OKAY; } /** destructor of node selector to free user data (called when SCIP is exiting) */ static SCIP_DECL_NODESELFREE(nodeselFreeObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); assert(nodeseldata->objnodesel->scip_ == scip); /* call virtual method of nodesel object */ SCIP_CALL( nodeseldata->objnodesel->scip_free(scip, nodesel) ); /* free nodesel object */ if( nodeseldata->deleteobject ){ delete nodeseldata->objnodesel; nodeseldata->objnodesel = NULL; } /* free nodesel data */ delete nodeseldata; SCIPnodeselSetData(nodesel, NULL); /*lint !e64*/ return SCIP_OKAY; } /** initialization method of node selector (called after problem was transformed) */ static SCIP_DECL_NODESELINIT(nodeselInitObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); assert(nodeseldata->objnodesel->scip_ == scip); /* call virtual method of nodesel object */ SCIP_CALL( nodeseldata->objnodesel->scip_init(scip, nodesel) ); return SCIP_OKAY; } /** deinitialization method of node selector (called before transformed problem is freed) */ static SCIP_DECL_NODESELEXIT(nodeselExitObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); /* call virtual method of nodesel object */ SCIP_CALL( nodeseldata->objnodesel->scip_exit(scip, nodesel) ); return SCIP_OKAY; } /** solving process initialization method of node selector (called when branch and bound process is about to begin) */ static SCIP_DECL_NODESELINITSOL(nodeselInitsolObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); /* call virtual method of nodesel object */ SCIP_CALL( nodeseldata->objnodesel->scip_initsol(scip, nodesel) ); return SCIP_OKAY; } /** solving process deinitialization method of node selector (called before branch and bound process data is freed) */ static SCIP_DECL_NODESELEXITSOL(nodeselExitsolObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); /* call virtual method of nodesel object */ SCIP_CALL( nodeseldata->objnodesel->scip_exitsol(scip, nodesel) ); return SCIP_OKAY; } /** node selection method of node selector */ static SCIP_DECL_NODESELSELECT(nodeselSelectObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); /* call virtual method of nodesel object */ SCIP_CALL( nodeseldata->objnodesel->scip_select(scip, nodesel, selnode) ); return SCIP_OKAY; } /** node comparison method of node selector */ static SCIP_DECL_NODESELCOMP(nodeselCompObj) { /*lint --e{715}*/ SCIP_NODESELDATA* nodeseldata; nodeseldata = SCIPnodeselGetData(nodesel); assert(nodeseldata != NULL); assert(nodeseldata->objnodesel != NULL); /* call virtual method of nodesel object */ return nodeseldata->objnodesel->scip_comp(scip, nodesel, node1, node2); } } /* * node selector specific interface methods */ /** creates the node selector for the given node selector object and includes it in SCIP */ SCIP_RETCODE SCIPincludeObjNodesel_MLDFS( SCIP* scip, /**< SCIP data structure */ scip::ObjNodesel* objnodesel, /**< node selector object */ SCIP_Bool deleteobject /**< should the node selector object be deleted when node selector is freed? */ ) { SCIP_NODESELDATA* nodeseldata; assert(scip != NULL); assert(objnodesel != NULL); /* create node selector data */ nodeseldata = new SCIP_NODESELDATA; nodeseldata->objnodesel = objnodesel; nodeseldata->deleteobject = deleteobject; /* include node selector */ SCIP_CALL( SCIPincludeNodesel(scip, objnodesel->scip_name_, objnodesel->scip_desc_, objnodesel->scip_stdpriority_, objnodesel->scip_memsavepriority_, nodeselCopyObj, nodeselFreeObj, nodeselInitObj, nodeselExitObj, nodeselInitsolObj, nodeselExitsolObj, nodeselSelectObj, nodeselCompObj, nodeseldata) ); /*lint !e429*/ return SCIP_OKAY; /*lint !e429*/ }
8,658
27.483553
124
cpp
PB-DFS
PB-DFS-master/src/nodesel_ml_dfs.hpp
#ifndef __NODESEL_ML_DFS___ #define __NODESEL_ML_DFS___ #include <scip/scip.h> #include <objscip/objscip.h> namespace COML{ class Nodesel_ML_DFS: public scip::ObjNodesel { public: /** default constructor */ Nodesel_ML_DFS( SCIP* scip, /**< SCIP data structure */ const char* name, /**< name of node selector */ const char* desc, /**< description of node selector */ int stdpriority, /**< priority of the node selector in standard mode */ int memsavepriority /**< priority of the node selector in memory saving mode */ ) : ObjNodesel (scip, name, desc, stdpriority, memsavepriority){}; SCIP_DECL_NODESELSELECT(scip_select) override; SCIP_DECL_NODESELCOMP(scip_comp) override; }; }; extern SCIP_RETCODE SCIPincludeObjNodesel_MLDFS( SCIP* scip, /**< SCIP data structure */ scip::ObjNodesel* objnodesel, /**< node selector object */ SCIP_Bool deleteobject /**< should the node selector object be deleted when node selector is freed? */ ); #endif
1,180
32.742857
124
hpp
PB-DFS
PB-DFS-master/src/preprocessor.cpp
#include "preprocessor.hpp" #include "global_config.hpp" #include <cmath> #include <limits> #include <assert.h> #include <set> #include <boost/algorithm/string.hpp> namespace COML { Preprocessor::Preprocessor() : predicted_real_value() {} void Preprocessor::load_prob_map_gcn(std::unordered_map<std::string, int>& mapper, int branching_policy ){ std::ifstream predicted_file("tmp.prob"); if (! predicted_file){ std::cout << "fail to read the predicted file \n" << std::endl; exit(-1); } std::string varname1; std::string varname2; double prob; int idx = 0; std::vector<std::string> result; while (predicted_file >> varname1 >> prob){ //edge-based symetric if (strcmp(gconf.prob_str.c_str(), "tsp") == 0 || strcmp(gconf.prob_str.c_str(), "vrp") == 0){ result.clear(); boost::split(result, varname1, boost::is_any_of("_")); varname2 = result[1] + "_" + result[0]; mapper[varname1] = idx; mapper[varname2] = idx; }else{ //node-based mapper[varname1] = idx; } predicted_real_value.push_back(prob); gconf.orderednames.push_back(varname1); idx++; } predicted_file.close(); } }
1,431
28.833333
109
cpp
PB-DFS
PB-DFS-master/src/preprocessor.hpp
#ifndef PREPROCESSOR_H #define PREPROCESSOR_H #include <random> #include <algorithm> #include <iterator> #include <iostream> #include <numeric> // std::iota #include <vector> #include <cstring> #include <string> #include <time.h> #include <sys/time.h> #include <iomanip> #include <unordered_map> namespace COML { class Preprocessor { public: std::vector<double> predicted_real_value; explicit Preprocessor(); void load_prob_map_gcn(std::unordered_map<std::string, int>& mapper, int branching_policy ); }; } #endif
561
17.733333
73
hpp
PB-DFS
PB-DFS-master/src/scip_exception.hpp
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the examples to */ /* An introduction to SCIP */ /* */ /* Copyright (C) 2007 Cornelius Schwarz */ /* */ /* 2007 University of Bayreuth */ /* */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /**@file scip_exception.hpp * @brief exception handling for SCIP * @author Cornelius Schwarz */ #ifndef SCIP_EXCEPTION #define SCIP_EXCEPTION #include<exception> #include<string> #include <scip/scip.h> #include <scip/misc.h> // unfortunately SCIP has no method to get the string of an error code, you can just print it to a file // so we add such a method here, this has to be updated when SCIP Messages changes // currently supporting SCIP-1.00 #define SCIP_MSG_MAX 100 ///< maximal number of characters in an error messages /** * @brief translates a SCIP_RETCODE into an error string * * @param[in] retcode SCIP_RETCODE you want to translate * @param[in] buffersize size of buffer * @param[out] buffer_str buffer to character array to store translated message, this must be at least of size SCIP_MSG_MAX * @return buffer_str or NULL, if retcode could not be translated */ inline char* SCIPgetErrorString(SCIP_RETCODE retcode, char* buffer_str, int buffersize) { // the following was copied from SCIPprintError switch(retcode) { case SCIP_OKAY: (void) SCIPsnprintf(buffer_str, buffersize, "normal termination"); return buffer_str; case SCIP_ERROR: (void) SCIPsnprintf(buffer_str, buffersize, "unspecified error"); return buffer_str; case SCIP_NOMEMORY: (void) SCIPsnprintf(buffer_str, buffersize, "insufficient memory error"); return buffer_str; case SCIP_READERROR: (void) SCIPsnprintf(buffer_str, buffersize, "file read error"); return buffer_str; case SCIP_WRITEERROR: (void) SCIPsnprintf(buffer_str, buffersize, "file write error"); return buffer_str; case SCIP_BRANCHERROR: (void) SCIPsnprintf(buffer_str, buffersize, "branch error"); return buffer_str; case SCIP_NOFILE: (void) SCIPsnprintf(buffer_str, buffersize, "file not found error"); return buffer_str; case SCIP_FILECREATEERROR: (void) SCIPsnprintf(buffer_str, buffersize, "cannot create file"); return buffer_str; case SCIP_LPERROR: (void) SCIPsnprintf(buffer_str, buffersize, "error in LP solver"); return buffer_str; case SCIP_NOPROBLEM: (void) SCIPsnprintf(buffer_str, buffersize, "no problem exists"); return buffer_str; case SCIP_INVALIDCALL: (void) SCIPsnprintf(buffer_str, buffersize, "method cannot be called at this time in solution process"); return buffer_str; case SCIP_INVALIDDATA: (void) SCIPsnprintf(buffer_str, buffersize, "method cannot be called with this type of data"); return buffer_str; case SCIP_INVALIDRESULT: (void) SCIPsnprintf(buffer_str, buffersize, "method returned an invalid result code"); return buffer_str; case SCIP_PLUGINNOTFOUND: (void) SCIPsnprintf(buffer_str, buffersize, "a required plugin was not found"); return buffer_str; case SCIP_PARAMETERUNKNOWN: (void) SCIPsnprintf(buffer_str, buffersize, "the parameter with the given name was not found"); return buffer_str; case SCIP_PARAMETERWRONGTYPE: (void) SCIPsnprintf(buffer_str, buffersize, "the parameter is not of the expected type"); return buffer_str; case SCIP_PARAMETERWRONGVAL: (void) SCIPsnprintf(buffer_str, buffersize, "the value is invalid for the given parameter"); return buffer_str; case SCIP_KEYALREADYEXISTING: (void) SCIPsnprintf(buffer_str, buffersize, "the given key is already existing in table"); return buffer_str; case SCIP_MAXDEPTHLEVEL: (void) SCIPsnprintf(buffer_str, buffersize, "maximal branching depth level exceeded"); return buffer_str; } return NULL; } /** @brief exception handling class for SCIP * * this class enables you to handle the return code of SCIP functions in a C++ way */ class SCIPException : public std::exception { private: char _msg[SCIP_MSG_MAX]; ///< error message SCIP_RETCODE _retcode; ///< SCIP error code public: /** @brief constructs a SCIPEexception from an error code * * this constructs a new SCIPException from given error code * @param[in] retcode SCIP error code */ SCIPException(SCIP_RETCODE retcode) : _retcode(retcode) { if( SCIPgetErrorString(retcode, _msg, SCIP_MSG_MAX) == NULL ) (void) SCIPsnprintf(_msg, SCIP_MSG_MAX, "unknown SCIP retcode %d",retcode); } /** @brief returns the error message * * @return error message * * this overrides the corresponding method of std::exception in order to allow you to catch all of your exceptions as std::exception */ const char * what(void)const throw() {return _msg;} /** @brief get method for @p _retcode * * @return stored SCIP_RETCODE */ SCIP_RETCODE getRetcode(void)const{return _retcode;} /** destructor */ ~SCIPException(void) throw(){} }; /*lint !e1712*/ /** @brief macro to call scip function with exception handling * * this macro calls a SCIP function and throws an instance of SCIPException if anything went wrong * */ #define SCIP_CALL_EXC(x) \ { \ SCIP_RETCODE retcode; \ if( (retcode = (x)) != SCIP_OKAY) \ { \ throw SCIPException(retcode); \ } \ } #endif
6,106
35.568862
135
hpp
PB-DFS
PB-DFS-master/src/scip_solver.cpp
#include <string> #include <algorithm> #include <utility> #include <iomanip> #include <iostream> #include <fstream> #include <cmath> #include <stdio.h> #include <scip/debug.h> #include <scip/struct_scip.h> #include <scip/type_scip.h> #include <scip/type_primal.h> #include <scip/struct_primal.h> #include <scip/type_stat.h> #include <scip/struct_stat.h> #include <scip/set.h> #include <scip/struct_sol.h> #include <scip/struct_misc.h> #include <scip/type_sol.h> #include <scip/type_misc.h> #include <scip/type_retcode.h> #include <scip/pub_message.h> #include <boost/algorithm/string.hpp> #include "scip_solver.hpp" #include "scip_exception.hpp" #include "global_config.hpp" #include "utils.hpp" #include "branching_policy.hpp" #include "heur_ml_subscip.hpp" static SCIP_RETCODE includeSCIPotherPlugins( SCIP* scip /**< SCIP data structure */ ); static SCIP_RETCODE includeSCIPheuristicsDoRequireFeasibleSol( SCIP* scip /**< SCIP data structure */ ); static SCIP_RETCODE includeSCIPheuristicsDoNotRequireFeasibleSol( SCIP* scip /**< SCIP data structure */ ); // for data collection COML::SCIP_Solver::SCIP_Solver() : scip(NULL), nodesel_policy(NULL), branching_policy(NULL) { std::string prob_name = gconf.DATA_BASE_DIR + gconf.cur_prob + ".lp"; gconf.prob_lp_path = prob_name; // initialize scip SCIP_CALL_EXC(SCIPcreate(&scip)); assert(scip!=NULL); branching_policy = new COML::Branching( scip, "db", "", 1000000, -1, 1); COML::SCIPincludeObjBranchrule_DB(scip, branching_policy, false); includeSCIPotherPlugins(scip); if (gconf.policy == Policy::ML_DFS_HEUR_SCORE1_GCN || gconf.policy == Policy::ML_DFS_HEUR_SCORE2_GCN || gconf.policy == Policy::ML_DFS_HEUR_SCORE1_LR || gconf.policy == Policy::ML_DFS_HEUR_SCORE2_LR) { SCIPincludeHeurMLdfs(scip); }else if (gconf.policy == Policy::ML_DFS_EXACT_SCORE1_GCN || gconf.policy == Policy::ML_DFS_EXACT_SCORE2_GCN || gconf.policy == Policy::ML_DFS_EXACT_SCORE3_GCN) { nodesel_policy = new COML::Nodesel_ML_DFS(scip, "", "", 66666667, 66666667); SCIPincludeObjNodesel_MLDFS(scip, nodesel_policy, false); SCIPsetHeuristics(scip, SCIP_PARAMSETTING_OFF, TRUE); } else if (gconf.policy == Policy::SCIP_AGG || gconf.policy == Policy::SCIP_DEF) { includeSCIPheuristicsDoNotRequireFeasibleSol(scip); includeSCIPheuristicsDoRequireFeasibleSol(scip); if (gconf.policy == Policy::SCIP_AGG) { SCIPsetHeuristics(scip, SCIP_PARAMSETTING_AGGRESSIVE, TRUE); } } else if (gconf.policy == Policy::SCIP_DEF_PBDFS) { includeSCIPheuristicsDoNotRequireFeasibleSol(scip); includeSCIPheuristicsDoRequireFeasibleSol(scip); SCIPincludeHeurMLdfs(scip); } else { if (gconf.policy == Policy::SCIP_HEUR_ALL_DIVING) { SCIPincludeHeurCoefdiving(scip); SCIPincludeHeurDistributiondiving(scip); SCIPincludeHeurFracdiving(scip); SCIPincludeHeurIntdiving(scip); SCIPincludeHeurLinesearchdiving(scip); SCIPincludeHeurNlpdiving(scip); SCIPincludeHeurObjpscostdiving(scip); SCIPincludeHeurPscostdiving(scip); SCIPincludeHeurRootsoldiving(scip); SCIPincludeHeurVeclendiving(scip); SCIPincludeHeurOctane(scip); SCIPincludeHeurConflictdiving(scip); SCIPincludeHeurFarkasdiving(scip); SCIPincludeHeurActconsdiving(scip); SCIPincludeHeurGuideddiving(scip); } else if (gconf.policy == Policy::SCIP_HEUR_ALL_ROUNDING) { SCIPincludeHeurIntshifting(scip); SCIPincludeHeurRounding(scip); SCIPincludeHeurRandrounding(scip); SCIPincludeHeurSimplerounding(scip); SCIPincludeHeurRounding(scip); SCIPincludeHeurZirounding(scip); SCIPincludeHeurShiftandpropagate(scip); SCIPincludeHeurShifting(scip); } else if (gconf.policy == Policy::SCIP_HEUR_FEASPUMP) SCIPincludeHeurFeaspump(scip); // SCIP_HEURTIMING_AFTERLPPLUNGE freq 20 else if (gconf.policy == Policy::SCIP_HEUR_RENS) SCIPincludeHeurRens(scip); // SCIP_HEURTIMING_AFTERLPNODE freq 0 else if (gconf.policy != Policy::ML_DING) throw std::runtime_error("unrecognized policy in scip_solver!\n"); } // disable scip output to stdout SCIPmessagehdlrSetQuiet(SCIPgetMessagehdlr(scip), TRUE); scip_set_params(); printf("\nread problem from %s\n", prob_name.c_str()); SCIPreadProb(scip, prob_name.c_str(), NULL); } /* destructor */ COML::SCIP_Solver::~SCIP_Solver(void) { if (scip != NULL) { SCIP_CALL_EXC(SCIPfree(&scip)); scip = NULL; } if (branching_policy != NULL) { delete branching_policy; branching_policy = NULL; } if (nodesel_policy != NULL) { delete nodesel_policy; nodesel_policy = NULL; } } void COML::SCIP_Solver::scip_set_params() { /** some important scip parameters: -1 means unlimited, 0 means disabled ------------------------------------------------------------------------ */ // time limit SCIPsetRealParam(scip, "limits/time", gconf.cutoff); SCIPsetIntParam(scip, "display/verblevel", 5); SCIPsetIntParam(scip, "timing/clocktype", 2); // random seed to break ties SCIPsetBoolParam(scip, "randomization/permutevars", TRUE); SCIPsetIntParam(scip, "randomization/permutationseed", gconf.seed); SCIPsetIntParam(scip, "randomization/randomseedshift", gconf.seed); SCIPsetIntParam(scip, "presolving/maxrestarts", 0); if (gconf.cutoff <= 100) { SCIPsetIntParam(scip, "separating/maxrounds", 0); SCIPsetIntParam(scip, "separating/maxroundsroot", 0); } // SCIPsetIntParam(scip, "presolving/maxrounds", 0); } /* display the solving statistics */ double COML::SCIP_Solver::finalize() { printf("nnodes left in finalize: %d\n", SCIPgetNNodesLeft(scip)); double solving_time = std::round(SCIPgetSolvingTime(scip)); long long num_nodes = SCIPgetNNodes(scip); long long num_internal_nodes = scip->stat->ninternalnodes; long long num_lps_sb = SCIPgetNStrongbranchLPIterations(scip); long long num_lps_relax = SCIPgetNNodeLPIterations(scip); double dual_bound = SCIPgetDualbound(scip); //|(primalbound - dualbound)/min(|primalbound|,|dualbound|)| double opt_gap = abs((SCIPgetPrimalbound(scip) - SCIPgetDualbound(scip))/(SCIPgetPrimalbound(scip) + SCIPsetEpsilon(scip->set))); std::string status; SCIP_STATUS _status = SCIPgetStatus(scip); if (_status == SCIP_STATUS_OPTIMAL || _status == SCIP_STATUS_INFEASIBLE || _status == SCIP_STATUS_UNBOUNDED || _status == SCIP_STATUS_INFORUNBD) status = "solved"; else status = "unsolved"; double best_sol_obj = -1; double best_sol_time = -1; /** * write primal bound plot */ int i; std::vector<std::string> result; boost::split(result, gconf.cur_prob, boost::is_any_of("/")); COML::create_dir(gconf.LOG_DIR + result[0]); std::string tmp = gconf.LOG_DIR + gconf.cur_prob + ".primal_plot"; std::ofstream fsol_logger(tmp); fsol_logger << gconf.objs.size() << "\n"; printf("write primal curve to %s\n", tmp.c_str()); for (i = 0; i < gconf.objs.size(); i++) fsol_logger << gconf.time[i] << " "; fsol_logger << "\n"; for (i = 0; i < gconf.objs.size(); i++) fsol_logger << gconf.objs[i] << " "; fsol_logger.flush(); fsol_logger.close(); /** * write dual bound plot */ tmp = gconf.LOG_DIR + gconf.cur_prob + ".dual_plot"; printf("write dual curve to %s\n", tmp.c_str()); std::ofstream fdual_logger(tmp); fdual_logger << gconf.dual_bounds.size() << "\n"; for (i = 0; i < gconf.dual_bounds.size(); i++) fdual_logger << gconf.dual_time[i] << " "; fdual_logger << "\n"; for (i = 0; i < gconf.dual_bounds.size(); i++) fdual_logger << gconf.dual_bounds[i] << " "; fdual_logger.flush(); fdual_logger.close(); /** * write gap plot */ tmp = gconf.LOG_DIR + gconf.cur_prob + ".gap_plot"; printf("write optgap curve to %s\n", tmp.c_str()); std::ofstream gap_logger(tmp); gap_logger << gconf.gaps.size() << "\n"; for (i = 0; i < gconf.gaps.size(); i++) gap_logger << gconf.gap_time[i] << " "; gap_logger << "\n"; for (i = 0; i < gconf.gaps.size(); i++) gap_logger << gconf.gaps[i] << " "; gap_logger.flush(); gap_logger.close(); /** * heuristic stats */ tmp = gconf.LOG_DIR + gconf.cur_prob + ".heur_stats"; std::ofstream heur_logger(tmp); SCIP_HEUR** heuristics = SCIPgetHeurs(scip); int nheuristics = SCIPgetNHeurs(scip); SCIP_HEUR* heuristic = NULL; heur_logger << "name,nbestsol,nsol,ncalls,time\n"; for (i = 0; i < nheuristics; i++) { heuristic = heuristics[i]; heur_logger << SCIPheurGetName(heuristic) << ","; heur_logger << SCIPheurGetNBestSolsFound(heuristic) << ","; heur_logger << SCIPheurGetNSolsFound(heuristic) << ","; heur_logger << SCIPheurGetNCalls(heuristic) << ","; heur_logger << SCIPheurGetTime(heuristic) << "\n"; } heur_logger.flush(); heur_logger.close(); SCIP_SOL* best_solution = SCIPgetBestSol(scip); SCIP_HEUR* best_sol_heur = NULL; std::string best_sol_heur_name; if (best_solution != NULL) { best_sol_obj = SCIPgetSolOrigObj(scip, best_solution); best_sol_time = SCIPgetSolTime(scip, best_solution); best_sol_heur = SCIPgetSolHeur(scip, best_solution); if (best_sol_heur != NULL) best_sol_heur_name = SCIPheurGetName(best_sol_heur); else best_sol_heur_name = "none"; } double first_sol_time = gconf.time.size() == 0 ? -1 : gconf.time[0]; double first_sol_obj = gconf.objs.size() == 0 ? -1 : gconf.objs[0]; printf("status:%s,opt_gap:%f,best_sol_obj:%f,best_sol_time:%f,best_sol_heur:%s,first_sol_obj:%f,first_sol_time:%f,first_sol_heur:%s,global_dual_bound:%f\n", status.c_str(), opt_gap, best_sol_obj, best_sol_time, best_sol_heur_name.c_str(), first_sol_obj, first_sol_time, gconf.first_sol_heur.c_str(), dual_bound); int totalcalls = 0; double heuristic_total_time = 0.; for (i = 0; i < nheuristics; i++) { heuristic = heuristics[i]; totalcalls += SCIPheurGetNCalls(heuristic); heuristic_total_time += SCIPheurGetTime(heuristic); } int nsols = SCIPgetNSols(scip); SCIP_SOL** sols = SCIPgetSols(scip); SCIP_HEUR* h; double best_heur_sol_time = 0.; double best_heur_sol_obj = 0.; double obj; for (i = 0; i < nsols; i++) { h = SCIPsolGetHeur(sols[i]); obj = SCIPgetSolOrigObj(scip, sols[i]); if (h!=NULL) { if (best_heur_sol_obj==0.) { best_heur_sol_obj = obj; best_heur_sol_time = SCIPsolGetTime(sols[i]); } else if ( (gconf.optimization_type == Optimization_Type::Maximization && obj > best_heur_sol_obj + SCIPsetEpsilon(scip->set)) || (gconf.optimization_type == Optimization_Type::Minimization && obj < best_heur_sol_obj - SCIPsetEpsilon(scip->set)) ) { best_heur_sol_obj = obj; best_heur_sol_time = SCIPsolGetTime(sols[i]); } } } // instance_id,status,opt_gap, // best_sol_obj,best_sol_time,best_sol_heur, // best_heur_sol_obj,best_heur_sol_time, // heur_ncalls,heur_tot_time (*gconf.solving_stats_logger) << gconf.cur_prob << "," << status << "," << opt_gap << "," << best_sol_obj << "," << best_sol_time << "," << best_sol_heur_name << "," << best_heur_sol_obj << "," << best_heur_sol_time << "," << totalcalls << "," << heuristic_total_time << "\n"; (*gconf.solving_stats_logger).flush(); return best_sol_obj; } void COML::SCIP_Solver::solve(void) { // this tells scip to start the solution process SCIP_CALL_EXC(SCIPsolve(scip)); } static SCIP_RETCODE includeSCIPheuristicsDoNotRequireFeasibleSol( SCIP* scip /**< SCIP data structure */ ) { // heuristics do not require a feasible solution SCIP_CALL( SCIPincludeHeurCoefdiving(scip) ); SCIP_CALL( SCIPincludeHeurDistributiondiving(scip) ); SCIP_CALL( SCIPincludeHeurFracdiving(scip) ); SCIP_CALL( SCIPincludeHeurIntdiving(scip) ); SCIP_CALL( SCIPincludeHeurLinesearchdiving(scip) ); SCIP_CALL( SCIPincludeHeurNlpdiving(scip) ); SCIP_CALL( SCIPincludeHeurObjpscostdiving(scip) ); SCIP_CALL( SCIPincludeHeurPscostdiving(scip) ); SCIP_CALL( SCIPincludeHeurRootsoldiving(scip) ); SCIP_CALL( SCIPincludeHeurVeclendiving(scip) ); SCIP_CALL( SCIPincludeHeurOctane(scip) ); SCIP_CALL( SCIPincludeHeurFeaspump(scip) ); SCIP_CALL( SCIPincludeHeurRens(scip) ); SCIP_CALL( SCIPincludeHeurIntshifting(scip) ); SCIP_CALL( SCIPincludeHeurActconsdiving(scip) ); SCIP_CALL( SCIPincludeHeurRandrounding(scip) ); SCIP_CALL( SCIPincludeHeurSimplerounding(scip) ); SCIP_CALL( SCIPincludeHeurRounding(scip) ); SCIP_CALL( SCIPincludeHeurZirounding(scip) ); SCIP_CALL( SCIPincludeHeurShiftandpropagate(scip) ); SCIP_CALL( SCIPincludeHeurShifting(scip) ); SCIP_CALL( SCIPincludeHeurConflictdiving(scip) ); SCIP_CALL( SCIPincludeHeurFarkasdiving(scip) ); } static SCIP_RETCODE includeSCIPheuristicsDoRequireFeasibleSol( SCIP* scip /**< SCIP data structure */ ) { // heuristics do require a feasible solution SCIP_CALL( SCIPincludeHeurGuideddiving(scip) ); SCIP_CALL( SCIPincludeHeurBound(scip) ); SCIP_CALL( SCIPincludeHeurClique(scip) ); SCIP_CALL( SCIPincludeHeurCompletesol(scip) ); SCIP_CALL( SCIPincludeHeurCrossover(scip) ); SCIP_CALL( SCIPincludeHeurDins(scip) ); SCIP_CALL( SCIPincludeHeurDualval(scip) ); SCIP_CALL( SCIPincludeHeurFixandinfer(scip) ); SCIP_CALL( SCIPincludeHeurGins(scip) ); SCIP_CALL( SCIPincludeHeurZeroobj(scip) ); SCIP_CALL( SCIPincludeHeurIndicator(scip) ); SCIP_CALL( SCIPincludeHeurLocalbranching(scip) ); SCIP_CALL( SCIPincludeHeurLocks(scip) ); SCIP_CALL( SCIPincludeHeurLpface(scip) ); SCIP_CALL( SCIPincludeHeurAlns(scip) ); SCIP_CALL( SCIPincludeHeurMutation(scip) ); SCIP_CALL( SCIPincludeHeurMultistart(scip) ); SCIP_CALL( SCIPincludeHeurMpec(scip) ); SCIP_CALL( SCIPincludeHeurOfins(scip) ); SCIP_CALL( SCIPincludeHeurOneopt(scip) ); SCIP_CALL( SCIPincludeHeurProximity(scip) ); SCIP_CALL( SCIPincludeHeurReoptsols(scip) ); SCIP_CALL( SCIPincludeHeurRepair(scip) ); SCIP_CALL( SCIPincludeHeurRins(scip) ); SCIP_CALL( SCIPincludeHeurSubNlp(scip) ); SCIP_CALL( SCIPincludeHeurTrivial(scip) ); SCIP_CALL( SCIPincludeHeurTrivialnegation(scip) ); SCIP_CALL( SCIPincludeHeurTrySol(scip) ); SCIP_CALL( SCIPincludeHeurTwoopt(scip) ); SCIP_CALL( SCIPincludeHeurUndercover(scip) ); SCIP_CALL( SCIPincludeHeurVbounds(scip) ); } static SCIP_RETCODE includeSCIPotherPlugins( SCIP* scip /**< SCIP data structure */ ) { SCIP_CALL( SCIPincludeConshdlrNonlinear(scip) ); /* nonlinear must be before linear, quadratic, abspower, and and due to constraint upgrading */ SCIP_CALL( SCIPincludeConshdlrQuadratic(scip) ); /* quadratic must be before linear due to constraint upgrading */ SCIP_CALL( SCIPincludeConshdlrLinear(scip) ); /* linear must be before its specializations due to constraint upgrading */ SCIP_CALL( SCIPincludeConshdlrAbspower(scip) ); /* absolute power needs to be after quadratic and nonlinear due to constraint upgrading */ SCIP_CALL( SCIPincludeConshdlrAnd(scip) ); SCIP_CALL( SCIPincludeConshdlrBenders(scip) ); SCIP_CALL( SCIPincludeConshdlrBenderslp(scip) ); SCIP_CALL( SCIPincludeConshdlrBivariate(scip) ); /* bivariate needs to be after quadratic and nonlinear due to constraint upgrading */ SCIP_CALL( SCIPincludeConshdlrBounddisjunction(scip) ); SCIP_CALL( SCIPincludeConshdlrCardinality(scip) ); SCIP_CALL( SCIPincludeConshdlrConjunction(scip) ); SCIP_CALL( SCIPincludeConshdlrCountsols(scip) ); SCIP_CALL( SCIPincludeConshdlrCumulative(scip) ); SCIP_CALL( SCIPincludeConshdlrDisjunction(scip) ); SCIP_CALL( SCIPincludeConshdlrIndicator(scip) ); SCIP_CALL( SCIPincludeConshdlrIntegral(scip) ); SCIP_CALL( SCIPincludeConshdlrKnapsack(scip) ); SCIP_CALL( SCIPincludeConshdlrLinking(scip) ); SCIP_CALL( SCIPincludeConshdlrLogicor(scip) ); SCIP_CALL( SCIPincludeConshdlrOr(scip) ); SCIP_CALL( SCIPincludeConshdlrOrbisack(scip) ); SCIP_CALL( SCIPincludeConshdlrOrbitope(scip) ); SCIP_CALL( SCIPincludeConshdlrPseudoboolean(scip) ); SCIP_CALL( SCIPincludeConshdlrSetppc(scip) ); SCIP_CALL( SCIPincludeConshdlrSOC(scip) ); /* SOC needs to be after quadratic due to constraint upgrading */ SCIP_CALL( SCIPincludeConshdlrSOS1(scip) ); SCIP_CALL( SCIPincludeConshdlrSOS2(scip) ); SCIP_CALL( SCIPincludeConshdlrSuperindicator(scip) ); SCIP_CALL( SCIPincludeConshdlrSymresack(scip) ); SCIP_CALL( SCIPincludeConshdlrVarbound(scip) ); SCIP_CALL( SCIPincludeConshdlrXor(scip) ); SCIP_CALL( SCIPincludeConshdlrComponents(scip) ); SCIP_CALL( SCIPincludeReaderBnd(scip) ); SCIP_CALL( SCIPincludeReaderCcg(scip) ); SCIP_CALL( SCIPincludeReaderCip(scip) ); SCIP_CALL( SCIPincludeReaderCnf(scip) ); SCIP_CALL( SCIPincludeReaderCor(scip) ); SCIP_CALL( SCIPincludeReaderDiff(scip) ); SCIP_CALL( SCIPincludeReaderFix(scip) ); SCIP_CALL( SCIPincludeReaderFzn(scip) ); SCIP_CALL( SCIPincludeReaderGms(scip) ); SCIP_CALL( SCIPincludeReaderLp(scip) ); SCIP_CALL( SCIPincludeReaderMps(scip) ); SCIP_CALL( SCIPincludeReaderMst(scip) ); SCIP_CALL( SCIPincludeReaderOpb(scip) ); SCIP_CALL( SCIPincludeReaderOsil(scip) ); SCIP_CALL( SCIPincludeReaderPip(scip) ); SCIP_CALL( SCIPincludeReaderPpm(scip) ); SCIP_CALL( SCIPincludeReaderPbm(scip) ); SCIP_CALL( SCIPincludeReaderRlp(scip) ); SCIP_CALL( SCIPincludeReaderSmps(scip) ); SCIP_CALL( SCIPincludeReaderSol(scip) ); SCIP_CALL( SCIPincludeReaderSto(scip) ); SCIP_CALL( SCIPincludeReaderTim(scip) ); SCIP_CALL( SCIPincludeReaderWbo(scip) ); SCIP_CALL( SCIPincludeReaderZpl(scip) ); SCIP_CALL( SCIPincludePresolBoundshift(scip) ); SCIP_CALL( SCIPincludePresolConvertinttobin(scip) ); SCIP_CALL( SCIPincludePresolDomcol(scip) ); SCIP_CALL( SCIPincludePresolDualagg(scip) ); SCIP_CALL( SCIPincludePresolDualcomp(scip) ); SCIP_CALL( SCIPincludePresolDualinfer(scip) ); SCIP_CALL( SCIPincludePresolGateextraction(scip) ); SCIP_CALL( SCIPincludePresolImplics(scip) ); SCIP_CALL( SCIPincludePresolInttobinary(scip) ); SCIP_CALL( SCIPincludePresolQPKKTref(scip) ); SCIP_CALL( SCIPincludePresolRedvub(scip) ); SCIP_CALL( SCIPincludePresolTrivial(scip) ); SCIP_CALL( SCIPincludePresolTworowbnd(scip) ); SCIP_CALL( SCIPincludePresolSparsify(scip) ); SCIP_CALL( SCIPincludePresolStuffing(scip) ); // SCIP_CALL( SCIPincludePresolSymmetry(scip) ); // SCIP_CALL( SCIPincludePresolSymbreak(scip) ); /* needs to be included after presol_symmetry */ SCIP_CALL( SCIPincludeNodeselBfs(scip) ); SCIP_CALL( SCIPincludeNodeselBreadthfirst(scip) ); SCIP_CALL( SCIPincludeNodeselDfs(scip) ); SCIP_CALL( SCIPincludeNodeselEstimate(scip) ); SCIP_CALL( SCIPincludeNodeselHybridestim(scip) ); SCIP_CALL( SCIPincludeNodeselRestartdfs(scip) ); SCIP_CALL( SCIPincludeNodeselUct(scip) ); SCIP_CALL( SCIPincludeBranchruleAllfullstrong(scip) ); SCIP_CALL( SCIPincludeBranchruleCloud(scip) ); SCIP_CALL( SCIPincludeBranchruleDistribution(scip) ); SCIP_CALL( SCIPincludeBranchruleFullstrong(scip) ); SCIP_CALL( SCIPincludeBranchruleInference(scip) ); SCIP_CALL( SCIPincludeBranchruleLeastinf(scip) ); SCIP_CALL( SCIPincludeBranchruleLookahead(scip) ); SCIP_CALL( SCIPincludeBranchruleMostinf(scip) ); SCIP_CALL( SCIPincludeBranchruleMultAggr(scip) ); SCIP_CALL( SCIPincludeBranchruleNodereopt(scip) ); SCIP_CALL( SCIPincludeBranchrulePscost(scip) ); SCIP_CALL( SCIPincludeBranchruleRandom(scip) ); SCIP_CALL( SCIPincludeBranchruleRelpscost(scip) ); SCIP_CALL( SCIPincludeEventHdlrSolvingphase(scip) ); SCIP_CALL( SCIPincludeComprLargestrepr(scip) ); SCIP_CALL( SCIPincludeComprWeakcompr(scip) ); SCIP_CALL( SCIPincludePropDualfix(scip) ); SCIP_CALL( SCIPincludePropGenvbounds(scip) ); SCIP_CALL( SCIPincludePropObbt(scip) ); // SCIP_CALL( SCIPincludePropOrbitalfixing(scip) ); SCIP_CALL( SCIPincludePropNlobbt(scip) ); SCIP_CALL( SCIPincludePropProbing(scip) ); SCIP_CALL( SCIPincludePropPseudoobj(scip) ); SCIP_CALL( SCIPincludePropRedcost(scip) ); SCIP_CALL( SCIPincludePropRootredcost(scip) ); SCIP_CALL( SCIPincludePropVbounds(scip) ); SCIP_CALL( SCIPincludeSepaCGMIP(scip) ); SCIP_CALL( SCIPincludeSepaClique(scip) ); SCIP_CALL( SCIPincludeSepaClosecuts(scip) ); SCIP_CALL( SCIPincludeSepaAggregation(scip) ); SCIP_CALL( SCIPincludeSepaConvexproj(scip) ); SCIP_CALL( SCIPincludeSepaDisjunctive(scip) ); SCIP_CALL( SCIPincludeSepaEccuts(scip) ); SCIP_CALL( SCIPincludeSepaGauge(scip) ); SCIP_CALL( SCIPincludeSepaGomory(scip) ); SCIP_CALL( SCIPincludeSepaImpliedbounds(scip) ); SCIP_CALL( SCIPincludeSepaIntobj(scip) ); SCIP_CALL( SCIPincludeSepaMcf(scip) ); SCIP_CALL( SCIPincludeSepaOddcycle(scip) ); SCIP_CALL( SCIPincludeSepaRapidlearning(scip) ); SCIP_CALL( SCIPincludeSepaStrongcg(scip) ); SCIP_CALL( SCIPincludeSepaZerohalf(scip) ); SCIP_CALL( SCIPincludeDispDefault(scip) ); SCIP_CALL( SCIPincludeTableDefault(scip) ); // SCIP_CALL( SCIPincludeEventHdlrSofttimelimit(scip) ); SCIP_CALL( SCIPincludeConcurrentScipSolvers(scip) ); SCIP_CALL( SCIPincludeBendersDefault(scip) ); }
22,195
37.601739
167
cpp
PB-DFS
PB-DFS-master/src/scip_solver.hpp
#ifndef SOLVER #define SOLVER #include <vector> #include <iostream> #include <scip/scip.h> #include <vector> #include "fstream" // headers of various plugins #include "scip/branch_allfullstrong.h" #include "scip/branch_cloud.h" #include "scip/branch_distribution.h" #include "scip/branch_fullstrong.h" #include "scip/branch_inference.h" #include "scip/branch_leastinf.h" #include "scip/branch_lookahead.h" #include "scip/branch_mostinf.h" #include "scip/branch_multaggr.h" #include "scip/branch_nodereopt.h" #include "scip/branch_pscost.h" #include "scip/branch_random.h" #include "scip/branch_relpscost.h" #include "scip/compr_largestrepr.h" #include "scip/compr_weakcompr.h" #include "scip/cons_abspower.h" #include "scip/cons_and.h" #include "scip/cons_benders.h" #include "scip/cons_benderslp.h" #include "scip/cons_bivariate.h" #include "scip/cons_bounddisjunction.h" #include "scip/cons_cardinality.h" #include "scip/cons_conjunction.h" #include "scip/cons_countsols.h" #include "scip/cons_cumulative.h" #include "scip/cons_disjunction.h" #include "scip/cons_indicator.h" #include "scip/cons_integral.h" #include "scip/cons_knapsack.h" #include "scip/cons_linear.h" #include "scip/cons_linking.h" #include "scip/cons_logicor.h" #include "scip/cons_nonlinear.h" #include "scip/cons_or.h" #include "scip/cons_orbisack.h" #include "scip/cons_orbitope.h" #include "scip/cons_pseudoboolean.h" #include "scip/cons_quadratic.h" #include "scip/cons_setppc.h" #include "scip/cons_soc.h" #include "scip/cons_sos1.h" #include "scip/cons_sos2.h" #include "scip/cons_superindicator.h" #include "scip/cons_symresack.h" #include "scip/cons_varbound.h" #include "scip/cons_xor.h" #include "scip/cons_components.h" #include "scip/disp_default.h" #include "scip/event_solvingphase.h" #include "scip/event_softtimelimit.h" #include "scip/heur_actconsdiving.h" #include "scip/heur_bound.h" #include "scip/heur_clique.h" #include "scip/heur_coefdiving.h" #include "scip/heur_completesol.h" #include "scip/heur_conflictdiving.h" #include "scip/heur_crossover.h" #include "scip/heur_dins.h" #include "scip/heur_distributiondiving.h" #include "scip/heur_dualval.h" #include "scip/heur_farkasdiving.h" #include "scip/heur_feaspump.h" #include "scip/heur_fixandinfer.h" #include "scip/heur_fracdiving.h" #include "scip/heur_gins.h" #include "scip/heur_guideddiving.h" #include "scip/heur_indicator.h" #include "scip/heur_intdiving.h" #include "scip/heur_intshifting.h" #include "scip/heur_linesearchdiving.h" #include "scip/heur_localbranching.h" #include "scip/heur_locks.h" #include "scip/heur_lpface.h" #include "scip/heur_alns.h" #include "scip/heur_multistart.h" #include "scip/heur_mutation.h" #include "scip/heur_mpec.h" #include "scip/heur_nlpdiving.h" #include "scip/heur_objpscostdiving.h" #include "scip/heur_octane.h" #include "scip/heur_ofins.h" #include "scip/heur_oneopt.h" #include "scip/heur_pscostdiving.h" #include "scip/heur_proximity.h" #include "scip/heur_randrounding.h" #include "scip/heur_rens.h" #include "scip/heur_reoptsols.h" #include "scip/heur_repair.h" #include "scip/heur_rins.h" #include "scip/heur_rootsoldiving.h" #include "scip/heur_rounding.h" #include "scip/heur_shiftandpropagate.h" #include "scip/heur_shifting.h" #include "scip/heur_simplerounding.h" #include "scip/heur_subnlp.h" #include "scip/heur_trivial.h" #include "scip/heur_trivialnegation.h" #include "scip/heur_trysol.h" #include "scip/heur_twoopt.h" #include "scip/heur_undercover.h" #include "scip/heur_vbounds.h" #include "scip/heur_veclendiving.h" #include "scip/heur_zeroobj.h" #include "scip/heur_zirounding.h" #include "scip/nodesel_bfs.h" #include "scip/nodesel_breadthfirst.h" #include "scip/nodesel_dfs.h" #include "scip/nodesel_estimate.h" #include "scip/nodesel_hybridestim.h" #include "scip/nodesel_uct.h" #include "scip/nodesel_restartdfs.h" #include "scip/presol_boundshift.h" #include "scip/presol_convertinttobin.h" #include "scip/presol_domcol.h" #include "scip/presol_dualagg.h" #include "scip/presol_dualcomp.h" #include "scip/presol_dualinfer.h" #include "scip/presol_gateextraction.h" #include "scip/presol_implics.h" #include "scip/presol_inttobinary.h" #include "scip/presol_redvub.h" #include "scip/presol_qpkktref.h" #include "scip/presol_trivial.h" #include "scip/presol_tworowbnd.h" #include "scip/presol_sparsify.h" #include "scip/presol_stuffing.h" #include "scip/prop_dualfix.h" #include "scip/prop_genvbounds.h" #include "scip/prop_nlobbt.h" #include "scip/prop_obbt.h" #include "scip/prop_probing.h" #include "scip/prop_pseudoobj.h" #include "scip/prop_redcost.h" #include "scip/prop_rootredcost.h" #include "scip/prop_vbounds.h" #include "scip/reader_bnd.h" #include "scip/reader_ccg.h" #include "scip/reader_cip.h" #include "scip/reader_cnf.h" #include "scip/reader_cor.h" #include "scip/reader_diff.h" #include "scip/reader_fix.h" #include "scip/reader_fzn.h" #include "scip/reader_gms.h" #include "scip/reader_lp.h" #include "scip/reader_mps.h" #include "scip/reader_mst.h" #include "scip/reader_opb.h" #include "scip/reader_osil.h" #include "scip/reader_pip.h" #include "scip/reader_ppm.h" #include "scip/reader_pbm.h" #include "scip/reader_rlp.h" #include "scip/reader_smps.h" #include "scip/reader_sol.h" #include "scip/reader_sto.h" #include "scip/reader_tim.h" #include "scip/reader_wbo.h" #include "scip/reader_zpl.h" #include "scip/sepa_eccuts.h" #include "scip/sepa_cgmip.h" #include "scip/sepa_clique.h" #include "scip/sepa_closecuts.h" #include "scip/sepa_aggregation.h" #include "scip/sepa_convexproj.h" #include "scip/sepa_disjunctive.h" #include "scip/sepa_gauge.h" #include "scip/sepa_gomory.h" #include "scip/sepa_impliedbounds.h" #include "scip/sepa_intobj.h" #include "scip/sepa_mcf.h" #include "scip/sepa_oddcycle.h" #include "scip/sepa_rapidlearning.h" #include "scip/sepa_strongcg.h" #include "scip/sepa_zerohalf.h" #include "scip/scipshell.h" #include "scip/table_default.h" #include "scip/concsolver_scip.h" #include "scip/benders_default.h" #include <objscip/objscip.h> #include "nodesel_ml_dfs.hpp" namespace COML{ class SCIP_Solver { private: scip::ObjBranchrule* branching_policy; SCIP* scip; COML::Nodesel_ML_DFS* nodesel_policy; void scip_set_params(); public: SCIP_Solver(); ~SCIP_Solver(); void solve(); double finalize(); }; } #endif
6,362
28.733645
44
hpp
PB-DFS
PB-DFS-master/src/stats.cpp
#include "preprocessor.hpp" #include <iostream> #include <time.h> #include <sys/time.h> #include "global_config.hpp" #include "scip_solver.hpp" #include "scip/scip.h" #include "scip/scipdefplugins.h" void solve(std::string path) { } int main0(int argc, char* argv[]) { using namespace COML; const char * _homedir; if ((_homedir = getenv("HOME")) == NULL) _homedir = getpwuid(getuid())->pw_dir; std::string home_dir = _homedir; std::string prob = "ca"; std::string data_dir = home_dir + "/storage1/instances/" + prob + "/"; std::string lp_path; double nnzs; int nvars; int ncons; double frac; int nvars_max; int nvars_min; int ncons_max; int ncons_min; double frac_max; double frac_min; // mis problem nvars_max = -1; nvars_min = 1000000000; ncons_max = -1; ncons_min = 1000000000; frac_max = 0; frac_min = 1; SCIP* scip; for (int i = 0; i < 30; i++){ // lp_path = data_dir + "test_2000/" + std::to_string(i) + ".lp"; lp_path = data_dir + "eval_300-1500/" + std::to_string(i) + ".lp"; SCIPcreate(&scip); assert(scip!=NULL); SCIPincludeDefaultPlugins(scip); printf("%s\n", lp_path.c_str()); SCIPreadProb(scip, lp_path.c_str(), NULL); SCIPsetIntParam(scip, "presolving/maxrestarts", 0); SCIPsetIntParam(scip, "separating/maxrounds", 0); SCIPsetIntParam(scip, "separating/maxroundsroot", 0); SCIPmessagehdlrSetQuiet(SCIPgetMessagehdlr(scip), TRUE); SCIPtransformProb(scip); // SCIPsolve(scip); nvars = SCIPgetNOrigBinVars(scip); ncons = SCIPgetNOrigConss(scip); nnzs = SCIPgetNNZs(scip); frac = nnzs / nvars / ncons; SCIPfree(&scip); if (nvars > nvars_max) nvars_max = nvars; if (nvars < nvars_min) nvars_min = nvars; if (ncons > ncons_max) ncons_max = ncons; if (ncons < ncons_min) ncons_min = ncons; if (frac > frac_max) frac_max = frac; if (frac < frac_min) frac_min = frac; } printf("mis large: %d-%d %d-%d %f-%f\n", nvars_min, nvars_max, ncons_min, ncons_max, frac_min, frac_max); // specify testing & training graphs; optimal solutions for the training graphs must be provided. // std::vector<std::string> train_files; std::vector<std::string> test_files; // switch (gconf.prob) // { // case 0: //MIS problem // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_3000/" + std::to_string(i)); // } // break; // case 1: // Setcover problem // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_2250_1750/" + std::to_string(i)); // } // break; // case 2: // TSP // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_150/" + std::to_string(i)); // } // break; // case 3: // vrp // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_50/" + std::to_string(i)); // } // break; // case 4: // vc // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_3000/" + std::to_string(i)); // } // break; // case 5: // dominate set // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_3000/" + std::to_string(i)); // } // break; // case 6: // ca // for (int i = 0; i < 30; i++){ // test_files.push_back("eval_300-1500/" + std::to_string(i)); // } // break; // default: throw std::runtime_error("unknown problem\n"); // } return 0; }
3,797
27.556391
109
cpp
PB-DFS
PB-DFS-master/src/utils.cpp
#include "utils.hpp" #include <stdio.h> #include <string> #include <sys/stat.h> #include <dirent.h> #include <stdlib.h> #include <random> #include "global_config.hpp" #include <limits> #include <unordered_set> #include <sstream> // Get current date/time, format is YYYY-MM-DD.HH:mm:ss const std::string COML::currentDateTime() { time_t now = time(0); struct tm tstruct; char buf[80]; tstruct = *localtime(&now); strftime(buf, sizeof(buf), "%Y-%m-%d-%H-%M", &tstruct); return buf; } int COML::list_filenames_under_dir(std::string dir_name, std::vector<int> *vec) { int max = -1; if (auto dir = opendir(dir_name.c_str())) { while (auto f = readdir(dir)) { if (f->d_name[0] == '.') continue; // Skip everything that starts with a dot int data_idx = std::stoi(f->d_name); if (vec != NULL) vec->push_back(data_idx); if (max < data_idx) max = data_idx; } closedir(dir); return max; } else { printf("in utils.list_filenames_under_dir(), open dir %s failed\n", dir_name.c_str()); exit(EXIT_FAILURE); } } void COML::create_dir(std::string path) { struct stat sb; if (!(stat(path.c_str(), &sb) == 0 && S_ISDIR(sb.st_mode))) mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); } int COML::calc_argmax(const std::vector<double> &v) { double max_score = -std::numeric_limits<double>::infinity(); int arg_max = 0; int vec_size = v.size(); //set true label index double tmp_score; for (int i = 0; i < vec_size; i++) { tmp_score = v.at(i); if (max_score < tmp_score) { max_score = tmp_score; arg_max = i; } } return arg_max; } void COML::all_zeros(double *arr, int size) { for (int i = 0; i < size; i++) { arr[i] = 0; } } void COML::all_zeros(int *arr, int size) { for (int i = 0; i < size; i++) { arr[i] = 0; } } double *COML::calc_top10(const double *arr, const int arr_size) { std::vector<double> sb_scores_cp; double *_top10 = new double[10]; sb_scores_cp.assign(arr, arr + arr_size); std::sort(sb_scores_cp.begin(), sb_scores_cp.end(), std::greater<double>()); sb_scores_cp.resize(10); for (int i = 0; i < 10; i++) { _top10[i] = sb_scores_cp[i]; } return _top10; } double *COML::calc_top1_5_10_30(const double *arr, const int arr_size) { #ifdef DEBUG printf("start calc_top1_5_10_30\n"); fflush(stdout); #endif std::vector<double> sb_scores_vec(arr, arr + arr_size); double *_top_1_5_10_30 = new double[4]; #ifdef DEBUG printf("after assign arr\n"); fflush(stdout); #endif std::sort(sb_scores_vec.begin(), sb_scores_vec.end(), std::greater<double>()); #ifdef DEBUG printf("after sorting\n"); fflush(stdout); #endif _top_1_5_10_30[0] = sb_scores_vec[0]; #ifdef DEBUG printf("after first assignment\n"); fflush(stdout); #endif if (arr_size >= 5) _top_1_5_10_30[1] = sb_scores_vec[4]; else _top_1_5_10_30[1] = sb_scores_vec[arr_size - 1]; #ifdef DEBUG printf("after second assignment\n"); fflush(stdout); #endif if (arr_size >= 10) _top_1_5_10_30[2] = sb_scores_vec[9]; else _top_1_5_10_30[2] = sb_scores_vec[arr_size - 1]; #ifdef DEBUG printf("after third assignment\n"); fflush(stdout); #endif if (arr_size >= 30) _top_1_5_10_30[3] = sb_scores_vec[29]; else _top_1_5_10_30[3] = sb_scores_vec[arr_size - 1]; #ifdef DEBUG printf("done calc_top1_5_10_30\n"); fflush(stdout); #endif return _top_1_5_10_30; } int COML::calc_argmax(const double *arr, const int size) { double max_score = -std::numeric_limits<double>::infinity(); int arg_max = 0; for (int i = 0; i < size; i++) { if (max_score < arr[i]) { max_score = arr[i]; arg_max = i; } } return arg_max; } int COML::calc_argmin(const double *arr, const int size) { double min_score = std::numeric_limits<double>::infinity(); int arg_min = 0; for (int i = 0; i < size; i++) { if (min_score > arr[i]) { min_score = arr[i]; arg_min = i; } } return arg_min; } double COML::calc_max(const double *arr, const int arr_size) { double maxval = -std::numeric_limits<double>::infinity(); for (int i = 0; i < arr_size; i++) { if (arr[i] > maxval) { maxval = arr[i]; } } return maxval; } double COML::calc_min(const double *arr, const int arr_size) { double minval = std::numeric_limits<double>::infinity(); for (int i = 0; i < arr_size; i++) { if (arr[i] < minval) { minval = arr[i]; } } return minval; } double COML::calc_mean(const double *arr, const int arr_size) { double tot = 0.; int i; for (i = 0; i < arr_size; i++) { if (arr[i] == -100000000000000000000.) break; tot += arr[i]; } return tot / (i); } double COML::calc_stdev(const double *arr, const int arr_size) { double mean = COML::calc_mean(arr, arr_size); double variance = 0.; int i; for (i = 0; i < arr_size; i++) { if (arr[i] == -100000000000000000000.) break; variance += (arr[i] - mean) * (arr[i] - mean); } variance /= (i); return std::sqrt(variance); } double COML::calc_zscore(const double val, const double mean, const double stddev) { double tmp = (val - mean) / stddev; return tmp; } void COML::min_max_norm(double *arr, int arr_size) { double min = COML::calc_min(arr, arr_size); double max = COML::calc_max(arr, arr_size); double delta = max - min; for (int i = 0; i < arr_size; i++) { arr[i] = (delta == 0) ? 0 : (arr[i] - min) / delta; if (arr[i] < -1 || arr[i] > 1) { printf("%f\n", arr[i]); } } } void COML::arraycopy(double *src, double *dest, int num_elements) { for (int i = 0; i < num_elements; i++) { dest[i] = src[i]; } } int COML::read_problems(std::string prefix, std::string filename, std::vector<std::string> &problems, std::vector<double> &objs) { // read problems from file int num_problems = 0; std::ifstream infile(filename); if (infile.is_open()) { std::string prob_name; std::string objval; while (getline(infile, prob_name)) { if (!prob_name.empty() && prob_name[prob_name.length() - 1] == '\n') prob_name.erase(prob_name.length() - 1); getline(infile, objval); if (!objval.empty() && objval[objval.length() - 1] == '\n') objval.erase(objval.length() - 1); problems.push_back(prefix + prob_name); objs.push_back(std::stod(objval)); num_problems++; } infile.close(); } else { printf("cannot find problem file: %s\n", filename.c_str()); assert(false); } printf("number of problems to solve: %d\n\n", num_problems); return num_problems; } bool comparator_acending(const COML::mypair &l, const COML::mypair &r) { return l.second < r.second; } bool COML::comparator_decending(const mypair &l, const mypair &r) { return l.second > r.second; } void COML::argsort(const double *scores, int *sortedargs, int size) { std::vector<mypair> score_index; for (int i = 0; i < size; i++) { mypair p; p.first = i; p.second = scores[i]; score_index.push_back(p); } std::sort(score_index.begin(), score_index.end(), comparator_decending); for (int i = 0; i < size; i++) { sortedargs[i] = score_index[i].first; } } bool COML::is_file_exist(const char *fileName) { std::ifstream infile(fileName); return infile.good(); }
8,134
21.787115
94
cpp
PB-DFS
PB-DFS-master/src/utils.hpp
#ifndef _MIPEXP_UTILS #define _MIPEXP_UTILS #include <vector> #include <limits> #include <cmath> #include <algorithm> #include <map> #include <scip/scip.h> #include <string> #include <algorithm> #include <cassert> #include <fstream> #include "global_config.hpp" #include <time.h> namespace COML { const std::string currentDateTime(); typedef std::pair<int,double> mypair; bool comparator_decending ( const mypair& l, const mypair& r); int list_filenames_under_dir(std::string dir_name, std::vector<int>* vec); void create_dir(std::string path); int read_problems(std::string prefix, std::string filename, std::vector<std::string>& problems, std::vector<double> &objs); int calc_argmax(const double* arr, const int size ); int calc_argmax(const std::vector<double>& v ); int calc_argmin(const double* arr, const int size ); double* calc_top10(const double* arr, const int arr_size); double* calc_top1_5_10_30(const double* arr, const int arr_size); double calc_max(const double* arr, const int arr_size); double calc_min(const double* arr, const int arr_size); double calc_mean(const double* arr, const int arr_size); double calc_stdev(const double* arr, const int arr_size); double calc_zscore(const double val, const double mean, const double stddev); void min_max_norm(double * arr, const int arr_size); void arraycopy(double* src, double* dest, int num_elements); void argsort(const double* scores, int* sortedargs, int size); void all_zeros(int* arr, int size); void all_zeros(double* arr, int size); bool is_file_exist(const char *fileName); } #endif
1,674
34.638298
83
hpp
umap
umap-master/.pep8speaks.yml
pycodestyle: # Same as scanner.linter value. Other option is flake8 max-line-length: 88 # Default is 79 in PEP 8
119
39
68
yml
umap
umap-master/.travis.yml
language: python cache: apt: true # We use three different cache directory # to work around a Travis bug with multi-platform cache directories: - $HOME/.cache/pip - $HOME/download env: global: # Directory where tests are run from - TEST_DIR=/tmp/test_dir/ - MODULE=umap matrix: include: - python: 3.6 os: linux - env: DISTRIB="conda" PYTHON_VERSION="3.7" NUMPY_VERSION="1.17" SCIPY_VERSION="1.3.1" os: linux - env: DISTRIB="conda" PYTHON_VERSION="3.8" NUMPY_VERSION="1.20.0" SCIPY_VERSION="1.6.0" os: linux - env: DISTRIB="conda" PYTHON_VERSION="3.8" COVERAGE="true" NUMPY_VERSION="1.20.0" SCIPY_VERSION="1.6.0" os: linux # - env: DISTRIB="conda" PYTHON_VERSION="3.7" NUMBA_VERSION="0.51.2" # os: osx # language: generic # - env: DISTRIB="conda" PYTHON_VERSION="3.8" NUMBA_VERSION="0.51.2" # os: osx # language: generic install: source ci_scripts/install.sh script: travis_wait 90 bash ci_scripts/test.sh after_success: source ci_scripts/success.sh
1,046
28.083333
108
yml
umap
umap-master/CODE_OF_CONDUCT.md
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at leland.mcinnes@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/
3,221
67.553191
455
md
umap
umap-master/CONTRIBUTING.md
# Contributing Contributions of all kinds are welcome. In particular pull requests are appreciated. The authors will endeavour to help walk you through any issues in the pull request discussion, so please feel free to open a pull request even if you are new to such things. ## Issues The easiest contribution to make is to [file an issue](https://github.com/lmcinnes/umap/issues/new). It is beneficial if you check the [FAQ](https://umap-learn.readthedocs.io/en/latest/faq.html), and do a cursory search of [existing issues](https://github.com/lmcinnes/umap/issues?utf8=%E2%9C%93&q=is%3Aissue). It is also helpful, but not necessary, if you can provide clear instruction for how to reproduce a problem. If you have resolved an issue yourself please consider contributing to the FAQ to add your problem, and its resolution, so others can benefit from your work. ## Documentation Contributing to documentation is the easiest way to get started. Providing simple clear or helpful documentation for new users is critical. Anything that *you* as a new user found hard to understand, or difficult to work out, are excellent places to begin. Contributions to more detailed and descriptive error messages is especially appreciated. To contribute to the documentation please [fork the project](https://github.com/lmcinnes/umap/issues#fork-destination-box) into your own repository, make changes there, and then submit a pull request. ### Building the Documentation Locally To build the docs locally, install the documentation tools requirements: ```bash pip install -r docs_requirements.txt ``` Then run: ```bash sphinx-build -b html doc doc/_build ``` This will build the documentation in HTML format. You will be able to find the output in the `doc/_build` folder. ## Code Code contributions are always welcome, from simple bug fixes, to new features. To contribute code please [fork the project](https://github.com/lmcinnes/umap/issues#fork-destination-box) into your own repository, make changes there, and then submit a pull request. If you are fixing a known issue please add the issue number to the PR message. If you are fixing a new issue feel free to file an issue and then reference it in the PR. You can [browse open issues](https://github.com/lmcinnes/umap/issues), or consult the [project roadmap](https://github.com/lmcinnes/umap/issues/15), for potential code contributions. Fixes for issues tagged with 'help wanted' are especially appreciated. ### Code formatting If possible, install the [black code formatter](https://github.com/python/black) (e.g. `pip install black`) and run it before submitting a pull request. This helps maintain consistency across the code, but also there is a check in the Travis-CI continuous integration system which will show up as a failure in the pull request if `black` detects that it hasn't been run. Formatting is as simple as running: ```bash black . ``` in the root of the project.
2,953
41.2
114
md
umap
umap-master/appveyor.yml
build: "off" environment: matrix: - PYTHON_VERSION: "3.7" MINICONDA: C:\Miniconda3-x64 - PYTHON_VERSION: "3.8" MINICONDA: C:\Miniconda3-x64 init: - "ECHO %PYTHON_VERSION% %MINICONDA%" install: - "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%" - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda info -a - "conda create -q -n test-environment python=%PYTHON_VERSION% numpy scipy scikit-learn numba pandas bokeh holoviews datashader scikit-image pytest" - activate test-environment - pip install "tensorflow>=2.1" - pip install pytest-benchmark - pip install -e . test_script: - pytest --show-capture=no -v --disable-warnings
712
26.423077
150
yml